CXTPToolTipContext on Dialog |
Post Reply |
Author | |
jimmy
Senior Member Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
Posted: 22 January 2009 at 9:11am |
Hello,
CJ: V1202 I've a MainDialog, hat have a CXTPToolTipContext tooltip. OnInitDialog() CDialog::EnableToolTips(); m_moduleContext.SetModuleToolTipContext(); I use this function from one of your sample to get the window handle. INT_PTR CMainDlg::OnToolHitTest(CPoint point, TOOLINFO* pTI) const { HWND hWndChild = NULL; // find child window which hits the point // (don't use WindowFromPoint, because it ignores disabled windows) // see _AfxChildWindowFromPoint(m_hWnd, point); ::ClientToScreen(m_hWnd, &point); HWND hChild = ::GetWindow(m_hWnd, GW_CHILD); for (; hChild != NULL; hChild = ::GetWindow(hChild, GW_HWNDNEXT)) { if ((UINT)(WORD)::GetDlgCtrlID(hChild) != (WORD)-1 && (::GetWindowLong(hChild, GWL_STYLE) & WS_VISIBLE)) { // see if point hits the child window CRect rect; ::GetWindowRect(hChild, rect); if (rect.PtInRect(point)) { hWndChild = hChild; break; } } } But if i open a other dialog. vodi OnButClick() { CDlgTest dlg; dlg.DoModal(); } and move the mouse over this dialog, the tooltip from MainDlg will be show. Because it does not use WindowFromPoint. Jimmy |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Do you see same in Samples\CommandBars\ToolTipContext sample ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jimmy
Senior Member Joined: 11 November 2003 Location: Austria Status: Offline Points: 516 |
Post Options
Thanks(0)
|
Hi Oleg,
I've write a small sample, but in this there are not same error. The different is, that our application receive a WM_NCMOUSEMOVE message, when i move over the border of a EDIT field on CDlgTest. And in the Sample i don't receivethis message. ToolkitPro1202vc71D.dll!CXTPToolTipContext::FilterToolTipMessageHelper(CWnd * pWndHost=0x0012dc00, tagMSG * pMsg=0x001540e8, int bIgnoreFlags=0) Zeile 1947 C++ ToolkitPro1202vc71D.dll!CXTPToolTipContext::FilterToolTipMessageStatic(tagMSG * pMsg=0x001540e8, CWnd * pWnd=0x0012dc00) Zeile 1879 C++ mfc71d.dll!CWnd::PreTranslateMessage(tagMSG * pMsg=0x001540e8) Zeile 1051 C++ mfc71d.dll!CDialog::PreTranslateMessage(tagMSG * pMsg=0x001540e8) Zeile 59 + 0xc C++ mfc71d.dll!CWnd::WalkPreTranslateTree(HWND__ * hWndStop=0x000703f4, tagMSG * pMsg=0x001540e8) Zeile 3129 + 0x12 C++ > mfc71d.dll!AfxInternalPreTranslateMessage(tagMSG * pMsg=0x001540e8) Zeile 238 + 0x12 C++ mfc71d.dll!CWinThread::PreTranslateMessage(tagMSG * pMsg=0x001540e8) Zeile 795 + 0x9 C++ mfc71d.dll!AfxPreTranslateMessage(tagMSG * pMsg=0x001540e8) Zeile 257 + 0xf C++ mfc71d.dll!AfxInternalPumpMessage() Zeile 183 + 0x18 C++ mfc71d.dll!CWinThread::PumpMessage() Zeile 916 C++ mfc71d.dll!AfxPumpMessage() Zeile 195 + 0xb C++ mfc71d.dll!CWnd::RunModalLoop(unsigned long dwFlags=4) Zeile 4566 + 0x5 C++ mfc71d.dll!CDialog::DoModal() Zeile 527 + 0xc C++ CompactFlashFloppyTool.exe!CPlcFloppyFlashManagerDlg::OnBnClickedButTestCF() Zeile 1087 C++ mfc71d.dll!_AfxDispatchCmdMsg(CCmdTarget * pTarget=0x0012ec68, unsigned int nID=1120, int nCode=0, void (void)* pfn=0x0043ab11, void * pExtra=0x00000000, unsigned int nSig=53, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Zeile 89 C++ mfc71d.dll!CCmdTarget::OnCmdMsg(unsigned int nID=1120, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Zeile 396 + 0x27 C++ mfc71d.dll!CDialog::OnCmdMsg(unsigned int nID=1120, int nCode=0, void * pExtra=0x00000000, AFX_CMDHANDLERINFO * pHandlerInfo=0x00000000) Zeile 88 + 0x18 C++ mfc71d.dll!CWnd::OnCommand(unsigned int wParam=1120, long lParam=1049602) Zeile 2550 C++ mfc71d.dll!CWnd::OnWndMsg(unsigned int message=273, unsigned int wParam=1120, long lParam=1049602, long * pResult=0x0012e284) Zeile 1759 + 0x1c C++ CompactFlashFloppyTool.exe!CXTPDialogBase<CXTResizeDialog>::OnWndMsg(unsigned int message=273, unsigned int wParam=1120, long lParam=1049602, long * pResult=0x0012e284) Zeile 193 C++ CompactFlashFloppyTool.exe!CExResizeDialog::OnWndMsg(unsigned int message=273, unsigned int wParam=1120, long lParam=1049602, long * pResult=0x0012e284) Zeile 316 + 0x18 C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=273, unsigned int wParam=1120, long lParam=1049602) Zeile 1745 + 0x1e C++ CompactFlashFloppyTool.exe!CDeviceNotification<CExResizeDialog>::WindowProc(unsigned int message=273, unsigned int wParam=1120, long lParam=1049602) Zeile 96 C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x0012ec68, HWND__ * hWnd=0x000703f4, unsigned int nMsg=273, unsigned int wParam=1120, long lParam=1049602) Zeile 241 + 0x1a C++ mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x000703f4, unsigned int nMsg=273, unsigned int wParam=1120, long lParam=1049602) Zeile 389 C++ mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x000703f4, unsigned int nMsg=273, unsigned int wParam=1120, long lParam=1049602) Zeile 209 + 0x15 C++ user32.dll!7e368734() user32.dll!7e368816() user32.dll!7e36882a() user32.dll!7e37927b() user32.dll!7e3792e3() comctl32.dll!773c7354() comctl32.dll!773c7436() comctl32.dll!773c973b() mfc71d.dll!AfxUnlockGlobals(int nLockType=1049602) Zeile 112 C++ user32.dll!7e368734() user32.dll!7e368816() mfc71d.dll!ATL::CTraceFileAndLineInfo::operator()(unsigned long dwCategory=2000457396, unsigned int nLevel=1049602, const char * pszFmt=0x00000202, ...) Zeile 163 + 0x27 C++ user32.dll!7e37a013() user32.dll!7e37a998() mfc71d.dll!CWnd::DefWindowProcA(unsigned int nMsg=514, unsigned int wParam=0, long lParam=655434) Zeile 1024 + 0x20 C++ mfc71d.dll!CWnd::WindowProc(unsigned int message=514, unsigned int wParam=0, long lParam=655434) Zeile 1746 + 0x1a C++ mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x0012f604, HWND__ * hWnd=0x00100402, unsigned int nMsg=514, unsigned int wParam=0, long lParam=655434) Zeile 241 + 0x1a C++ mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x00100402, unsigned int nMsg=514, unsigned int wParam=0, long lParam=655434) Zeile 389 C++ mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x00100402, unsigned int nMsg=514, unsigned int wParam=0, long lParam=655434) Zeile 209 + 0x15 C++ user32.dll!7e368734() user32.dll!7e368816() user32.dll!7e37b326() user32.dll!7e3689cd() user32.dll!7e381b7c() user32.dll!7e368a10() user32.dll!7e3774ff() user32.dll!7e38c6d3() mfc71d.dll!CWnd::IsDialogMessageA(tagMSG * lpMsg=0x001540e8) Zeile 200 C++ mfc71d.dll!CWnd::PreTranslateInput(tagMSG * lpMsg=0x001540e8) Zeile 4512 C++ mfc71d.dll!CDialog::PreTranslateMessage(tagMSG * pMsg=0x001540e8) Zeile 83 C++ CompactFlashFloppyTool.exe!CXTPDialogBase<CXTResizeDialog>::PreTranslateMessage(tagMSG * pMsg=0x001540e8) Zeile 181 + 0xc C++ mfc71d.dll!CWnd::WalkPreTranslateTree(HWND__ * hWndStop=0x000703f4, tagMSG * pMsg=0x001540e8) Zeile 3129 + 0x12 C++ mfc71d.dll!AfxInternalPreTranslateMessage(tagMSG * pMsg=0x001540e8) Zeile 238 + 0x12 C++ mfc71d.dll!CWinThread::PreTranslateMessage(tagMSG * pMsg=0x001540e8) Zeile 795 + 0x9 C++ mfc71d.dll!AfxPreTranslateMessage(tagMSG * pMsg=0x001540e8) Zeile 257 + 0xf C++ mfc71d.dll!AfxInternalPumpMessage() Zeile 183 + 0x18 C++ mfc71d.dll!CWinThread::PumpMessage() Zeile 916 C++ mfc71d.dll!AfxPumpMessage() Zeile 195 + 0xb C++ mfc71d.dll!CWnd::RunModalLoop(unsigned long dwFlags=4) Zeile 4566 + 0x5 C++ mfc71d.dll!CDialog::DoModal() Zeile 527 + 0xc C++ CompactFlashFloppyTool.exe!CPlcFloppyFlashManagerApp::InitInstance() Zeile 61 + 0xb C++ mfc71d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f2d, int nCmdShow=1) Zeile 39 + 0xb C++ CompactFlashFloppyTool.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00151f2d, int nCmdShow=1) Zeile 25 C++ CompactFlashFloppyTool.exe!WinMainCRTStartup() Zeile 390 + 0x39 C kernel32.dll!7c817067() ntdll.dll!7c925d27() Jimmy |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |