Subject: To Ankur,ToolbarCtrl tooltip problem
Posted By: pazzuzu Post Date: 10/19/2004 9:56:33 AM
Hi,

I posted in ur site regarding providing tooltips to the ToolbarCtrl & u gave me an answer.Tried it out but still have some trouble.

Would be nice if you could help me out here.

In the Project,Under the "TabTypes" folder there is the "C_ListPageTemp"
file where Iam creating the toolbar using the "CreateToolBar()"
function.

For the tooltips, I added the
ON_NOTIFY_EX(TTN_NEEDTEXTA,0,ToolTipsHandler), in my message handler &
implemeted the "ToolTipsHandler" as well.

Could anyone show me how to implement the "ToolTipsHandler" function in
the right way so that,I could see some tooltips.

Thanks...

Reply By: Ankur_Verma Reply Date: 10/20/2004 1:57:57 AM
You have to assign idCommand values for your toolbar buttons.
Before that make entries for those IDs in the string table.

        tb[0].fsState = TBSTATE_ENABLED;
        // Setting button style
        tb[0].fsStyle = TBSTYLE_BUTTON;
        tb[0].dwData = 0;
        tb[0].iString = NULL;
        tb[0].idCommand = IDC_CALL_ONE;

        
        // Index of new button image.
        tb[1].iBitmap = 1;   
        // Setting button state
        tb[1].fsState = TBSTATE_ENABLED;
        // Setting button style
        tb[1].fsStyle = TBSTYLE_BUTTON;
        tb[1].dwData = 0;
        tb[1].iString = NULL;    
        tb[1].idCommand = IDC_CALL_TWO;
        

        // Index of new button image.
        tb[2].iBitmap = 2;   
        // Setting button state
        tb[2].fsState = TBSTATE_ENABLED;
        // Setting button style
        tb[2].fsStyle = TBSTYLE_BUTTON;
        tb[2].dwData = 0;
        tb[2].iString = NULL;
        tb[2].idCommand = IDC_CALL_THREE;

            // Index of new button image.
        tb[3].iBitmap = 3;   
        // Setting button state
        tb[3].fsState = TBSTATE_ENABLED;
        // Setting button style
        tb[3].fsStyle = TBSTYLE_BUTTON;
        tb[3].dwData = 0;
        tb[3].idCommand = IDC_CALL_FOUR;
        tb[3].iString = NULL;


Add this code to your hitshandler function

        TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;
        UINT nID =pNMHDR->idFrom;
        pTTT->lpszText = MAKEINTRESOURCE(nID);
        return TRUE;

Reply By: pazzuzu Reply Date: 10/20/2004 7:51:38 AM

Hi,

Regarding my post "ToolbarCtrl tooltip problem",Have 1 more question on it.

I tried to move the toolbarctrl to the right of my Dialog(which is now at the topleft corner of the dialog),So Inside my "CreateToolBar" function did something as follows.

CRect rcParent;     
GetClientRect(&rcParent);        m_toolBarCtrl->MoveWindow(rcParent.left+500,20,300,50);


But the toolbarCtrl still remains at the topleftcorner of the dialog.

Thanks...

Reply By: pazzuzu Reply Date: 10/20/2004 7:57:29 AM

Got it working.Provided "CBRS_SIZE_DYNAMIC" while creating toolbarCtrl......:)


Go to topic 20915

Return to index page 739
Return to index page 738
Return to index page 737
Return to index page 736
Return to index page 735
Return to index page 734
Return to index page 733
Return to index page 732
Return to index page 731
Return to index page 730