-
July 2nd, 2014, 06:52 AM
#16
Re: Change item height in CListBox / CListCtrl
-
July 2nd, 2014, 06:58 AM
#17
Re: Change item height in CListBox / CListCtrl
Originally Posted by Ralf Schneider
e.g. cursor up/down!
Do you mean the Arrow keys like VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN?
Victor Nijegorodov
-
July 2nd, 2014, 07:07 AM
#18
Re: Change item height in CListBox / CListCtrl
yes.
Now, I checked it with Spy++.
A WM_KEYDOWN-message was sent to my ctrl-window!
But no WM_KEYUP-message????
Maybe this goes to another window?
If I strike VK_SPACE, I get a WM_KEYDOWN, WM_CHAR and WM_KEYUP message to my ctrl-window.
This is strange for me.
-
July 2nd, 2014, 07:35 AM
#19
Re: Change item height in CListBox / CListCtrl
PreTranslateMessage is called, if VK_DOWN etc. is stroke.
and IsDialogMessage says that the WM_KEYDOWN-message has been processed. But where?
-
July 2nd, 2014, 07:52 AM
#20
Re: Change item height in CListBox / CListCtrl
-
July 2nd, 2014, 07:52 AM
#21
Re: Change item height in CListBox / CListCtrl
Originally Posted by Ralf Schneider
PreTranslateMessage is called, if VK_DOWN etc. is stroke.
and IsDialogMessage says that the WM_KEYDOWN-message has been processed. But where?
From MSDN:
Remarks
Although the IsDialogMessage function is intended for modeless dialog boxes, you can use it with any window that contains controls, enabling the windows to provide the same keyboard selection as is used in a dialog box.
When IsDialogMessage processes a message, it checks for keyboard messages and converts them into selections for the corresponding dialog box. For example, the TAB key, when pressed, selects the next control or group of controls, and the DOWN ARROW key, when pressed, selects the next control in a group.
Because the IsDialogMessage function performs all necessary translating and dispatching of messages, a message processed by IsDialogMessage must not be passed to the TranslateMessage or DispatchMessage function.
IsDialogMessage sends WM_GETDLGCODE messages to the dialog box procedure to determine which keys should be processed.
Perhaps, your arrow keys were processed by the parent to select some other control?
Try the WM_GETDLGCODE (or MFC CWnd::OnGetDlgCode)
Victor Nijegorodov
-
July 2nd, 2014, 08:14 AM
#22
-
July 2nd, 2014, 09:51 AM
#23
Re: [RESOLVED] Change item height in CListBox / CListCtrl
I read msdn, but an older version of IsDialogMessage, where WM_GETDLGCODE was not mentioned....
grgrggr
-
July 2nd, 2014, 10:06 AM
#24
Re: [RESOLVED] Change item height in CListBox / CListCtrl
Originally Posted by Ralf Schneider
I read msdn, but an older version of IsDialogMessage, where WM_GETDLGCODE was not mentioned....
grgrggr
In my old MSDN from October 2000 it IS mentioned in IsDialogMessage article in section "Platform SDK: Windows User Interface".
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|