Exemple #1
0
/**
 * @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;
}
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;
}
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;
}
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;
}
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;
}
Exemple #6
0
/*
 * 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;
}
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(); 

}
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
}
Exemple #9
0
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;
        }
    }
    break;
    }

    return bRet;
}
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;
}
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;
}
Exemple #12
0
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;
}
Exemple #13
0
/**
 * @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;
}
	/**
	 * ダイアログメッセージをメッセージを各関数に振り分けるだけです。
	 * @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;
	}
Exemple #15
0
BOOL CInitDialogBar::Create(CWnd * pParentWnd, UINT nIDTemplate, UINT nStyle, UINT nID)
{
	if(!Create(pParentWnd, MAKEINTRESOURCE(nIDTemplate), nStyle, nID)) return FALSE;

	if(!OnInitDialog()) return FALSE;
	return TRUE;
}
Exemple #16
0
//-----------------------------------------------------------------------------
// 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
}
Exemple #17
0
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;
	}
}
Exemple #18
0
/**
 * @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 CopyDlg::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;
		case IDC_COPY_OFFSET:
		case IDC_COPY_BYTES:
			EnableDlgItem(pDlg, IDC_COPY_OFFSETEDIT,
			              pDlg->IsDlgButtonChecked(IDC_COPY_OFFSET));
			EnableDlgItem(pDlg, IDC_COPY_BYTECOUNT,
			              pDlg->IsDlgButtonChecked(IDC_COPY_BYTES));
			return TRUE;
		}
		break;

	case WM_HELP:
		OnHelp(pDlg);
		break;
	}
	return FALSE;
}
Exemple #19
0
/**
 * @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 OpenPartiallyDlg::DlgProc(HWindow* pDlg, UINT iMsg, WPARAM wParam, LPARAM lParam)
{
	switch (iMsg)
	{
	case WM_INITDIALOG:
		return OnInitDialog(pDlg);
	case WM_COMMAND:
		switch (wParam)
		{
		case IDOK:
			if (Apply(pDlg))
			{
			case IDCANCEL:
				pDlg->EndDialog(wParam);
			}
			return TRUE;
		case IDC_OPENPARTIAL_BEGINOFF:
		case IDC_OPENPARTIAL_ENDBYTES:
			EnableDlgItem(pDlg, IDC_OPENPARTIAL_OFFSET,
			              pDlg->IsDlgButtonChecked(IDC_OPENPARTIAL_BEGINOFF));
			return TRUE;
		}
		break;

	case WM_HELP:
		OnHelp(pDlg);
		break;
	}
	return FALSE;
}
INT_PTR CALLBACK PageProc04(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    // Call tooltip to handle messages
    g_Tooltip.HandleMessages(hDlg, uMsg, wParam, lParam, NULL);

    // Handle other messages
    switch(uMsg)
    {
        case WM_INITDIALOG:
            return OnInitDialog(hDlg, lParam);

        case WM_SIZE:
            if(pAnchors != NULL)
                pAnchors->OnSize();
            return FALSE;

        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;
}
Exemple #21
0
static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    // Dialog initialization
    if(uMsg == WM_INITDIALOG)
        return OnInitDialog(hDlg, lParam);

    if(uMsg == WM_COMMAND)
    {
        if(HIWORD(wParam) == BN_CLICKED)
        {
            switch(LOWORD(wParam))
            {
                case IDC_SELECT_ALL:
                    ForEachChildWindow(hDlg, Callback_SetCheck);
                    break;
            
                case IDC_CLEAR_ALL:
                    ForEachChildWindow(hDlg, Callback_ClearCheck);
                    break;

                case IDOK:
                    ForEachChildWindow(hDlg, Callback_SaveFlag);
                    // No break here !!

                case IDCANCEL:
                    EndDialog(hDlg, LOWORD(wParam));
                    break;
            }
        }
    }

    return FALSE;
}
Exemple #22
0
/*
 * Dialog Proc _________________________________________________________________
 *
 */
