// ******************************************************************************* // FUNCTION: SetFormDlgProc // // FUNCTION USE: The window procedure for the dialog // // DESCRIPTION: Calls the worker routine for each message handled by the // the application or the default procedure for messages which // the application does not handle. // // PARAMETERS: HWND dialog window handle // ULONG window message // MPARAM first message parameter // MPARAM second message parameter // // RETURNS: MRESULT WinDefDlgProc for all unprocessed messages; // otherwise, message dependent // // INTERNALS: NONE // // ******************************************************************************* MRESULT EXPENTRY SetFormDlgProc( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2 ) { switch (msg) { case WM_COMMAND: return wm_command(hwnd, mp1, mp2); case WM_INITDLG: return wm_initdlg(hwnd, mp1, mp2); default: return WinDefDlgProc(hwnd, msg, mp1, mp2); } /* endswitch */ }
INT_PTR configuration_dialog::dialogproc(HWND hwnd_dlg, UINT msg, WPARAM wparam, LPARAM lparam) { switch (msg) { case WM_SIZE: m_layout_manager.layout(LOWORD(lparam), HIWORD(lparam)); return TRUE; case WM_GETMINMAXINFO: m_layout_manager.get_minmaxinfo(*reinterpret_cast<MINMAXINFO*>(lparam)); return TRUE; case WM_INITDIALOG: return wm_initdialog(hwnd_dlg); case WM_COMMAND: return wm_command(hwnd_dlg, wparam, lparam); default: return FALSE; } }
INT_PTR about_dialog::dialogproc(HWND hwnd_dlg, UINT msg, WPARAM wparam, LPARAM lparam) { switch (msg) { case WM_SIZE: m_layout_manager.layout(LOWORD(lparam), HIWORD(lparam)); return TRUE; case WM_GETMINMAXINFO: m_layout_manager.get_minmaxinfo(*reinterpret_cast<MINMAXINFO*>(lparam)); return TRUE; case WM_INITDIALOG: m_layout_manager.initialize(hwnd_dlg, controls, sizeof(controls) / sizeof(controls[0])); SetWindowText(hwnd_dlg, "About " TXTVC_SHORTNAME); SendMessage(hwnd_dlg, WM_SETICON, ICON_SMALL, reinterpret_cast<LPARAM>(m_icon)); SetDlgItemText(hwnd_dlg, IDC_VERSIONINFO, version_info); SetDlgItemText(hwnd_dlg, IDC_GPL, gpl_notice); return TRUE; case WM_COMMAND: return wm_command(hwnd_dlg, wparam, lparam); default: return FALSE; } }