Xtreme Toolkit 常用代碼

來源:互聯網
上載者:User

 m_myStatic_MenuIcon.Create(_T(""), WS_CHILD|WS_VISIBLE|SS_BITMAP|SS_CENTERIMAGE, CRect(5,5,24,24), pMenuBar,0x1234);
m_myStatic_MenuIcon.SetBitmap(::LoadBitmap(AfxGetApp()->m_hInstance,(LPCTSTR)IDB_BITMAP1));

XTP_COMMANDBARS_ICONSINFO* pIconsInfo = XTPPaintManager()->GetIconsInfo();//設定表徵圖的一些屬性
pIconsInfo->bUseDisabledIcons =TRUE;
pIconsInfo->bIconsWithShadow = FALSE;
pIconsInfo->bUseFadedIcons=TRUE;

RedrawWindow(0, 0, RDW_INVALIDATE|RDW_UPDATENOW|RDW_ERASE|RDW_ALLCHILDREN);   
GetCommandBars()->GetPaintManager()->RefreshMetrics(); 
GetCommandBars()->RedrawCommandBars();

ModifyStyle(WS_THICKFRAME,0);
ModifyStyle(0,WS_THICKFRAME);//去掉狀態列下面拖動的Gripper

pMenuBar->ModifyBarStyle(CBRS_GRIPPER,0);//去掉菜單或工具條前面的Gripper
pMenuBar->EnableDocking(xtpFlagHideWrap | xtpFlagStretched);//菜單或工具條延伸

CXTPCommandBarsOptions* pOptions = pCommandBars->GetCommandBarsOptions();
pOptions->bShowExpandButtonAlways=FALSE;//不顯示擴充按鈕

pToolBar->ShowTextBelowIcons();//字顯示在工具條表徵圖下面

//設定功能表項目前面小表徵圖
UINT nCommands[] ={ID_TASKS_BEGIN,ID_TASKS_STOP,ID_NEW_DOWNLOAD,ID_TASKS_DELETE,
ID_OPEN_PATH,ID_HELP,ID_HOMEPAGE,ID_APP_EXIT,ID_TASKS_UP,ID_TASKS_DOWN};
 XTPImageManager()->SetIcons(IDB_SmallIcon, nCommands, sizeof(nCommands)/sizeof(UINT), CSize(16, 16) );

//設定皮膚和樣式
XTPPaintManager()->SetCustomTheme(new CWinMountTheme());//自己寫的新的樣式類
XTPPaintManager()->SetTheme(xtpThemeNativeWinXP);//系統內建的

//在所有視窗的上面
SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOREPOSITION | SWP_NOMOVE );

//子視窗一直在主視窗下面
CChildDlg *pdlg;
pdlg=new CChildDlg;
pdlg->Create(IDD_DIALOG1,GetDesktopWindow());
pdlg->SetWindowPos(this,0,0,30,50,SWP_NOSIZE);
pdlg->ShowWindow(SW_SHOW);
CWnd*   pMainWnd   =   AfxGetMainWnd();
pMainWnd->SetWindowPos(&wndTopMost,  0,  0,  0, 0, SWP_NOSIZE|SWP_NOMOVE);
 
 
 
   

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.