本文整理汇总了C++中GetUserToolBarByIndex函数的典型用法代码示例。如果您正苦于以下问题:C++ GetUserToolBarByIndex函数的具体用法?C++ GetUserToolBarByIndex怎么用?C++ GetUserToolBarByIndex使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetUserToolBarByIndex函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: ASSERT
BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle, CWnd* pParentWnd, CCreateContext* pContext)
{
// 기본 클래스가 실제 작업을 수행합니다.
if (!CFrameWndEx::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext))
{
return FALSE;
}
// 모든 사용자 도구 모음에 사용자 지정 단추를 활성화합니다.
BOOL bNameValid;
CString strCustomize;
bNameValid = strCustomize.LoadString(IDS_TOOLBAR_CUSTOMIZE);
ASSERT(bNameValid);
for (int i = 0; i < iMaxUserToolbars; i ++)
{
CMFCToolBar* pUserToolbar = GetUserToolBarByIndex(i);
if (pUserToolbar != NULL)
{
pUserToolbar->EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, strCustomize);
}
}
return TRUE;
}
开发者ID:JonghoonHa,项目名称:Merry,代码行数:27,代码来源:MainFrm.cpp
示例2: ASSERT
BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle, CWnd* pParentWnd, CCreateContext* pContext)
{
// 基类将执行真正的工作
if (!CFrameWndEx::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext))
{
return FALSE;
}
// 为所有用户工具栏启用自定义按钮
BOOL bNameValid;
CString strCustomize;
bNameValid = strCustomize.LoadString(IDS_TOOLBAR_CUSTOMIZE);
ASSERT(bNameValid);
for (int i = 0; i < iMaxUserToolbars; i ++)
{
CMFCToolBar* pUserToolbar = GetUserToolBarByIndex(i);
if (pUserToolbar != NULL)
{
pUserToolbar->EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, strCustomize);
}
}
SetTimer(12,100,NULL); //启动扫描消息驱动
return TRUE;
}
开发者ID:Sirien,项目名称:ChineseChess,代码行数:29,代码来源:MainFrm.cpp
示例3: szCustomize
/// <summary>Loads the frame.</summary>
/// <param name="nIDResource">The n identifier resource.</param>
/// <param name="dwDefaultStyle">The dw default style.</param>
/// <param name="pParentWnd">The p parent WND.</param>
/// <param name="pContext">The p context.</param>
/// <returns></returns>
BOOL MainWnd::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle, CWnd* pParentWnd, CCreateContext* pContext)
{
// base class does the real work
if (!CMDIFrameWndEx::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext))
return FALSE;
// enable customization button for all user toolbars
GuiString szCustomize(IDS_TOOLBAR_CUSTOMIZE);
for (int i = 0; i < iMaxUserToolbars; i ++)
{
CMFCToolBar* pUserToolbar = GetUserToolBarByIndex(i);
if (pUserToolbar != NULL)
pUserToolbar->EnableCustomizeButton(TRUE, ID_VIEW_CUSTOMIZE, szCustomize.c_str());
}
return TRUE;
}
开发者ID:CyberSys,项目名称:X-Studio-2,代码行数:24,代码来源:MainWnd.cpp
示例4: GetUserToolBarByIndex
//**************************************************************************************
BOOL CMainFrame::LoadFrame(UINT nIDResource, DWORD dwDefaultStyle, CWnd* pParentWnd, CCreateContext* pContext)
{
if (!CFrameWndEx::LoadFrame(nIDResource, dwDefaultStyle, pParentWnd, pContext))
{
return FALSE;
}
//----------------------------------------------------
// Enable customization button fore all user toolbars:
//----------------------------------------------------
for (int i = 0; i < iMaxUserToolbars; i ++)
{
CMFCToolBar* pUserToolbar = GetUserToolBarByIndex (i);
if (pUserToolbar != NULL)
{
pUserToolbar->EnableCustomizeButton (TRUE, ID_VIEW_CUSTOMIZE, _T("Customize..."));
}
}
return TRUE;
}
开发者ID:jetlive,项目名称:skiaming,代码行数:22,代码来源:mainfrm.cpp
注:本文中的GetUserToolBarByIndex函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论