当前位置: 首页>>代码示例>>C++>>正文


C++ UISetCheck函数代码示例

本文整理汇总了C++中UISetCheck函数的典型用法代码示例。如果您正苦于以下问题:C++ UISetCheck函数的具体用法?C++ UISetCheck怎么用?C++ UISetCheck使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了UISetCheck函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: SetMenu

LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	// create command bar window
	HWND hWndCmdBar = m_CmdBar.Create(m_hWnd, rcDefault, NULL, ATL_SIMPLE_CMDBAR_PANE_STYLE);
	// attach menu
	m_CmdBar.AttachMenu(GetMenu());
	// load command bar images
	m_CmdBar.LoadImages(IDR_MAINFRAME);
	// remove old menu
	SetMenu(NULL);

	HWND hWndToolBar = CreateSimpleToolBarCtrl(m_hWnd, IDR_MAINFRAME, FALSE, ATL_SIMPLE_TOOLBAR_PANE_STYLE);

	CreateSimpleReBar(ATL_SIMPLE_REBAR_NOBORDER_STYLE);
	AddSimpleReBarBand(hWndCmdBar);
	AddSimpleReBarBand(hWndToolBar, NULL, TRUE);

	CreateSimpleStatusBar();

	m_hWndClient = m_view.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_HSCROLL | WS_VSCROLL, WS_EX_CLIENTEDGE);
	m_view.SetScrollSize(1,1);
	UIAddToolBar(hWndToolBar);
	UISetCheck(ID_VIEW_TOOLBAR, 1);
	UISetCheck(ID_VIEW_STATUS_BAR, 1);

	// register object for message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->AddMessageFilter(this);
	pLoop->AddIdleHandler(this);

	return 0;
}
开发者ID:Rancho06,项目名称:ProCppProjects,代码行数:33,代码来源:MainFrm.cpp

示例2: SetMenu

LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
    // create command bar window
    HWND hWndCmdBar = m_CmdBar.Create(m_hWnd, rcDefault, NULL, ATL_SIMPLE_CMDBAR_PANE_STYLE);
    // attach menu
    m_CmdBar.AttachMenu(GetMenu());
    // load command bar images
    m_CmdBar.LoadImages(IDR_MAINFRAME);
    // remove old menu
    SetMenu(NULL);

    HWND hWndToolBar = CreateSimpleToolBarCtrl(m_hWnd, IDR_MAINFRAME, FALSE, ATL_SIMPLE_TOOLBAR_PANE_STYLE);

    CreateSimpleReBar(ATL_SIMPLE_REBAR_NOBORDER_STYLE);
    AddSimpleReBarBand(hWndCmdBar);
    AddSimpleReBarBand(hWndToolBar, NULL, TRUE);

    CreateSimpleStatusBar();

    UIAddToolBar(hWndToolBar);
    UISetCheck(ID_VIEW_TOOLBAR, 1);
    UISetCheck(ID_VIEW_STATUS_BAR, 1);

    // register object for message filtering and idle updates
    CMessageLoop* pLoop = _Module.GetMessageLoop();
    ATLASSERT(pLoop != NULL);
    pLoop->AddMessageFilter(this);
    pLoop->AddIdleHandler(this);

    // Create the splitter windows.
    const DWORD dwSplitStyle = CHILD_WND_STYLE;

    m_wndVerSplit1.Create (*this, rcDefault, NULL, dwSplitStyle);
    m_wndVerSplit1.m_bFullDrag = false;
    m_wndVerSplit1.m_cxyMin = 200;
    m_wndVerSplit1.SetSplitterPos(200);

    m_wndVerSplit2.Create(m_wndVerSplit1, rcDefault, NULL, dwSplitStyle);
    m_wndVerSplit2.m_bFullDrag = false;
    m_wndVerSplit2.m_cxyMin = 200;
    m_wndVerSplit2.SetSplitterPos(200);

    // Create splitter view
    const DWORD dwViewStyle = CHILD_WND_STYLE;
    const DWORD dwViewStyleEx = WS_EX_CLIENTEDGE;
    m_wndLeftView.Create(m_wndVerSplit1, rcDefault, NULL, dwViewStyle, dwViewStyleEx);
    m_wndMiddleView.Create(m_wndVerSplit2, rcDefault, NULL, dwViewStyle, dwViewStyleEx);
    m_wndRightView.Create(m_wndVerSplit2, rcDefault, NULL, dwViewStyle, dwViewStyleEx);

    m_wndVerSplit1.SetSplitterPanes(m_wndLeftView, m_wndVerSplit2);
    m_wndVerSplit2.SetSplitterPanes(m_wndMiddleView, m_wndRightView);
    m_hWndClient = m_wndVerSplit1;

    // Set the splitter as the client area window, and resize the splitter 
    // to match the frame size.
    UpdateLayout();

    return 0;
}
开发者ID:wangzhan,项目名称:frameui_wtl,代码行数:59,代码来源:MainFrm.cpp

