Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Need help for 2 generic windows programming questions

Need help for 2 generic windows programming questions

Scheduled Pinned Locked Moved IT & Infrastructure
helpquestionlearning
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jerry Hong
    wrote on last edited by
    #1

    I am learning to write Windows program by using C only. Recently, I bumped into 2 problems that I cannot solve, I tried to search the MSDN for help, but got nothing. Hopefully, somebody on this board can give some help. 1. I was designing a dialog box with controls and child windows. I want to use TAB key to navigate the dialog box, but it looks like it always go through the controls first then the child windows. I used a static control to reserve a space on the dialog for my child windows, then I created all the child windows at WM_INITDIALOG. I tried to use DS_CONTROL and WS_EX_CONTROLPARENT style for my child windows, but this only allow the TAB key to tab through the child windows AFTER all the controls on the parent windows. Any help? 2. What's the combo box style that allow the mouse move (up and down) to highlight the selection without click or hold? I saw some applications have this kind of behavior -- after open the dropdown list, move the mouse can scroll the selection. But I cannot get this effect, my mouse movement has no effect at all. Any help very be greatly appreciated. :confused:

    M C 2 Replies Last reply
    0
    • J Jerry Hong

      I am learning to write Windows program by using C only. Recently, I bumped into 2 problems that I cannot solve, I tried to search the MSDN for help, but got nothing. Hopefully, somebody on this board can give some help. 1. I was designing a dialog box with controls and child windows. I want to use TAB key to navigate the dialog box, but it looks like it always go through the controls first then the child windows. I used a static control to reserve a space on the dialog for my child windows, then I created all the child windows at WM_INITDIALOG. I tried to use DS_CONTROL and WS_EX_CONTROLPARENT style for my child windows, but this only allow the TAB key to tab through the child windows AFTER all the controls on the parent windows. Any help? 2. What's the combo box style that allow the mouse move (up and down) to highlight the selection without click or hold? I saw some applications have this kind of behavior -- after open the dropdown list, move the mouse can scroll the selection. But I cannot get this effect, my mouse movement has no effect at all. Any help very be greatly appreciated. :confused:

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      I want to use TAB key to navigate the dialog box, but it looks like it always go through the controls first then the child windows. You need to place your child dialog in the correct spot in the tab order:

      HWND hwndPrevCtrl = ...; // Set this to the control that comes right before the child dialog

      SetWindowPos ( hwndChildDlg, hwndPrevCtrl, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE );

      This resets the child dialog's position in the Z-order, which for dialogs is also the tab order. --Mike-- http://home.inreach.com/mdunn/ Time is an illusion. Lunch time, doubly so.

      1 Reply Last reply
      0
      • J Jerry Hong

        I am learning to write Windows program by using C only. Recently, I bumped into 2 problems that I cannot solve, I tried to search the MSDN for help, but got nothing. Hopefully, somebody on this board can give some help. 1. I was designing a dialog box with controls and child windows. I want to use TAB key to navigate the dialog box, but it looks like it always go through the controls first then the child windows. I used a static control to reserve a space on the dialog for my child windows, then I created all the child windows at WM_INITDIALOG. I tried to use DS_CONTROL and WS_EX_CONTROLPARENT style for my child windows, but this only allow the TAB key to tab through the child windows AFTER all the controls on the parent windows. Any help? 2. What's the combo box style that allow the mouse move (up and down) to highlight the selection without click or hold? I saw some applications have this kind of behavior -- after open the dropdown list, move the mouse can scroll the selection. But I cannot get this effect, my mouse movement has no effect at all. Any help very be greatly appreciated. :confused:

        C Offline
        C Offline
        Carlos Antollini
        wrote on last edited by
        #3

        What's the combo box style that allow the mouse move (up and down) to highlight the selection without click or hold? You need to write and write code using the message WM_MOUSEMOVE. I'm Sorry.:-O Carlos Antollini.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups