Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Save a File from Variant Pin
dabs5-Nov-02 9:07
dabs5-Nov-02 9:07 
GeneralVisual Studio Installer and drivers installation Pin
Susy B.5-Nov-02 5:34
sussSusy B.5-Nov-02 5:34 
GeneralPlease help with networking solutions Pin
Walote5-Nov-02 5:22
Walote5-Nov-02 5:22 
GeneralRe: Please help with networking solutions Pin
valikac5-Nov-02 8:33
valikac5-Nov-02 8:33 
GeneralSerialization question Pin
ns5-Nov-02 5:25
ns5-Nov-02 5:25 
GeneralRe: Serialization question Pin
Ravi Bhavnani5-Nov-02 6:06
professionalRavi Bhavnani5-Nov-02 6:06 
GeneralRe: Serialization question Pin
ns5-Nov-02 6:09
ns5-Nov-02 6:09 
GeneralHelp with ToolTips Pin
Aaron Schaefer5-Nov-02 5:00
Aaron Schaefer5-Nov-02 5:00 
Hi All,

I'm trying to set up tool tips on a CFormView derived view, and I am having a little bit of trouble. I've defined the following in my view class:

// In the message map
ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify)

// Implementation of handler:
// Supply tool tip text when asked by Windows
BOOL CMyView::OnToolTipNotify(UINT id, NMHDR * pNMHDR, LRESULT * pResult)
{
TOOLTIPTEXT *pTTT = (TOOLTIPTEXT *)pNMHDR;
UINT nID =pNMHDR->idFrom;

TRACE("\nTTN_NEEDTEXT, idFrom = %i", nID);

if(pTTT->uFlags & TTF_IDISHWND)
{
// idFrom is actually the HWND of the tool
nID = ::GetDlgCtrlID((HWND)nID);
if(nID)
{
pTTT->lpszText = "Test";
pTTT->hinst = AfxGetResourceHandle();
return(TRUE);
}
}

// Otherwise, what?
TRACE("nHmm . . . ");
return(FALSE);
}

I am getting the HWND's for the static labels on the form, and am able to supply tooltip text for these. However, I have some ActiveX controls (afncy edit boxes), which don't have the ID_ISHWND flag set, and the ID in te NMHDR is not the ID of the control, or anything else I can tell.

Anybody have any ideas how to figure out which control sent the tooltip notification?

Thanks
GeneralGetSafeHwnd() Pin
ns5-Nov-02 4:53
ns5-Nov-02 4:53 
GeneralRe: GetSafeHwnd() Pin
TyMatthews5-Nov-02 6:14
TyMatthews5-Nov-02 6:14 
GeneralRe: GetSafeHwnd() Pin
ns5-Nov-02 6:17
ns5-Nov-02 6:17 
GeneralRe: GetSafeHwnd() Pin
Ravi Bhavnani5-Nov-02 7:32
professionalRavi Bhavnani5-Nov-02 7:32 
GeneralRe: GetSafeHwnd() Pin
ns5-Nov-02 7:36
ns5-Nov-02 7:36 
GeneralRe: GetSafeHwnd() Pin
Ravi Bhavnani5-Nov-02 7:57
professionalRavi Bhavnani5-Nov-02 7:57 
GeneralSQL Wildcard Search Pin
Richard Hudson5-Nov-02 4:47
Richard Hudson5-Nov-02 4:47 
GeneralRe: SQL Wildcard Search Pin
Pete Bassett5-Nov-02 5:48
Pete Bassett5-Nov-02 5:48 
GeneralRe: SQL Wildcard Search Pin
Jon Hulatt5-Nov-02 5:43
Jon Hulatt5-Nov-02 5:43 
GeneralRe: SQL Wildcard Search Pin
Member 15922365-Nov-02 7:53
Member 15922365-Nov-02 7:53 
GeneralRegarding bsc files Pin
cutti5-Nov-02 4:09
cutti5-Nov-02 4:09 
GeneralSockets through Proxy Pin
Pete Bassett5-Nov-02 3:44
Pete Bassett5-Nov-02 3:44 
GeneralRe: Sockets through Proxy Pin
Daniel Turini5-Nov-02 5:03
Daniel Turini5-Nov-02 5:03 
GeneralRe: Sockets through Proxy Pin
Pete Bassett5-Nov-02 5:28
Pete Bassett5-Nov-02 5:28 
GeneralPrinting a dialog box Pin
Brad West5-Nov-02 3:03
Brad West5-Nov-02 3:03 
GeneralRe: Printing a dialog box Pin
dabs5-Nov-02 3:12
dabs5-Nov-02 3:12 
GeneralRe: Printing a dialog box Pin
includeh105-Nov-02 4:55
includeh105-Nov-02 4:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.