BOOL CALLBACK MainBoxCallback(HWND window, UINT msg, WPARAM param, LPARAM param2) { switch(msg) { case WM_INITDIALOG: mainboxwindow = window; MainBoxDisplay(); // In this case, final touches to this window. ProgressBoxDisplay(); // Create the Progress Box at this time. return(FALSE); // And let Windows display this window. break; case WM_CLOSE: // The "X" in the upper right corner was hit. MainBoxCancelEvent(); return(TRUE); break; case WM_COMMAND: // Do we wish to capture 'ENTER/RETURN' and/or 'ESC' here? switch(LOWORD(param)) { case IDC_0202: // Filename Edit Box MainBoxFileEvent(); // Describe the File's type... return(FALSE); // Let Windows handle the actual 'edit' processing... break; case IDC_0203: // "Browse" Button MainBoxBrowseEvent(); return(TRUE); break; case IDC_0205: // "Ok" Button MainBoxOKEvent(); return(TRUE); break; case IDC_0206: // "Get from Disc" Button MainBoxDeviceEvent(); return(TRUE); break; case IDC_0207: // "Convert" Button MainBoxConversionEvent(); return(TRUE); break; case IDC_0208: // "Cancel" Button MainBoxCancelEvent(); return(TRUE); break; } // ENDSWITCH param- Which object got the message? } // ENDSWITCH msg- what message has been sent to this window? return(FALSE); // Not a recognized message? Tell Windows to handle it. } // END MainBoxEventLoop()
int main(int argc, char *argv[]) { gtk_init(NULL, NULL); OpenLog(); InitConf(); LoadConf(); MainBoxDisplay(); ProgressBoxDisplay(); MessageBoxDisplay(); gtk_widget_show_all(mainbox.window); gtk_main(); CloseLog(); return(0); } // END main()