|
|
The default control callback procedure. This function is the default control callback procedure. You should call this function for all messages, you do not want to handle in your own control procedure.
|
|
|
The default dialog box procedure. This function is the default dialog box procedure. You should call this function in your dialog box procedure to process the unhandled messages.
|
|
|
Is the default main window callback procedure. This function is the default main window callback procedure. You should call this function for all messages, you do not want to handle in your main window procedure.
|
|
|
Desktop window handle.
|
|
|
Invalid window handle.
|
|
|
Null window handle.
|
|
|
Is an alias of MainWindowThreadCleanup.
|
|
|
Structure defines a main window. |
|
|
Type of the window callback procedure.
|
|
|
Creates a main window. This function creates a main window by using information in the structure pointed to by pCreateStruct, and returns the handle to the main window.
/* * The following code initializes a MAINWINCREATE struct and then * creates a main window. */ { MAINWINCREATE CreateInfo; HWND hWnd; /* Initialize the MAINWINCREATE structure. */ CreateInfo.dwStyle = WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_CAPTION; CreateInfo.spCaption= "MiniGUI step three"; CreateInfo.dwExStyle = WS_EX_NONE; CreateInfo.hMenu = createmenu(); CreateInfo.hCursor = GetSystemCursor(0); CreateInfo.hIcon = 0; CreateInfo.MainWindowProc = MainWinProc; CreateInfo.lx = 0; CreateInfo.ty = 0; CreateInfo.rx = 640; CreateInfo.by = 480; CreateInfo.iBkColor = COLOR_lightwhite; CreateInfo.dwAddData = 0; CreateInfo.hHosting = HWND_DESKTOP; /* Create the main window. */ hWnd = CreateMainWindow(&CreateInfo); if (hWnd == HWND_INVALID) return 0; } |
|
||||||||||||||||||||
|
The default window callback procedure. This window procedure can be used for main windows, dialog boxes, and child windows. This function is the default window callback procedure. You should call this function for all messages you do not want to handle in your window procedure.
|
|
|
Destroys a main window. This function destroys the main window specified by hWnd. It does not release all system resource used by the main window. You should call MainWindowThreadCleanup to destroy the main window actually.
/* * The following code destroies all resource used by the main window * and then destroies the main window itself. */ case MSG_CLOSE: /* Destroy the resource used by the main window. */ DestroyLogFont (logfont1); DestroyLogFont (logfont2); DestroyLogFont (logfont3); /* Destroy the child windows. */ DestroyWindow(hWndButton); DestroyWindow(hWndEdit); /* Destroy the main window. */ DestroyMainWindow (hWnd); /* Send a MSG_QUIT message to quit the message loop. */ PostQuitMessage(hWnd); return 0; |
|
|
Cleans up system resource associated with a main window. This function cleans up the system resource such as message queue associated with the main window hMainWnd. DestroyMainWindow does not destroy all resource used by a main window, therefore, you should call this function after calling DestroyMainWindow and skipping out from the message loop. After calling this function, the main window object will destroyed actually.
|
|
|
The default window callback procedure array.
|
1.4.2