示例3: PostMessage

LRESULT CMiniPieFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	CAppInfo info;

	// Full screen mode delayed restoration 
	bool bFull = false;
	info.Restore(bFull, L"Full");
	if (bFull)
		PostMessage(WM_COMMAND, ID_VIEW_FULLSCREEN);

	CreateSimpleCEMenuBar();
#ifdef WIN32_PLATFORM_WFSP // SmartPhone
	AtlActivateBackKey(m_hWndCECommandBar);
#endif 
	UIAddToolBar(m_hWndCECommandBar);
	SetCommandButton(ID_APP_EXIT);

	// StatusBar state restoration 
	bool bVisible = true;
	info.Restore(bVisible, L"Status");
	DWORD dwStyle = WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | CCS_TOP;
	if (bVisible)
		dwStyle |= WS_VISIBLE;

	// StatusBar creation 
	CreateSimpleStatusBar(ATL_IDS_IDLEMESSAGE, dwStyle);
	UIAddStatusBar(m_hWndStatusBar);
	UISetCheck(ID_VIEW_STATUS_BAR, bVisible);

	// Browser view creation
	m_hWndClient = m_browser.Create(m_hWnd, NULL, _T("Microsoft.PIEDocView"),
                     WS_CHILD | WS_VISIBLE | WS_BORDER, 0, ID_BROWSER);

    ATLVERIFY(SUCCEEDED(m_browser.QueryControl(&m_spIWebBrowser2)));
    ATLVERIFY(SUCCEEDED(AtlAdviseSinkMap(this, true)));

	// Navigation menu initialization
	UIEnable(IDM_BACK, FALSE);
	UIEnable(IDM_FORWARD, FALSE);
	UIEnable(IDM_STOP, FALSE);
	UIEnable(IDM_REFRESH, FALSE);

#ifdef WIN32_PLATFORM_PSPC 
	// PPC Address bar state restoration
    VARIANT_BOOL vb = ATL_VARIANT_TRUE;
	info.Restore(vb, L"Address");
	m_spIWebBrowser2->put_AddressBar(vb);
	UISetCheck(ID_VIEW_ADDRESSBAR, vb == ATL_VARIANT_TRUE);
#endif 

	// register object for message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->AddMessageFilter(this);
	pLoop->AddIdleHandler(this);

	return 0;
}
开发者ID:Bizonu,项目名称:amclibrary,代码行数:58,代码来源:MiniPieFrame.cpp

示例4: SetMenu

LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
    hThread = 0;
    // create command bar window
    HWND hWndCmdBar = m_CmdBar.Create(m_hWnd, rcDefault, NULL, ATL_SIMPLE_CMDBAR_PANE_STYLE);
    // attach menu
    m_CmdBar.AttachMenu(GetMenu());
    // load command bar images
    m_CmdBar.LoadImages(IDR_MAINFRAME);
    // remove old menu
    SetMenu(NULL);

    HICON hIconSmall = (HICON)::LoadImage(_Module.GetResourceInstance(),
                                          MAKEINTRESOURCE(IDR_MAINFRAME),
                                          IMAGE_ICON,
                                          ::GetSystemMetrics(SM_CXSMICON),
                                          ::GetSystemMetrics(SM_CYSMICON),
                                          LR_DEFAULTCOLOR);

    InstallIcon(_T("Tooltip text"), hIconSmall, IDR_TRAYPOPUP);
    SetDefaultItem(ID_SHOW);


    HWND hWndToolBar = CreateSimpleToolBarCtrl(m_hWnd, IDR_MAINFRAME, FALSE, ATL_SIMPLE_TOOLBAR_PANE_STYLE);

    CreateSimpleReBar(ATL_SIMPLE_REBAR_NOBORDER_STYLE);
    AddSimpleReBarBand(hWndCmdBar);
    AddSimpleReBarBand(hWndToolBar, NULL, TRUE);

    CreateSimpleStatusBar();

    WTL::CRect r(0, 0, 800, 600);

    m_hWndClient = m_view.Create(m_hWnd, r, NULL,
                                 WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
                                 LBS_NOINTEGRALHEIGHT | LBS_NOTIFY | LBS_WANTKEYBOARDINPUT, WS_EX_CLIENTEDGE);

    m_view.SetFont(AtlGetDefaultGuiFont());

    UIAddToolBar(hWndToolBar);
    UISetCheck(ID_VIEW_TOOLBAR, 1);
    UISetCheck(ID_VIEW_STATUS_BAR, 1);

    // register object for message filtering and idle updates
    CMessageLoop* pLoop = _Module.GetMessageLoop();
    ATLASSERT(pLoop != NULL);
    pLoop->AddMessageFilter(this);
    pLoop->AddIdleHandler(this);

    return 0;
}
开发者ID:cmdcolin,项目名称:itunes-monitor,代码行数:51,代码来源:MainFrm.cpp

