|
|
Value: CreateWindowEx(class_name, caption, style, 0, \ id, x, y, w, h, parent, add_data)
|
|
|
Type of the notification callback procedure. This is the function type of Notification Callback Procedure. If you set the Notification Callback Procedure for a control, when a notification occurred the control will call this callback procedure.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
Creates a child window with extended style. This function creates a child window (also known as "control") with extended style. It specifies the window class, the window title, the window style, the window extended style, the initial position, and the size of the window. The function also specifies the window's parent or owner.
/* * The following code creates some controls when handling the MSG_CREATE message. */ #define IDC_STATIC1 100 #define IDC_STATIC2 150 #define IDC_BUTTON1 110 #define IDC_BUTTON2 120 #define IDC_EDIT1 130 #define IDC_EDIT2 140 int ControlTestWinProc (HWND hWnd, int message, WPARAM wParam, LPARAM lParam) { static HWND hStaticWnd1, hStaticWnd2, hButton1, hButton2, hEdit1, hEdit2; switch (message) { case MSG_CREATE: { hStaticWnd1 = CreateWindow (CTRL_STATIC, "This is a static control", WS_CHILD | SS_NOTIFY | SS_SIMPLE | WS_VISIBLE | WS_BORDER, IDC_STATIC1, 10, 10, 180, 300, hWnd, 0); hButton1 = CreateWindow (CTRL_BUTTON, "Button1", WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE, IDC_BUTTON1, 20, 20, 80, 20, hStaticWnd1, 0); hButton2 = CreateWindow (CTRL_BUTTON, "Button2", WS_CHILD | BS_PUSHBUTTON | WS_VISIBLE, IDC_BUTTON2, 20, 50, 80, 20, hStaticWnd1, 0); hEdit1 = CreateWindow (CTRL_EDIT, "Edit Box 1", WS_CHILD | WS_VISIBLE | WS_BORDER, IDC_EDIT1, 20, 80, 100, 24, hStaticWnd1, 0); hStaticWnd2 = CreateWindow (CTRL_STATIC, "This is child static control", WS_CHILD | SS_NOTIFY | SS_SIMPLE | WS_VISIBLE | WS_BORDER, IDC_STATIC1, 20, 110, 100, 50, hStaticWnd1, 0); hEdit2 = CreateWindow (CTRL_EDIT, "Edit Box 2", WS_CHILD | WS_VISIBLE | WS_BORDER, IDC_EDIT2, 0, 20, 100, 24, hStaticWnd2, 0); break; } ....... } return DefaultMainWinProc (hWnd, message, wParam, lParam); } |
|
|
Destroys a specified control. This function destroys the specified control hWnd, which is created by CreateWindowEx.
|
|
|
Gets the notification callback procedure of a control. This function gets the new notification callback procedure of the control of hwnd.
|
|
||||||||||||
|
Sets a new notification callback procedure for a control. This function sets the new notification callback procedure (notif_proc) for the control of hwnd. By default, the notification from a control will be sent to its parent window within a MSG_COMMAND messsage. Since version 1.2.6, MiniGUI defines the Notification Callback Procedure for control. You can specify a callback function for a control by calling SetNotificationCallback to receive and handle the notifications from the control. If you did not set the notification callback function for a control, the notification will be sent to its parent as same as the earlier version of MiniGUI.
|
1.4.2