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:
Julian Smart
2009-05-29 13:32:42 +00:00
parent 421962befc
commit a7d8506b4f

View File

@@ -215,11 +215,17 @@ LRESULT APIENTRY wxToolTipWndProc(HWND hwndTT,
void wxToolTip::Enable(bool flag)
{
// Make sure the tooltip has been created
(void) GetToolTipCtrl();
SendTooltipMessageToAll(ms_hwndTT, TTM_ACTIVATE, flag, 0);
}
void wxToolTip::SetDelay(long milliseconds)
{
// Make sure the tooltip has been created
(void) GetToolTipCtrl();
SendTooltipMessageToAll(ms_hwndTT, TTM_SETDELAYTIME,
TTDT_INITIAL, milliseconds);
}