[RESOLVED] Change item height in CListBox / CListCtrl - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 24 of 24

Thread: [RESOLVED] Change item height in CListBox / CListCtrl

  1. #16
    Join Date
    Jul 2001
    Posts
    293

    Re: Change item height in CListBox / CListCtrl

    e.g. cursor up/down!

  2. #17
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,380

    Re: Change item height in CListBox / CListCtrl

    Quote Originally Posted by Ralf Schneider View Post
    e.g. cursor up/down!
    Do you mean the Arrow keys like VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN?
    Victor Nijegorodov

  3. #18
    Join Date
    Jul 2001
    Posts
    293

    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.

  4. #19
    Join Date
    Jul 2001
    Posts
    293

    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?

  5. #20
    Join Date
    Jul 2001
    Posts
    293

    Re: Change item height in CListBox / CListCtrl


  6. #21
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,380

    Re: Change item height in CListBox / CListCtrl

    Quote Originally Posted by Ralf Schneider View Post
    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

  7. #22
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,380

    Re: Change item height in CListBox / CListCtrl

    Quote Originally Posted by Ralf Schneider View Post
    Good!
    However, you could found it much faster if you would read MSDN!
    Victor Nijegorodov

  8. #23
    Join Date
    Jul 2001
    Posts
    293

    Re: [RESOLVED] Change item height in CListBox / CListCtrl

    I read msdn, but an older version of IsDialogMessage, where WM_GETDLGCODE was not mentioned....
    grgrggr

  9. #24
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Wallisellen (ZH), Switzerland
    Posts
    17,380

    Re: [RESOLVED] Change item height in CListBox / CListCtrl

    Quote Originally Posted by Ralf Schneider View Post
    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

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center