示例5: SetMenu

LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	CNCaptureApplication::Instance()->m_pMainFrame = this;

	// create command bar window
	HWND hWndCmdBar = m_CmdBar.Create(m_hWnd, rcDefault, NULL, ATL_SIMPLE_CMDBAR_PANE_STYLE);
	// attach menu
	m_CmdBar.AttachMenu(GetMenu());
	// load command bar images
	m_CmdBar.LoadImages(IDR_MAINFRAME);
	// remove old menu
	SetMenu(NULL);

	HWND hWndToolBar = CreateSimpleToolBarCtrl(m_hWnd, IDR_MAINFRAME, FALSE, ATL_SIMPLE_TOOLBAR_PANE_STYLE);

	CreateSimpleReBar(ATL_SIMPLE_REBAR_NOBORDER_STYLE);
	AddSimpleReBarBand(hWndCmdBar);
	AddSimpleReBarBand(hWndToolBar, NULL, TRUE);

	CreateSimpleStatusBar();

	m_hWndClient = m_view.Create(m_hWnd, rcDefault, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, WS_EX_CLIENTEDGE);
	m_view.Initialize();
	
#ifdef FTL_DEBUG
	HRESULT hr = E_FAIL;
	CWindowDC dcScreen(NULL);
	m_bitmap.CreateCompatibleBitmap(dcScreen, 100, 100);
	CCapImageObj* pImageObj = new CCapImageObj(TEXT("G:\\TestImage.PNG"), NULL);
	COM_VERIFY(pImageObj->Load(TEXT("G:\\TestImage.PNG")));
	if (SUCCEEDED(hr))
	{
		CNCaptureApplication::Instance()->GetDocument()->SetCurCaptureImage(pImageObj);
	}
#endif

	UIAddToolBar(hWndToolBar);
	UISetCheck(ID_VIEW_TOOLBAR, 1);
	UISetCheck(ID_VIEW_STATUS_BAR, 1);

	// register object for message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->AddMessageFilter(this);
	pLoop->AddIdleHandler(this);

	
	return 0;
}
开发者ID:moon-sky,项目名称:fishjam-template-library,代码行数:49,代码来源:MainFrm.cpp

示例6: SetMenu

