Ensure the tooltip has been created before enabling or setting the delay, or they will be no-ops.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -215,11 +215,17 @@ LRESULT APIENTRY wxToolTipWndProc(HWND hwndTT,
|
|||||||
|
|
||||||
void wxToolTip::Enable(bool flag)
|
void wxToolTip::Enable(bool flag)
|
||||||
{
|
{
|
||||||
|
// Make sure the tooltip has been created
|
||||||
|
(void) GetToolTipCtrl();
|
||||||
|
|
||||||
SendTooltipMessageToAll(ms_hwndTT, TTM_ACTIVATE, flag, 0);
|
SendTooltipMessageToAll(ms_hwndTT, TTM_ACTIVATE, flag, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolTip::SetDelay(long milliseconds)
|
void wxToolTip::SetDelay(long milliseconds)
|
||||||
{
|
{
|
||||||
|
// Make sure the tooltip has been created
|
||||||
|
(void) GetToolTipCtrl();
|
||||||
|
|
||||||
SendTooltipMessageToAll(ms_hwndTT, TTM_SETDELAYTIME,
|
SendTooltipMessageToAll(ms_hwndTT, TTM_SETDELAYTIME,
|
||||||
TTDT_INITIAL, milliseconds);
|
TTDT_INITIAL, milliseconds);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user