Explanation of parameters:
LPSTR lpclassname = It is used to specify the class name.
LPSTR lpwindowname = It is used to specify the caption of the window.
DWORD dwStyle = This parameter is used to specify the style how the window should be displayed. We generally the window style that is WS_OVERLAPPEDWINDOW.
int X and int Y = they specify the x, y co-ordinates of the starting point of the window.
int width and int height = They specify the width and height of the window.
HWND parent = It is used to specify the handle to the parent if we are going to create a child window.
If we are going to create a window for the first time or if it is parent window, this value would be NULL.
HMENU menuname = It is used to specify the handle of the menu, if it NULL it will take the menu name from WNDCLASS structure.
HINSTANCE hInstance = It is used to specify the handle to he application to which the windows belongs to.
PARAM param = It is used to parameters passed to the parent window from the child window.
SHOW WINDOW FUNCTION:
This function is used to show the window created by CreateWindow function, which takes two parameters.
The following is the declaration of the ShowWindow function
BOOL ShowWindow (HWND hWnd, int nCmdShow)
This function will return true that the window is displayed successfully else it will return false.
PARAMETERS :
HWND hWnd = It is the parameter which will specify the handle to the window that is to be displayed.
int nCmdStyle = It is the parameter that specifies the window style how the window should be displayed.
It parameter is one of the parameter of the WinMain function.
It is an integer. By default has 1 as its value.
The parameter nCmdShow can have the any of the below values:
• SW_HIDE
• SW_MINIMIZE
• SW_RESTORE
• SW_SHOW
• SW_SHOWMAXIMISED
• SW_SHOWMINIZED
Now as we have completed all the functions required to create and show a window now the next task is to handle the messages send by the windows operating system to our application,
As discussed earlier the information that event is raised is sent from windows operating system in terms of messages to the active application.
In the application it is stored as a queue and uses a structure called MSG structure
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment