what is use of the createWindow object

Answer Posted / subeetha

The Windows API function used to create parent (top-level)
and child windows is called CreateWindow. As with many
Win32 API functions it has many parameters, most of which
are entirely relevant to the task in hand, so it is
important to understand each parameter with reference to
the others.

This article will explain the common setting used to create:

•Application Windows
•Parent Windows
•Child Controls
The first two uses are very similar, with the exception
that the second can be used to create non-application
floating windows that are children of a specific
application parent window (such as floating toolbars).

The Win32 API CreateWindow Parameter List
The CreateWindow function returns a Win32 HWND (window
handle), if creation has been successful. The parameters
that it takes are:

•LPCSTR lpClassName - the class name, a string;
•LPCSTR lpWindowName - the window title text, or child
control text;
•DWORD dwStyle - the WS_ and other (BS_, SS_, LBS_, CBS_
etc.) styles;
•int x, y, width, height - the x and y position, and width
and height of the window;
•HWND hParent - the parent window handle;
•HMENU hMenu - the menu handle or NULL, or a Child ID;
•HANDLE hInstance - the application instance handle;
•LPVOID lpParam - window creation data, usually NULL.
The lpWindowName parameter is just a string that is used as
the title bar text, or text for buttons, default text for
edit boxes, and so on.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the stack size in win 32 program

932


What Message to limit the size of window?

660


What is GDI object?

686


What is an Hash Mapping in java?

2554


explain WM_PAINT message ?????

2766






What is Function entry for DLL in win3.1?

661


What is System call executable binary file into a process?

669


to take three string inputs in a two dimensional array of 3 rows and 15 columns and write a function that prints them.

2157


What is preemption and context switching?

652