Click here to Skip to main content
16,005,121 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to use user defined type in other function. Pin
CPallini14-Jun-13 0:42
mveCPallini14-Jun-13 0:42 
QuestionCapturing mouse input outside a dialog Pin
rbrunton12-Jun-13 7:19
rbrunton12-Jun-13 7:19 
GeneralRe: Capturing mouse input outside a dialog Pin
David Crow12-Jun-13 10:19
David Crow12-Jun-13 10:19 
GeneralRe: Capturing mouse input outside a dialog Pin
rbrunton12-Jun-13 11:04
rbrunton12-Jun-13 11:04 
GeneralRe: Capturing mouse input outside a dialog Pin
rbrunton12-Jun-13 11:11
rbrunton12-Jun-13 11:11 
AnswerRe: Capturing mouse input outside a dialog Pin
Erudite_Eric13-Jun-13 1:15
Erudite_Eric13-Jun-13 1:15 
AnswerRe: Capturing mouse input outside a dialog Pin
thanh_bkhn13-Jun-13 16:57
professionalthanh_bkhn13-Jun-13 16:57 
QuestionCToolTipCtrl with TTF_TRACK Flag won't disappear, SetDelayTime doesn't work? Pin
Falconapollo12-Jun-13 0:34
Falconapollo12-Jun-13 0:34 
I found if set TTF_TRACK flag to CTooltipCtrl, SetDelayTime doesn't work anymore, so the tooltip won't disappear automatically. I want to show the tooltip just below specified control, and expect it to disappear after a few seconds(the time can set with SetDelayTime). Anybody can help me?

Here is my steps to construct tool tip:1. Add member variable
CToolTipCtrl m_tooltip;
2. override PreTranslateMessage
BOOL CPF_GetSetNameDlg::PreTranslateMessage( MSG* pMsg )
{
switch (pMsg->message)
{
case WM_KEYDOWN:
case WM_SYSKEYDOWN:
case WM_LBUTTONDOWN:
case WM_RBUTTONDOWN:
case WM_MBUTTONDOWN:
case WM_LBUTTONUP:
case WM_RBUTTONUP:
case WM_MBUTTONUP:
case WM_MOUSEMOVE:
m_tooltip.RelayEvent(pMsg);
break;
}

return CDialog::PreTranslateMessage(pMsg);
}
3. OnInitialDialog
BOOL CPF_GetSetNameDlg::OnInitDialog()
{
CDialog::OnInitDialog();

//tooltip
EnableToolTips();
m_tooltip.Create(this , WS_POPUP | TTS_NOPREFIX | TTS_BALLOON);

m_tooltip.SetDelayTime(TTDT_INITIAL, 0);
m_tooltip.SetDelayTime(TTDT_AUTOPOP, 30000);
m_tooltip.SetDelayTime(TTDT_RESHOW, 30000);
m_tooltip.AddTool(GetDlgItem(IDC_SETNAME), _T(""));

m_tooltip.SetMaxTipWidth(600);
}
4. Control to show tool tip
if(bShow)
{
m_tooltip.UpdateTipText(_T("Hello, money!"), pWnd);
CToolInfo sTinfo;
m_tooltip.GetToolInfo(sTinfo, pWnd);
sTinfo.uFlags = TTF_TRACK;
m_tooltip.SetToolInfo(&sTinfo);

CRect rect;
pWnd->GetWindowRect(rect);
m_tooltip.SendMessage(TTM_TRACKPOSITION, 0, (LPARAM)MAKELONG(rect.left, rect.bottom));
m_tooltip.SendMessage(TTM_TRACKACTIVATE, TRUE, (LPARAM)&sTinfo );
}
QuestionLoadImage error Pin
_Flaviu11-Jun-13 22:04
_Flaviu11-Jun-13 22:04 
AnswerRe: LoadImage error Pin
Jochen Arndt11-Jun-13 22:58
professionalJochen Arndt11-Jun-13 22:58 
GeneralRe: LoadImage error Pin
_Flaviu11-Jun-13 23:24
_Flaviu11-Jun-13 23:24 
GeneralRe: LoadImage error Pin
Jochen Arndt11-Jun-13 23:38
professionalJochen Arndt11-Jun-13 23:38 
GeneralRe: LoadImage error Pin
_Flaviu11-Jun-13 23:51
_Flaviu11-Jun-13 23:51 
GeneralRe: LoadImage error Pin
Jochen Arndt12-Jun-13 0:36
professionalJochen Arndt12-Jun-13 0:36 
GeneralRe: LoadImage error Pin
_Flaviu12-Jun-13 1:01
_Flaviu12-Jun-13 1:01 
QuestionHow can I Get Value of SPDRP_LEGACYBUSTYPE ? Pin
002comp11-Jun-13 20:12
002comp11-Jun-13 20:12 
AnswerRe: How can I Get Value of SPDRP_LEGACYBUSTYPE ? Pin
Jochen Arndt11-Jun-13 21:08
professionalJochen Arndt11-Jun-13 21:08 
GeneralRe: How can I Get Value of SPDRP_LEGACYBUSTYPE ? Pin
002comp11-Jun-13 22:31
002comp11-Jun-13 22:31 
GeneralRe: How can I Get Value of SPDRP_LEGACYBUSTYPE ? Pin
Jochen Arndt11-Jun-13 23:16
professionalJochen Arndt11-Jun-13 23:16 
GeneralRe: How can I Get Value of SPDRP_LEGACYBUSTYPE ? Pin
002comp12-Jun-13 22:12
002comp12-Jun-13 22:12 
GeneralRe: How can I Get Value of SPDRP_LEGACYBUSTYPE ? Pin
Jochen Arndt13-Jun-13 0:27
professionalJochen Arndt13-Jun-13 0:27 
Questioncorrupt __vfptr from dynamic loaded DLL Pin
Joerg Michels11-Jun-13 3:48
Joerg Michels11-Jun-13 3:48 
AnswerRe: corrupt __vfptr from dynamic loaded DLL Pin
Richard MacCutchan11-Jun-13 4:12
mveRichard MacCutchan11-Jun-13 4:12 
AnswerRe: corrupt __vfptr from dynamic loaded DLL Pin
pasztorpisti11-Jun-13 10:58
pasztorpisti11-Jun-13 10:58 
AnswerRe: corrupt __vfptr from dynamic loaded DLL Pin
Freak3012-Jun-13 2:55
Freak3012-Jun-13 2: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.