// simply check m_oldWndProc
m_oldWndProc = NULL;
}
+
+ // we're officially created now, send the event
+ wxWindowCreateEvent event((wxWindow *)this);
+ (void)GetEventHandler()->ProcessEvent(event);
}
void wxWindowMSW::UnsubclassWin()
#if defined(__WXWINCE__)
UINT flags = 0;
#else
- UINT flags = TPM_RIGHTBUTTON;
+ UINT flags = TPM_RIGHTBUTTON | TPM_RECURSE;
#endif
::TrackPopupMenu(hMenu, flags, point.x, point.y, 0, hWnd, NULL);
// relay mouse move events to the tooltip control
MSG *msg = (MSG *)pMsg;
if ( msg->message == WM_MOUSEMOVE )
- m_tooltip->RelayEvent(pMsg);
+ wxToolTip::RelayEvent(pMsg);
}
#endif // wxUSE_TOOLTIPS
case VK_SUBTRACT:
case VK_MULTIPLY:
case VK_DIVIDE:
+ case VK_NUMPAD0:
+ case VK_NUMPAD1:
+ case VK_NUMPAD2:
+ case VK_NUMPAD3:
+ case VK_NUMPAD4:
+ case VK_NUMPAD5:
+ case VK_NUMPAD6:
+ case VK_NUMPAD7:
+ case VK_NUMPAD8:
+ case VK_NUMPAD9:
case VK_OEM_1:
case VK_OEM_2:
case VK_OEM_3:
EnsureParentHasControlParentStyle(GetParent());
#endif // !__WXWINCE__
- // TODO: should generate this event from WM_NCCREATE
- wxWindowCreateEvent event((wxWindow *)this);
- (void)GetEventHandler()->ProcessEvent(event);
-
*mayCreate = true;
return true;
int id;
if ( isASCII )
{
- // If 1 -> 26, translate to either special keycode or just set
- // ctrlDown. IOW, Ctrl-C should result in keycode == 3 and
- // ControlDown() == true.
id = wParam;
- if ( (id > 0) && (id < 27) )
- {
- switch (id)
- {
- case 13:
- id = WXK_RETURN;
- break;
-
- case 8:
- id = WXK_BACK;
- break;
-
- case 9:
- id = WXK_TAB;
- break;
-
- default:
- //ctrlDown = true;
- break;
- }
- }
}
else // we're called from WM_KEYDOWN
{
- id = wxCharCodeMSWToWX(wParam, lParam);
+ // don't pass lParam to wxCharCodeMSWToWX() here because we don't want
+ // to get numpad key codes: CHAR events should use the logical keys
+ // such as WXK_HOME instead of WXK_NUMPAD_HOME which is for KEY events
+ id = wxCharCodeMSWToWX(wParam);
if ( id == 0 )
{
// it's ASCII and will be processed here only when called from
id = wParam;
}
- if ( id != -1 ) // VZ: does this ever happen (FIXME)?
- {
- wxKeyEvent event(CreateKeyEvent(wxEVT_KEY_DOWN, id, lParam, wParam));
- if ( GetEventHandler()->ProcessEvent(event) )
- {
- return true;
- }
- }
-
- return false;
+ wxKeyEvent event(CreateKeyEvent(wxEVT_KEY_DOWN, id, lParam, wParam));
+ return GetEventHandler()->ProcessEvent(event);
}
bool wxWindowMSW::HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam)
id = wParam;
}
- if ( id != -1 ) // VZ: does this ever happen (FIXME)?
- {
- wxKeyEvent event(CreateKeyEvent(wxEVT_KEY_UP, id, lParam, wParam));
- if ( GetEventHandler()->ProcessEvent(event) )
- return true;
- }
-
- return false;
+ wxKeyEvent event(CreateKeyEvent(wxEVT_KEY_UP, id, lParam, wParam));
+ return GetEventHandler()->ProcessEvent(event);
}
int wxWindowMSW::HandleMenuChar(int WXUNUSED_IN_WINCE(chAccel),
return wxNOT_FOUND;
}
+bool wxWindowMSW::HandleClipboardEvent( WXUINT nMsg )
+{
+ const wxEventType type = ( nMsg == WM_CUT ) ? wxEVT_COMMAND_TEXT_CUT :
+ ( nMsg == WM_COPY ) ? wxEVT_COMMAND_TEXT_COPY :
+ /*( nMsg == WM_PASTE ) ? */ wxEVT_COMMAND_TEXT_PASTE;
+ wxClipboardTextEvent evt(type, GetId());
+
+ evt.SetEventObject(this);
+
+ return GetEventHandler()->ProcessEvent(evt);
+}
+
// ---------------------------------------------------------------------------
// joystick
// ---------------------------------------------------------------------------