mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2025-12-17 02:04:23 +08:00
initical commit
This commit is contained in:
39
examples/msg_initdialog.c
Normal file
39
examples/msg_initdialog.c
Normal file
@@ -0,0 +1,39 @@
|
||||
static int DepInfoBoxProc (HWND hDlg, int message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
struct _DepInfo *info;
|
||||
|
||||
switch(message) {
|
||||
case MSG_INITDIALOG:
|
||||
{
|
||||
/*
|
||||
* Get the lParam passed to this dialog box, and assign it
|
||||
* to the second private additional data assoiciated
|
||||
* with the dialog box.
|
||||
*/
|
||||
info = (struct _DepInfo*)lParam;
|
||||
SetWindowAdditionalData2 (hDlg, (DWORD)lParam);
|
||||
break;
|
||||
}
|
||||
|
||||
case MSG_COMMAND:
|
||||
{
|
||||
/*
|
||||
* Get the parameter from the second private data assoiciated
|
||||
* with the dialog box.
|
||||
*/
|
||||
info = (struct _DepInfo*) GetWindowAdditionalData2 (hDlg);
|
||||
|
||||
switch(wParam) {
|
||||
case IDOK:
|
||||
/* Use the data in the parameter. */
|
||||
......
|
||||
|
||||
case IDCANCEL:
|
||||
EndDialog(hDlg,wParam);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return DefaultDialogProc (hDlg, message, wParam, lParam);
|
||||
}
|
||||
Reference in New Issue
Block a user