Questions tagged [createwindow]

87 questions
18
votes
3 answers

How to draw image on a window?

I have created a window with createwindow() api using VS2005 in C++ on Windows Vista My requirement is to draw an image (of any format) on that window. I am not using any MFC in this application.
Vinayaka Karjigi
  • 1,070
  • 5
  • 13
  • 37
15
votes
5 answers

Win32: CreateDialog instead of multiple calls to CreateWindow - any downsides?

I'm currently working on a Win32 program which requires a main window containing many child window controls - buttons, listviews and so on. I believe the standard way to build such a window is to first call CreateWindow for the main window, then…
user200783
  • 13,722
  • 12
  • 69
  • 135
10
votes
3 answers

Creating window in another thread(not main thread)

I've got a function: HWND createMainWindow(P2p_Socket_Machine * toSend){ HWND hMainWnd = CreateWindow( L"Class",/*(LPCWSTR) nameOfConference.c_str()*/L"Chat", WS_OVERLAPPED | WS_MINIMIZEBOX | WS_SYSMENU, CW_USEDEFAULT, 0,…
knightOfSpring
  • 359
  • 2
  • 3
  • 11
6
votes
2 answers

C# Creating window - Defining Parent window

I want create using C# window with setted parent to my defined handle, this is a other process window handle. Anyone know how to do this? Greetings,
Svisstack
  • 16,203
  • 6
  • 66
  • 100
6
votes
2 answers

Win32: How to create a ListBox control using the CreateWindowExW() function?

I've been through multiple sites, documents and tutorials and they all say the same, that is, any control is nothing more than a window in Win32's API, hence one is able to use the CreateWindowExW() function to create a ListBox control/window over…
Will Marcouiller
  • 23,773
  • 22
  • 96
  • 162
6
votes
3 answers

After createwindow(...), how to give the window a color?

I have created a window whose handle is handle_parent. Then I created a child window as following: hwnd_child = CreateWindow(child_class_name, _T(""), WS_CHILDWINDOW, 0, 0, 0, 0, hwnd_parent, (HMENU)0, ghinst, NULL); ShowWindow(win->hwndSplitterBar,…
user565739
  • 1,302
  • 4
  • 23
  • 46
5
votes
1 answer

Win32 Default Height of Edit Control

I'm using CreateWindowEx to create an Edit control (a textbox), but saying CW_DEFAULT doesn't help with getting the default height of the textbox -- it just makes a window with a height of zero. How do I get the system-default size of a textbox, so…
user541686
  • 205,094
  • 128
  • 528
  • 886
5
votes
2 answers

Creating a window using CreateWindowEx without an icon

With C#, I was easily able to get the effect I wanted: However, I'm having trouble doing the same thing using the Win32 API in C. I don't know how to create a window that has no icon (at all), but still has a caption, a minimize button, and a…
Neal P
  • 599
  • 1
  • 8
  • 16
5
votes
0 answers

Howto use Qt QWebView::createWindow(QWebPage::WebWindowType type) correctly?

I have a serious problem with QWebView::createWindow() and how to handle creating new browser window. I have sub-classed QWebView as told by docs (MyWebView) and reimplemented it's createWindow() method and also it's…
user3059410
  • 93
  • 1
  • 8
4
votes
1 answer

Create a native Windows window in JNA and some GetWindowLong with GWL_WNDPROC

Good day, I have been using JNA for a while to interact with the Windows API and now I am stuck when creating a window. As far as I have done the following: 1. Have created a child window of an existing window and obtained a valid handler to it. 2.…
Nikola Yovchev
  • 9,498
  • 4
  • 46
  • 72
4
votes
2 answers

Creating a Win32 Window app with English title bar, but the title bar becomes Chinese out of nowhere. How come?

HWND wndHandle; //global variable // code snipped WNDCLASSEX wcex; // code snipped wcex.lpszClassName = (LPCWSTR) "MyTitleName"; // code snipped wndHandle = CreateWindow( (LPCWSTR)"MyTitleName", //the window class to use …
Karl
  • 5,613
  • 13
  • 73
  • 107
4
votes
3 answers

Get exact window region size - CreateWindow window size isn't correct size of window

I've noticed something very annoying while trying to create a window in C++ and draw Rectangles that the window size doesn't match the size I set. For example, If I set the 480x240 window and try to Draw rectangles from top to bottom, left to right…
Deukalion
  • 2,516
  • 9
  • 32
  • 50
3
votes
2 answers

How can I use a resource file (*.rc) to style a dialog-based application

How can I use a resource file (*.rc) to style a dialog-based application? I can use CreateWindow or CreateWindowEx to create the main window of an application. And some of the arguments of CreateWindow or CreateWindowEx define the styles of a…
fr33m4n
  • 542
  • 2
  • 13
  • 31
3
votes
1 answer

CreateWindow Fails as Unable to Find Window Class - C++

In my application the function CreateWindow is failing for some reason. GetLastError indicates error 1407, which, according to the MSDN documentation is "Cannot find window class." The following code shows how CreateWindow is being called and the…
Jim Fell
  • 13,750
  • 36
  • 127
  • 202
3
votes
4 answers

BringWindowToTop is Not working even if I get the handle to Class Window

I am registering my Class in the following method: BOOL CNDSClientDlg::InitInstance() { //Register Window Updated on 16th Nov 2010, @Subhen // Register our unique class name that we wish to use WNDCLASS wndcls; memset(&wndcls, 0,…
Simsons
  • 12,295
  • 42
  • 153
  • 269
1
2 3 4 5 6