LRESULT CMainFrame::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	// create command bar window
	HWND hWndCmdBar = m_CmdBar.Create(m_hWnd, rcDefault, NULL, ATL_SIMPLE_CMDBAR_PANE_STYLE);
	// attach menu
	m_CmdBar.AttachMenu(GetMenu());
	// load command bar images
	m_CmdBar.LoadImages(IDR_MAINFRAME);
	// remove old menu
	SetMenu(NULL);

	HWND hWndToolBar = CreateSimpleToolBarCtrl(m_hWnd, IDR_MAINFRAME, FALSE, ATL_SIMPLE_TOOLBAR_PANE_STYLE);

	CreateSimpleReBar(ATL_SIMPLE_REBAR_NOBORDER_STYLE);
	AddSimpleReBarBand(hWndCmdBar);
	AddSimpleReBarBand(hWndToolBar, NULL, TRUE);

	CString szAddress;
	szAddress.LoadString(IDS_ADDRESS);
	m_URL.Create(m_hWnd,CRect(0,0,0,18),NULL,WS_CHILD|WS_VISIBLE,WS_EX_STATICEDGE);
	AddSimpleReBarBand(m_URL,szAddress.GetBuffer(0),TRUE);
	m_URL.SetFont(AtlGetDefaultGuiFont());
	SHAutoComplete(m_URL,SHACF_URLALL);

	CreateSimpleStatusBar();
	m_StatusBar.SubclassWindow(m_hWndStatusBar);
	int nPanes[]={ID_DEFAULT_PANE,IDR_LOCK,IDR_PROGRESS};
	m_StatusBar.SetPanes(nPanes,sizeof(nPanes)/sizeof(int),false);
	m_StatusBar.SetPaneWidth(IDR_LOCK,30);
	m_StatusBar.SetPaneWidth(IDR_PROGRESS,50);
	
	//TODO: Replace with a URL of your choice
	m_hWndClient = m_view.Create(m_hWnd, rcDefault, _T("about:blank"), WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_HSCROLL | WS_VSCROLL, WS_EX_CLIENTEDGE);

	UIAddToolBar(hWndToolBar);
	UISetCheck(ID_VIEW_TOOLBAR, 1);
	UISetCheck(ID_VIEW_STATUS_BAR, 1);

	// register object for message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->AddMessageFilter(this);
	pLoop->AddIdleHandler(this);

	m_view.GoHome();

	return 0;
}
开发者ID:Nuos,项目名称:codeproject,代码行数:48,代码来源:mainfrm.cpp

示例7: CreateSimpleReBar

LRESULT MainFrameBase::OnCreate(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
   CreateSimpleReBar(ATL_SIMPLE_REBAR_NOBORDER_STYLE);

   SetupCmdbar();
   //SetupToolbar();

   CreateSimpleStatusBar();
   UISetCheck(ID_VIEW_STATUS_BAR, 1);

   SetupMDIClient();

   // register object for message filtering and idle updates
   CMessageLoop* pLoop = _Module.GetMessageLoop();
   ATLASSERT(pLoop != NULL);
   pLoop->AddMessageFilter(this);
   pLoop->AddIdleHandler(this);

   // floating stuff
   InitializeDockingFrame();

   UpdateLayout();

   return 0;
}
开发者ID:vividos,项目名称:MultiplayerOnlineGame,代码行数:25,代码来源:MainFrameBase.cpp

示例8: switch

void CMainFrame::OnOptions( UINT /*uNotifyCode*/, int nID, CWindow /*wndCtl*/ )
{
	bool *pbOption = NULL;

	switch ( nID )
	{
	case ID_OPTIONS_KEEPEXISTING  : pbOption = &m_bKeepExisting;  break;
	case ID_OPTIONS_AUTODETECT    : pbOption = &m_bAutoDetect;    break;
	case ID_OPTIONS_FORCEPROTOCOL : pbOption = &m_bForceProtocol; break;
	case ID_OPTIONS_FILLGAPS      : pbOption = &m_bFillGaps;      break;
	case ID_OPTIONS_AUTOSETUP     : pbOption = &m_bAutoSetup;     break;
	case ID_OPTIONS_FORCEALL      : pbOption = &m_bForceAll;      break;
	case ID_OPTIONS_DISACTIVATE   : pbOption = &m_bDisactivate;   break;
	case ID_OPTIONS_SETSENSORTYPE : pbOption = &m_bSetSensorType; break;
	case ID_OPTIONS_SHORTREADS    : pbOption = &m_bShortReads;    break;
	case ID_OPTIONS_SYNCHRONIZE   : pbOption = &m_bSynchronize;   break;
	case ID_OPTIONS_SYNCH_INTERNAL: pbOption = &m_bSynchInternal; break;
	case ID_OPTIONS_SYNCH_PERIODIC: pbOption = &m_bSynchPeriodic; break;
	case ID_DAC_RECORD            : pbOption = &m_bRecord;        break;
	default : ATLASSERT( false ); break;
	}
	if ( NULL != pbOption )
	{
		*pbOption ^= true;
		UISetCheck( nID, *pbOption );
	}
}
开发者ID:Faham,项目名称:emophiz,代码行数:27,代码来源:mainfrm.cpp

示例9: UISetCheck

