본문 바로가기

이벤트

[MFC Dialog] PreTranslateMessage 특정 컨트롤러나 Dialog에 이벤트를 주고 싶다. 하면 그냥 이벤트 등록하면 간단한 일이다. 하지만 특정 부분에 대해서, 세세하게 이벤트를 달아주고 싶다면, 이 방법을 써보자. PreTranslateMessage MSDN - Override this function to filter window messages before they are dispatched to the Windows functions TranslateMessage and DispatchMessage The default implementation performs accelerator-key translation, so you must call the CWinApp::PreTranslateMessage member function in.. 더보기
[MFC Dialog] OnKeyDown message afx_msg void OnKeyDown( UINT nChar, UINT nRepCnt, UINT nFlags ); nCharSpecifies the virtual key code of the given key. For a list of of standard virtual key codes, see Winuser.h nRepCntRepeat count (the number of times the keystroke is repeated as a result of the user holding down the key). nFlagsSpecifies the scan code, key-transition code, previous key state, and context code, as shown in the .. 더보기
[MFC Dialog] TreeCtrl에 더블클릭 이벤트 주기 ON_NOTIFY 다이얼로그(대화식 상자)에 이벤트를 주는 방법은 참 쉽다. (' ' 요런식.. 하지만 다르게 해보면 어떨까... 그래서 어떻게 하면 컨트롤에 이벤트를 줄 수 있을까.. 하면서 찾은것이 MESSAGE_MAP에 NOTIFY 메시지를 등록하는 것. ON_NOTIFY( wwNotifyCode, id, memberFxn) id가 바로 해당 controller wNotifyCodeThe code for the notification message to be handled, such as LVN_KEYDOWN. idThe child identifier of the control for which the notification is sent. memberFxnThe member function to be called .. 더보기