www.pudn.com > editbox.rar > dialogbox.c
#include#include #include #include #include #include static DLGTEMPLATE DlgInitProgress = { WS_BORDER | WS_CAPTION, WS_EX_NONE, 120, 150, 400, 130, #ifdef _LANG_ZHCN "VAM-CNC 正在初始化", #else "VAM-CNC is initializing", #endif 0, 0, 3, NULL, 0 }; #define IDC_PROMPTINFO 100 #define IDC_PROGRESS 110 static CTRLDATA CtrlInitProgress [] = { { "static", WS_VISIBLE | SS_SIMPLE, 10, 10, 380, 16, IDC_PROMPTINFO, #ifdef _LANG_ZHCN "正在...", #else "Initializing...", #endif 0 }, { "progressbar", WS_VISIBLE, 10, 40, 380, 20, IDC_PROGRESS, NULL, 0 }, { "button", WS_TABSTOP | WS_VISIBLE | BS_DEFPUSHBUTTON, 170, 70, 60, 25, IDOK, "OK", 0 } }; static int InitDialogBoxProc (HWND hDlg, int message, WPARAM wParam, LPARAM lParam) { switch (message) { case MSG_INITDIALOG: return 1; case MSG_COMMAND: switch (wParam) { case IDOK: case IDCANCEL: EndDialog (hDlg, wParam); break; } break; case MSG_CLOSE: EndDialog (hDlg, IDCANCEL); break; } return DefaultDialogProc (hDlg, message, wParam, lParam); } static void InitDialogBox (HWND hWnd) { DlgInitProgress.controls = CtrlInitProgress; DialogBoxIndirectParam (&DlgInitProgress, hWnd, InitDialogBoxProc, 0L); } int MiniGUIMain (int argc, const char* argv[]) { #ifdef _MGRM_PROCESSES JoinLayer(NAME_DEF_LAYER , "dialogbox" , 0 , 0); #endif InitDialogBox (HWND_DESKTOP); return 0; } #ifndef _LITE_VERSION #include #endif