void CMainFrame::OnViewStatusBar(UINT uNotifyCode, int nID, CWindow wndCtl)
{
	BOOL bVisible = !::IsWindowVisible(m_hWndStatusBar);
	::ShowWindow(m_hWndStatusBar, bVisible ? SW_SHOWNOACTIVATE : SW_HIDE);
	UISetCheck(ID_VIEW_STATUS_BAR, bVisible);
	UpdateLayout();
}
开发者ID:moon-sky,项目名称:fishjam-template-library,代码行数:7,代码来源:MainFrm.cpp

示例10: UIGetState

LRESULT CMainFrame::OnToolsRepeat(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& /*bHandled*/)
{
	bool bRepeat = UIGetState(wID) &  UPDUI_CHECKED;
	UISetCheck(wID, !bRepeat);
	m_view._bRepeat = bRepeat;
	return 0;
}
开发者ID:amanrenishaw,项目名称:MTConnectGadgets,代码行数:7,代码来源:MainFrm.cpp

示例11: UISetCheck

LRESULT CMainFrame::OnViewStatusBar(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	BOOL bVisible = !::IsWindowVisible(m_hWndStatusBar);
	::ShowWindow(m_hWndStatusBar, bVisible ? SW_SHOWNOACTIVATE : SW_HIDE);
	UISetCheck(ID_VIEW_STATUS_BAR, bVisible);
	UpdateLayout();
	return 0;
}
开发者ID:Nuos,项目名称:codeproject,代码行数:8,代码来源:MainFrm.cpp

示例12: UISetCheck

LRESULT CMiniPieFrame::OnViewAddressBar(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
    VARIANT_BOOL vb;
	m_spIWebBrowser2->get_AddressBar(&vb);
	m_spIWebBrowser2->put_AddressBar(vb == ATL_VARIANT_TRUE ? ATL_VARIANT_FALSE : ATL_VARIANT_TRUE);
	UISetCheck(ID_VIEW_ADDRESSBAR, vb == ATL_VARIANT_FALSE);
	return 0;
}
开发者ID:Bizonu,项目名称:amclibrary,代码行数:8,代码来源:MiniPieFrame.cpp

示例13: UISetCheck

void CMainFrame::OnOptionsUnitType( UINT /*uNotifyCode*/, int nID, CWindow /*wndCtl*/ )
{
	if ( nID == m_idUnitType ) return;

	UISetCheck( m_idUnitType, false );

	switch ( nID )
	{
	case ID_OPTIONS_UNITTYPE_NONE : m_nUnitType = TTLAPI_UT_DEFAULT;  m_nScale = 0.004; break;
	case ID_OPTIONS_UNITTYPE_SENV : m_nUnitType = TTLAPI_UT_SENSVOLT; m_nScale = 0.004; break;
	case ID_OPTIONS_UNITTYPE_ENCV : m_nUnitType = TTLAPI_UT_ENCVOLT;  m_nScale = 1.7;   break;
	case ID_OPTIONS_UNITTYPE_ENCC : m_nUnitType = TTLAPI_UT_COUNT;    m_nScale = 8192;  break;
	default : ATLASSERT( false ); break;
	}

	UISetCheck( m_idUnitType = nID, true );
}
开发者ID:Faham,项目名称:emophiz,代码行数:17,代码来源:mainfrm.cpp

示例14: UISetCheck

LRESULT CMainFrame::OnViewTreePane(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	bool bShow = (m_splitter.GetSinglePaneMode() != SPLIT_PANE_NONE);
	m_splitter.SetSinglePaneMode(bShow ? SPLIT_PANE_NONE : SPLIT_PANE_RIGHT);
	UISetCheck(ID_VIEW_TREEPANE, bShow);

	return 0;
}
开发者ID:bezigon,项目名称:liteide.oldcpp,代码行数:8,代码来源:MainFrm.cpp

示例15: UISetCheck

LRESULT CMainFrame::OnShowVectors(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	bool show = !m_simcontrol.GetShowVectors();
	m_simcontrol.SetShowVectors(show);
	UISetCheck(ID_VIEW_SHOWBALLVECTORS, show);
	UpdateLayout();
	return 0;
}
开发者ID:ebutusov,项目名称:Models,代码行数:8,代码来源:MainFrm.cpp


注:本文中的UISetCheck函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。