Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i add tool tips for a class derived from CControlBar ?

Status
Not open for further replies.

Sun

Programmer
Aug 13, 1999
37
IN
I have a class derived from CControlBar,<br>
i have an object of the class in the mainframe.<br>
I have called that controlbarobject.Create(this)<br>
from mainframe.cpp's OnCreate()<br>
Which calls That CControlBar derived class's <br>
Create() to get called.<br>
in this create() function I have said,<br>
BOOL CDrawingTool::Create(CWnd* pParentWnd)<br>
{<br>
ASSERT_VALID(pParentWnd); // must have a parent<br>
<br>
EnableToolTips(TRUE);<br>
<br>
DWORD dwStyle = (WS_CHILD¦WS_VISIBLE¦CBRS_LEFT¦WS_CLIPSIBLINGS );<br>
m_dwStyle = ( dwStyle & CBRS_ALL) ;<br>
<br>
<br>
LPCTSTR lpszClass = AfxRegisterWndClass ( 0, ::LoadCursor(NULL,IDC_ARROW), (HBRUSH)(COLOR_BTNFACE+1), NULL );<br>
RECT r2;<br>
r2.left = r2.top = r2.right = r2.bottom = 0;<br>
if ( ! CWnd::Create(lpszClass,&quot;Tools&quot;,dwStyle,r2,pParentWnd,101) )<br>
return FALSE;<br>
}<br>
Now I want to add tooltips for this class.<br>
I have used this class to create a toolbar with tools on t,<br>
It looks exactly like the one in Microsoft Paint Brush.<br>
<br>
I would like an answer fast. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top