本文整理汇总了C++中OnInitDialog函数的典型用法代码示例。如果您正苦于以下问题:C++ OnInitDialog函数的具体用法?C++ OnInitDialog怎么用?C++ OnInitDialog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OnInitDialog函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
/**
* @brief Handle dialog messages.
* @param [in] hDlg Handle to the dialog.
* @param [in] iMsg The message.
* @param [in] wParam The command in the message.
* @param [in] lParam The optional parameter for the command.
* @return TRUE if the message was handled, FALSE otherwise.
*/
INT_PTR GoToDlg::DlgProc(HWindow *pDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_INITDIALOG:
return OnInitDialog(pDlg);
case WM_COMMAND:
switch (wParam)
{
case IDOK:
if (Apply(pDlg))
{
case IDCANCEL:
pDlg->EndDialog(wParam);
}
return TRUE;
}
break;
case WM_HELP:
OnHelp(pDlg);
break;
}
return FALSE;
}
示例2: PageProc03
INT_PTR CALLBACK PageProc03(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
return OnInitDialog(hDlg, lParam);
case WM_SIZE:
if(pAnchors != NULL)
pAnchors->OnSize();
return FALSE;
case WM_APC:
return OnApc(hDlg, lParam);
case WM_COMMAND:
return OnCommand(hDlg, HIWORD(wParam), LOWORD(wParam));
case WM_NOTIFY:
return OnNotify(hDlg, (NMHDR *)lParam);
case WM_DESTROY:
if(pAnchors != NULL)
delete pAnchors;
pAnchors = NULL;
return FALSE;
}
return FALSE;
}
示例3: KillTimer
LRESULT CXTPTaskDialogFrame::OnDialogNavigatePage(WPARAM /*wParam*/, LPARAM lParam)
{
TASKDIALOGCONFIG* pConfig = (TASKDIALOGCONFIG*)lParam;
m_pConfig = pConfig;
KillTimer(1);
SetWindowText(GetFrameTitle());
if (!CreateClient(FALSE))
{
TRACE0("Failed to create Task Dialog UI window.\n");
return FALSE;
}
OnInitDialog();
// inform callback Task Dialog was constructed.
SendNotify(TDN_DIALOG_CONSTRUCTED);
SendNotify(TDN_NAVIGATED);
return TRUE;
}
示例4: switch
INT_PTR CDialogInstall::HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
{
case WM_INITDIALOG:
return OnInitDialog(wParam, lParam);
case WM_ACTIVATE:
return OnActivate(wParam, lParam);
case WM_COMMAND:
return OnCommand(wParam, lParam);
case WM_NOTIFY:
return OnNotify(wParam, lParam);
case WM_CLOSE:
{
delete this;
}
return TRUE;
}
return FALSE;
}
示例5: PropPageDlgProc
BOOL CALLBACK PropPageDlgProc ( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
BOOL bRet = FALSE;
switch ( uMsg )
{
case WM_INITDIALOG:
bRet = OnInitDialog ( hwnd, lParam );
break;
case WM_NOTIFY:
{
NMHDR* phdr = (NMHDR*) lParam;
switch ( phdr->code )
{
case PSN_APPLY:
bRet = OnApply ( hwnd, (PSHNOTIFY*) phdr );
break;
case DTN_DATETIMECHANGE:
// If the user changes any of the DTP controls, enable
// the Apply button.
SendMessage ( GetParent(hwnd), PSM_CHANGED, (WPARAM) hwnd, 0 );
break;
}
}
break;
}
return bRet;
}
示例6: FileServerPageDlgProc
/*
* Dialog Proc _________________________________________________________________
*
*/
BOOL CALLBACK FileServerPageDlgProc(HWND hwndDlg, UINT msg, WPARAM wp, LPARAM lp)
{
if (WizStep_Common_DlgProc (hwndDlg, msg, wp, lp))
return FALSE;
switch (msg) {
case WM_INITDIALOG:
OnInitDialog(hwndDlg);
break;
case WM_COMMAND:
switch (LOWORD(wp)) {
case IDNEXT:
g_pWiz->SetState(sidSTEP_SIX);
break;
case IDBACK:
g_pWiz->SetState(sidSTEP_FOUR);
break;
case IDC_DONT_CONFIG_FILE_SERVER:
g_CfgData.configFS = CS_DONT_CONFIGURE;
break;
case IDC_SHOULD_CONFIG_FILE_SERVER:
g_CfgData.configFS = CS_CONFIGURE;
break;
}
break;
}
return FALSE;
}
示例7: write_one
void Cconfigure::OnEnKillfocusEdit1()
{
CString strText;
m_edit.GetWindowText(strText);
m_edit.ShowWindow(SW_HIDE);
if (strText.CompareNoCase(m_oldname)==0)
{
return;
}
int Value=_wtoi(strText);
if (5==m_CurCol)
{
write_one(g_tstat_id,14535+m_CurRow,Value);
}
else
{
write_one(g_tstat_id,251+m_CurRow,Value);
}
OnInitDialog();
}
示例8: switch
void CWindow::WinProc (unsigned int msg, WPARAM wParam, LPARAM lParam)
#endif
{
switch (msg)
{
case WM_CREATE: OnCreate (m_hWnd, wParam, lParam); break;
case WM_INITDIALOG: OnInitDialog (wParam, lParam); break;
case WM_ACTIVATEAPP: OnActivateApp (wParam, lParam); break;
case WM_SIZE: OnSize (wParam, lParam); break;
case WM_MOVE: OnMove (wParam, lParam); break;
case WM_PAINT: OnPaint (wParam, lParam); break;
case WM_KEYDOWN: OnKeyDown (wParam, lParam); break;
case WM_KEYUP: OnKeyUp (wParam, lParam); break;
case WM_COMMAND: OnCommand (wParam, lParam); break;
case WM_SYSCOMMAND: OnSysCommand (wParam, lParam); break;
case WM_CLOSE: OnClose (wParam, lParam); break;
case WM_DESTROY: OnDestroy (wParam, lParam); break;
#ifndef WIN32
case SDL_JOYAXISMOTION: OnJoystickAxis(wParam, lParam); break;
case SDL_JOYBUTTONDOWN:
case SDL_JOYBUTTONUP: OnJoystickButton(wParam, lParam); break;
#endif
}
#ifdef WIN32
return DefWindowProc (m_hWnd, msg, wParam, lParam);
#else
return;
#endif
}
示例9: DlgProc
INT_PTR CALLBACK DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
static ChooseDeviceParam *pParam = NULL;
switch (msg)
{
case WM_INITDIALOG:
pParam = (ChooseDeviceParam*)lParam;
OnInitDialog(hwnd, pParam);
return TRUE;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
OnOK(hwnd, pParam);
EndDialog(hwnd, LOWORD(wParam));
return TRUE;
case IDCANCEL:
EndDialog(hwnd, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
示例10: switch
BOOL CAddTracksDialog::DialogProc(UINT msg, WPARAM wParam, LPARAM lParam)
{
BOOL fHandled = FALSE;
switch (msg)
{
case WM_ACTIVATE:
break;
case WM_INITDIALOG:
OnInitDialog();
fHandled = TRUE;
break;
case WM_NOTIFY:
fHandled = OnNotify((NMHDR*)lParam);
break;
case WM_COMMAND:
int iCommand = HIWORD(wParam);
int iControl = LOWORD(wParam);
if (0 == iCommand || 0x1000 == iCommand)
{
fHandled = OnCommand(iControl);
}
break;
}
return fHandled;
}
示例11: ScreenSaverConfigureDialog
BOOL WINAPI ScreenSaverConfigureDialog(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_INITDIALOG:
LoadSetting();
OnInitDialog(hWnd);
return TRUE;
case WM_CLOSE:
EndDialog(hWnd, 0);
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDOK:
GetSetting(hWnd);
SaveSetting();
EndDialog(hWnd, 0);
break;
case IDC_RESET:
ResetSetting(hWnd);
EndDialog(hWnd, 0);
break;
case IDCANCEL:
EndDialog(hWnd, 0);
break;
}
break;
}
return FALSE;
}
示例12: switch
/**
* @brief Handle dialog messages.
* @param [in] hDlg Handle to the dialog.
* @param [in] iMsg The message.
* @param [in] wParam The command in the message.
* @param [in] lParam The optional parameter for the command.
* @return TRUE if the message was handled, FALSE otherwise.
*/
INT_PTR BitManipDlg::DlgProc(HWindow *pDlg, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
switch (iMsg)
{
case WM_INITDIALOG:
return OnInitDialog(pDlg);
case WM_COMMAND:
switch (wParam)
{
case IDOK:
case IDC_MANIPBITS_BIT1: case IDC_MANIPBITS_BIT2: case IDC_MANIPBITS_BIT3:
case IDC_MANIPBITS_BIT4: case IDC_MANIPBITS_BIT5: case IDC_MANIPBITS_BIT6:
case IDC_MANIPBITS_BIT7: case IDC_MANIPBITS_BIT8:
if (Apply(pDlg, wParam))
{
case IDCANCEL:
pDlg->EndDialog(wParam);
}
return TRUE;
}
break;
case WM_HELP:
OnHelp(pDlg);
break;
}
return FALSE;
}
示例13: DlgProc
/**
* ダイアログメッセージをメッセージを各関数に振り分けるだけです。
* @return TRUE(1)のときメッセージを処理
*/
INT_PTR DlgProc(
HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
switch(Message){
case WM_INITDIALOG:
return OnInitDialog(hWnd, (HWND)wParam, lParam);
case WM_DESTROY:
return OnDestroy(hWnd);
case WM_CLOSE:
return OnClose(hWnd);
case WM_COMMAND:
return OnCommand(
hWnd,
(int)(LOWORD(wParam)),
(HWND)(lParam),
(UINT)HIWORD(wParam));
case WM_NOTIFY_ICON:
OnNotifyIcon(hWnd, wParam, lParam);
return TRUE;
case WM_TIMER:
OnTimer(hWnd, wParam);
return 0;
}
return FALSE;
}
示例14: MainDlgProc
//-----------------------------------------------------------------------------
// Name: MainDlgProc()
// Desc: Handles dialog messages
//-----------------------------------------------------------------------------
INT_PTR CALLBACK MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
{
switch( msg )
{
case WM_INITDIALOG:
OnInitDialog( hDlg );
break;
case WM_COMMAND:
switch( LOWORD(wParam) )
{
case IDC_LOOKUP:
LookupValue( hDlg );
break;
case IDCANCEL:
EndDialog( hDlg, IDCANCEL );
break;
default:
return FALSE; // Didn't handle message
}
break;
case WM_DESTROY:
break;
default:
return FALSE; // Didn't handle message
}
return TRUE; // Handled message
}
示例15: switch
BOOL CInputBox::ProcSubHandler(HWND hDlg, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
switch (iMsg) {
case WM_INITDIALOG:
if (m_hWnd == NULL)
m_hWnd = hDlg;
return OnInitDialog();
case WM_SIZE:
OnSize((UINT)wParam, LOWORD(lParam), HIWORD(lParam));
return TRUE;
case WM_GETMINMAXINFO:
OnGetMinMaxInfo((LPMINMAXINFO) lParam);
return TRUE;
case WM_TIMER:
OnTimer((UINT)wParam);
return TRUE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
OnOK();
return TRUE;
case IDCANCEL:
OnCancel();
return TRUE;
default:
return FALSE;
}
default:
return FALSE;
}
}