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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Controls not showing in Spy++

Controls not showing in Spy++

Scheduled Pinned Locked Moved C / C++ / MFC
comquestion
4 Posts 2 Posters 0 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.
  • M Offline
    M Offline
    mynab
    wrote on last edited by
    #1

    Hello, I would like to programatically drive the Open file dialog of Office 2000/XP. I therefore got the ID of the edit control where one can enter a filename and was looking for the ID of the OK button to send it a BM_CLICK message. However the control does not show up in Spy++: when I drag the Finder tool then the dialog is hilited and not the button. What kind of control can this be? ActiveX? Will I be able to send it a BM_CLICK message (or anyhting else that will validate the change I made in the edit with a WM_SETTEXT)? How? Regards, mynab

    J M 2 Replies Last reply
    0
    • M mynab

      Hello, I would like to programatically drive the Open file dialog of Office 2000/XP. I therefore got the ID of the edit control where one can enter a filename and was looking for the ID of the OK button to send it a BM_CLICK message. However the control does not show up in Spy++: when I drag the Finder tool then the dialog is hilited and not the button. What kind of control can this be? ActiveX? Will I be able to send it a BM_CLICK message (or anyhting else that will validate the change I made in the edit with a WM_SETTEXT)? How? Regards, mynab

      J Offline
      J Offline
      Joel Lucsy
      wrote on last edited by
      #2

      Spy++ sometimes fails to be able to graphically pick certain controls. Look for it in the tree, it'll be there even tho you can pick it off the screen. There's nothing special about the button. In fact, if it's a OK button, then there's a good change the ID is IDOK. Joel Lucsy (jjlucsy@concentric.net)

      M 1 Reply Last reply
      0
      • J Joel Lucsy

        Spy++ sometimes fails to be able to graphically pick certain controls. Look for it in the tree, it'll be there even tho you can pick it off the screen. There's nothing special about the button. In fact, if it's a OK button, then there's a good change the ID is IDOK. Joel Lucsy (jjlucsy@concentric.net)

        M Offline
        M Offline
        mynab
        wrote on last edited by
        #3

        No the control does not appear in the tree either. Even if I spy all the messages and I move the mouse over the button, then the WM_SETCURSOR messages that appear have the HWND of the dialog. If I move the mouse over the Filename RichEdit then the WM_SETCURSOR has a different HWND... Of course I tried GetDlgItem(IDOK) on the dialog but it returns NULL. Seems I am really stuck!

        1 Reply Last reply
        0
        • M mynab

          Hello, I would like to programatically drive the Open file dialog of Office 2000/XP. I therefore got the ID of the edit control where one can enter a filename and was looking for the ID of the OK button to send it a BM_CLICK message. However the control does not show up in Spy++: when I drag the Finder tool then the dialog is hilited and not the button. What kind of control can this be? ActiveX? Will I be able to send it a BM_CLICK message (or anyhting else that will validate the change I made in the edit with a WM_SETTEXT)? How? Regards, mynab

          M Offline
          M Offline
          mynab
          wrote on last edited by
          #4

          Great! I found one working solution... Instead of clicking the OK button (that I can't find) I simulate a VK_RETURN keypress. Works in Office 2000 ; hoping it works in Office XP! ::SendMessage(pEdit->GetSafeHwnd(), WM_KEYDOWN, VK_RETURN, 0x001c0001); ::SendMessage(pEdit->GetSafeHwnd(), WM_CHAR, VK_RETURN, 0x001c0001); ::SendMessage(pEdit->GetSafeHwnd(), WM_KEYUP, VK_RETURN, 0xc01c0001); mynab

          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