Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 19th, 2004, 09:56 AM
Authorized User
 
Join Date: Jul 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default To Ankur,ToolbarCtrl tooltip problem

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...

 
Old October 20th, 2004, 01:57 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

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;
 
Old October 20th, 2004, 07:51 AM
Authorized User
 
Join Date: Jul 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default


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...

 
Old October 20th, 2004, 07:57 AM
Authorized User
 
Join Date: Jul 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default


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






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a tooltip Neha XSLT 2 July 14th, 2008 06:21 AM
how to take tooltip object in HTML pushpa ASP.NET 1.0 and 1.1 Basics 6 May 11th, 2007 05:37 PM
tooltip interval??? nerssi HTML Code Clinic 5 August 4th, 2006 12:05 AM
tooltip Lucian Ion Javascript How-To 1 August 1st, 2005 10:52 AM
Tooltip in datagrid lily611 General .NET 11 September 23rd, 2004 04:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.