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. General Programming
  3. C#
  4. SendMessage to control with non-fixed ControlID

SendMessage to control with non-fixed ControlID

Scheduled Pinned Locked Moved C#
question
4 Posts 3 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.
  • L Offline
    L Offline
    LordZoster
    wrote on last edited by
    #1

    Hallo I'd need to write into a textbox of an external application. Investigating with Spy++ I found that its controlID changes: the only thing helping to identify it unequivocally is the Class attribute: it is the only control of that Class in that form. How could I address the textbox by this value? Could you post a snippet? Thanks in advance

    F 1 Reply Last reply
    0
    • L LordZoster

      Hallo I'd need to write into a textbox of an external application. Investigating with Spy++ I found that its controlID changes: the only thing helping to identify it unequivocally is the Class attribute: it is the only control of that Class in that form. How could I address the textbox by this value? Could you post a snippet? Thanks in advance

      F Offline
      F Offline
      freakyit
      wrote on last edited by
      #2

      the search is your best friend :) try searching like TextBox Text Win32Api

      L 1 Reply Last reply
      0
      • F freakyit

        the search is your best friend :) try searching like TextBox Text Win32Api

        L Offline
        L Offline
        LordZoster
        wrote on last edited by
        #3

        thank you for the reply, I previously did a search and adapted a snippet found on Stackoverflow.com, but it (and many other examples in the net) shows how to address controls by their handle. In this case, I have a control contained into a modal window addressable by portion of its name (the only part that doesn't change).

        L 1 Reply Last reply
        0
        • L LordZoster

          thank you for the reply, I previously did a search and adapted a snippet found on Stackoverflow.com, but it (and many other examples in the net) shows how to address controls by their handle. In this case, I have a control contained into a modal window addressable by portion of its name (the only part that doesn't change).

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          I guess that would be done using the FindWindowEx[^] function. At least, that way you could retrieve the current handle.

          I are Troll :suss:

          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