Parameters for CreateWindow() function?


I know what this function is and how to use it, AND i know the parameters for it. I put it in the switch(message) and am wondering if there are any other parameters I could use (in the first parameter) other than "BUTTON", "STATIC", and "EDIT".

:

1
2
3
4
5
            CreateWindow(/*parameter I am talking about */,
                         "window name",
                         WS_VISIBLE | WS_CHILD,
                         50,50,50,50,
                         hwnd, NULL, NULL, NULL);


hopefully you can understand what I mean. If not I'll try to explain a bit better. If there is anything wrong with the way I do it please tell me.

Also: all the NULLs, I know (HMENU) is one you could use for the first NULL parameter spot, but what about the other two? Are they just... There?
Well, thanks, but that only clears up the NULLs. I couldn't find the class names
are any other parameters I could use (in the first parameter) other than "BUTTON", "STATIC", and "EDIT".

There are other standard window classes (e.g. PROGRESS_CLASS for the procress control) you can use; see MSDN's Control LIbrary documentation:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773169%28v=vs.85%29.aspx

Or you can register your own class using RegisterClass. Once you've registered a class (with a name) you can pass that name to CreateWindow to create instances of your new type of window.

RegisterClass function
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633586%28v=vs.85%29.aspx

(If you've written a windows app successfully, you must have already used RegisterClass to register the application's main window class, yes??)

Andy

PS Note that CreateWindowEx and RegisterClassEx are generally used in more modern code

CreateWindowEx function
http://msdn.microsoft.com/en-us/library/windows/desktop/ms632680%28v=vs.85%29.aspx

RegisterClassEx function
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633587%28v=vs.85%29.aspx
Last edited on
Topic archived. No new replies allowed.