000
02.10.2002, 22:49 Uhr
~Mansouu
Gast
|
Wie erstelle und zeige ich die ToolTips für die einzelnen Buttons an? So erstelle ich die ToolBar:
C++: |
CRect rect; GetClientRect(&rect);
CImageList* cImageList = new CImageList; cImageList->Create(IDB_TOOLBAR, 16, 15, 0xFF00FF);
m_ctlToolBar.Create(WS_CHILD | CCS_TOP | TBSTYLE_FLAT | TBSTYLE_TOOLTIPS, rect, this, IDR_TOOLBAR); m_ctlToolBar.SetExtendedStyle(TBSTYLE_EX_DRAWDDARROWS); m_ctlToolBar.SetImageList(cImageList); TBBUTTON* lpButton1 = new TBBUTTON; lpButton1->iBitmap = 0; lpButton1->fsState = TBSTATE_ENABLED; lpButton1->fsStyle = TBSTYLE_BUTTON; m_ctlToolBar.InsertButton(0, lpButton1); m_ctlToolBar.SetCmdID(0, IDM_Button1);
TBBUTTON* lpButton2 = new TBBUTTON; lpButton2->iBitmap = 1; lpButton2->fsState = TBSTATE_ENABLED; lpButton2->fsStyle = TBSTYLE_BUTTON; m_ctlToolBar.InsertButton(1, lpButton2); m_ctlToolBar.SetCmdID(1, IDM_Button2);
m_ctlToolBar.ShowWindow(SW_SHOW);
|
|