BOOL CALLBACK RootAfsPageDlgProc(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_TEN);
	    break;

	case IDBACK:
	    g_pWiz->SetState(sidSTEP_EIGHT);
	    break;

	case IDC_DONT_CREATE_ROOT_VOLUMES:
	    g_CfgData.configRootVolumes = CS_DONT_CONFIGURE;
	    break;

	case IDC_CREATE_ROOT_VOLUMES:
	    g_CfgData.configRootVolumes = CS_CONFIGURE;
	    break;
	}
	break;

    }

    return FALSE;
}
Exemple #23
0
void CSetPgApps::DoAppDel()
{
	int iCur = (int)SendDlgItemMessage(mh_Dlg, lbAppDistinct, LB_GETCURSEL, 0,0);
	if (iCur < 0)
		return;

	const AppSettings* p = gpSet->GetAppSettingsPtr(iCur);
	if (!p)
		return;

	if (MsgBox(L"Delete application?", MB_YESNO|MB_ICONQUESTION, p->AppNames, ghOpWnd) != IDYES)
		return;

	gpSet->AppSettingsDelete(iCur);

	MSetter lockSelChange(&mb_SkipSelChange);

	OnInitDialog(mh_Dlg, false);

	int iCount = (int)SendDlgItemMessage(mh_Dlg, lbAppDistinct, LB_GETCOUNT, 0,0);

	SendDlgItemMessage(mh_Dlg, lbAppDistinct, LB_SETCURSEL, min(iCur,(iCount-1)), 0);

	lockSelChange.Unlock();

	OnAppSelectionChanged();
}
Exemple #24
0
void CSetPgApps::DoAppMove(bool bUpward)
{
	int iCur, iChg;
	iCur = (int)SendDlgItemMessage(mh_Dlg, lbAppDistinct, LB_GETCURSEL, 0,0);
	if (iCur < 0)
		return;
	if (bUpward)
	{
		if (!iCur)
			return;
		iChg = iCur - 1;
	}
	else
	{
		iChg = iCur + 1;
		if (iChg >= (int)SendDlgItemMessage(mh_Dlg, lbAppDistinct, LB_GETCOUNT, 0,0))
			return;
	}

	if (!gpSet->AppSettingsXch(iCur, iChg))
		return;

	MSetter lockSelChange(&mb_SkipSelChange);

	OnInitDialog(mh_Dlg, false);

	SendDlgItemMessage(mh_Dlg, lbAppDistinct, LB_SETCURSEL, iChg, 0);

	lockSelChange.Unlock();

	OnAppSelectionChanged();
}
Exemple #25
0
BOOL CALLBACK MainDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
    switch (msg) {
    case WM_COMMAND:
        switch (LOWORD(wParam)) {
        case IDC_WDELETE:
            WDelete(hDlg);
            break;
        case IDC_WEATHERLIST:
            if (HIWORD(wParam) == LBN_DBLCLK)
                WEdit(hDlg);
            break;
        case IDC_WEATHER:
            WAdd(hDlg);
            break;
        case IDC_NATURE:
            NEAdd(hDlg);
            break;
        case IDC_NDELETE:
            NEDelete(hDlg);
            break;
        case IDC_NATURELIST:
            if (HIWORD(wParam) == LBN_DBLCLK)
                NEEdit(hDlg);
            break;
        case IDC_ANIMACE_KAMERY:
            GetDlgItemText(hDlg, IDC_ANIMACE_KAMERY, p_LevelEnvironment->cCam,
                           32);
            break;
        case IDC_ENVIRONMENT:
            GetDlgItemText(hDlg, IDC_ENVIRONMENT, p_LevelEnvironment->cEnv, 32);
            break;
        case IDC_ANIMATEANDEFFECT:
            GetDlgItemText(hDlg, IDC_ANIMATEANDEFFECT,
                           p_LevelEnvironment->cAnimEff, 32);
            break;
        case IDCANCEL:
            EndDialog(hDlg, IDCANCEL);
            break;
        default:
            return FALSE;         // Neobslouzil message
        }
        break;
    case WM_NOTIFY:
    {
    }
    break;
    case WM_INITDIALOG:
        OnInitDialog(hDlg);
        break;
    case WM_DESTROY:
        EndDialog(hDlg, IDCANCEL);
        break;
    default:
        return FALSE;             // Neobslouzil message
    }

    return TRUE;                  // Obslouzil message
}
Exemple #26
0
LRESULT CALLBACK CommonWnd::WndProc( const HWND hwnd, const UINT msg, const WPARAM wParam, const LPARAM lParam)
{
  LRESULT result = 0L;

  //  look for the parent.
  auto obj = reinterpret_cast<CommonWnd*>(GetWindowLongPtr(hwnd, GWLP_USERDATA));

  // if this is a create message, then we will save the pointer.
  // the pointer was passed to us while created.
  if (msg == WM_CREATE)
  {
    const auto cs = reinterpret_cast<CREATESTRUCT *>(lParam);
    if (cs != nullptr)
    {
      obj = static_cast<CommonWnd*> (cs->lpCreateParams);
      if (obj != nullptr)
      {
        obj->_hwnd = hwnd;
        SetWindowLongPtr(hwnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(obj));

        // call the OnMessage as it might call
        // DefWindowProc(... ) eventually
        result = obj->OnMessage(msg, wParam, lParam);
        if (result == -1L)
        {
          obj->_hwnd = nullptr;
          return result;
        }

        // then let the user do something
        obj->OnInitDialog();

        // and return what WM_CREATE was alway going to do.
        return result;
      }
    }
  }

  if (obj != nullptr)
  {
    result = obj->OnMessage(msg, wParam, lParam);
    switch (msg)
    {
    case WM_PAINT:
      obj->OnPaint();
      break;

    case WM_CLOSE:
    case WM_DESTROY:
      SetWindowLongPtr(hwnd, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(nullptr));
      break;

    default:
      return result;
    }
    return result;
  }
  return DefWindowProc(hwnd, msg, wParam, lParam);
}
static INT_PTR CALLBACK DialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
    // Let Tab Control handle messages belonging to it
    if(TabCtrl_HandleMessages(GetDlgItem(hDlg, IDC_TAB), uMsg, wParam, lParam))
        return TRUE;

    // Handle messages that have been passed to us
    switch(uMsg)
    {
        case WM_INITDIALOG:
            OnInitDialog(hDlg, lParam);
            return TRUE;

        case WM_SIZE:
            OnSize(hDlg, lParam);
            return FALSE;

        case WM_GETMINMAXINFO:
            OnGetMinMaxInfo(hDlg, lParam);
            return FALSE;

        case WM_WINDOWPOSCHANGED:
        case WM_DISPLAYCHANGE:
            RefreshScreenSize(hDlg);
            break;

        case WM_SETTINGCHANGE:
            if(wParam == SPI_SETWORKAREA)
                RefreshScreenSize(hDlg);
            break;

        case WM_TIMER:
            if(wParam == WM_TIMER_CHECK_MOUSE)
                OnTimerCheckMouse(hDlg);
            break;

        case WM_APC:
            OnApc(hDlg, lParam);
            return TRUE;

        case WM_COMMAND:
            return OnCommand(hDlg, HIWORD(wParam), LOWORD(wParam));

        case WM_SYSCOMMAND:
            if(wParam == SC_HELP_ABOUT)
                OnHelpAbout(hDlg);
            break;

        case WM_NOTIFY:
            OnNotify(hDlg, (NMHDR *)lParam);
            break;

        case WM_DESTROY:
            OnDestroy(hDlg);
            break;
    }

    return FALSE;
}
Exemple #28
0
// HANDLE_WM_INITDIALOG
BOOL IRA_Dialog::OnInitDialog(HWND hwnd, HWND hwndFocus, LPARAM lParam)
{
	SetWindowLongPtr(hwnd, DWLP_USER, lParam);
	auto my_ptr{ reinterpret_cast<IRA_Dialog*>(GetWindowLongPtr(hwnd, DWLP_USER)) };
	if (my_ptr)
		return my_ptr->OnInitDialog(hwnd, hwndFocus, lParam);
	return FALSE;
}
Exemple #29
0
BOOL CBaseDlg::ShowWindow(int nCmdShow)
{
	if (!m_bMode&&!m_bInit)
	{
		OnInitDialog();
	}
	return CWnd::ShowWindow(nCmdShow);
}
Exemple #30
0
BOOL CALLBACK PartitionPageDlgProc(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);
	CheckEnableButtons();
	break;

    case WM_DESTROY_SHEET:
	Subclass_RemoveHook(g_pWiz->GetWindow(), WizardDlgProc);
	break;

    case WM_COMMAND:
	switch (LOWORD(wp)) {
	case IDNEXT:
	    if (SavePartitionInfo(TRUE))
		g_pWiz->SetState(sidSTEP_NINE);
	    break;

	case IDBACK:
	    if (SavePartitionInfo(FALSE))
		g_pWiz->SetState(sidSTEP_SEVEN);
	    break;

	case IDC_CREATE_PARTITION:
	    g_CfgData.configPartition = CS_CONFIGURE;
	    CheckEnableButtons();
	    EnableDriveListCtrls();
	    break;

	case IDC_DONT_CREATE_PARTITION:
	    g_CfgData.configPartition = CS_DONT_CONFIGURE;
	    CheckEnableButtons();
	    EnableDriveListCtrls(FALSE);
	    break;

	case IDC_PARTITION_NAME:
	    if (HIWORD(wp) == EN_CHANGE) {
		OnPartitionName();
		SetFocus((HWND)lp);
	    }
	    break;
	}
	break;

    case WM_NOTIFY:
	switch (((LPNMHDR)lp)->code) {
	case FLN_ITEMSELECT:	OnListSelection((LPFLN_ITEMSELECT_PARAMS)lp);
	}
	break;

    }

    return FALSE;
}