コード例 #1
0
ファイル: MainFrm.cpp プロジェクト: chenbk85/job_mobile
void CMainFrame::OnOfficeThemeChanged(NMHDR* pNMHDR, LRESULT* pResult)
{
	NMXTPCONTROL* tagNMCONTROL = (NMXTPCONTROL*)pNMHDR;

	CXTPControlComboBox* pControl = (CXTPControlComboBox*)tagNMCONTROL->pControl;
	ASSERT(pControl->GetType() == xtpControlComboBox);
	if (pControl->GetType() != xtpControlComboBox)
	{
		ASSERT(FALSE);
		return;
	}
	int nCurSel = pControl->GetCurSel();
	if (nCurSel < 0 || nCurSel >= pControl->GetCount())
	{
		ASSERT(FALSE);
		return;
	}
	int nTheme = (int)pControl->GetItemData(nCurSel);

#ifdef _DEBUG	
	if ((GetKeyState(VK_SHIFT) & 0x8000) && (GetKeyState(VK_CONTROL) & 0x8000))
	{
		if (FILEEXISTS_S(_GetTheme2007Style_file(3)))
		{
			int nIndex = pControl->AddString(_T("Office 2007 (Aqua)"));
			pControl->SetItemData(nIndex, xtpCalendarThemeOffice2007 + 100 + 3);
			pControl->SetCurSel(nIndex);

			nTheme = xtpCalendarThemeOffice2007 + 100 + 3;
		}
	}
#endif

	SetOfficeTheme(nTheme);


	*pResult = 1;
}
コード例 #2
0
void CGUI_VisualStudioView::OnEditFind(NMHDR* pNMHDR, LRESULT* pResult)
{
	NMXTPCONTROL* tagNMCONTROL = (NMXTPCONTROL*)pNMHDR;

	CXTPControlComboBox* pControl = (CXTPControlComboBox*)tagNMCONTROL->pControl;
	if (pControl->GetType() == xtpControlComboBox)
	{
		CString strFind = pControl->GetEditText();

		/*if (!FindText(strFind, TRUE,FALSE))
		{
			AfxMessageBox(_T("String not Found"));
		}*/

		*pResult = 1; // Handled;
	}
}