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#
  4. Win32 CEdit class?

Win32 CEdit class?

Scheduled Pinned Locked Moved C#
csharpcomquestion
2 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.
  • W Offline
    W Offline
    wbjohnson
    wrote on last edited by
    #1

    Hey guys just another quicky, i want a simple way of discovering all "text boxes" on an application via interop... i figured that getting the class name would work.... mmm kinda, some control give me: Class: Edit but apps wrote in .net give me: Class: WindowsForms10.EDIT.app.0.3b95145 if there another way of asking if this hWnd IntPtr a textbox (edit) control? Cheers Will

    N 1 Reply Last reply
    0
    • W wbjohnson

      Hey guys just another quicky, i want a simple way of discovering all "text boxes" on an application via interop... i figured that getting the class name would work.... mmm kinda, some control give me: Class: Edit but apps wrote in .net give me: Class: WindowsForms10.EDIT.app.0.3b95145 if there another way of asking if this hWnd IntPtr a textbox (edit) control? Cheers Will

      N Offline
      N Offline
      Nader Elshehabi
      wrote on last edited by
      #2

      Hello With this way you are trying to access CEdit controls which differs from Edit control in one simple fact, CEdits are made by MFC, while the Edit scope is much larger. Each CEdit is a windows Edit control but not vise versa. To identify an Edit control -whether CEdit, C# Edit, or whatever...-, you should sen a EM_ message specific to it. If it give you a respond, then it supports this message and it's an Edit control. If not then the probability goes that it's not an edit control. Much harder, but more sensitive to Edit sontrols. Of course carful choice of the EM_ message you'd send is important. I don't have any in mind, but you should search windows messages for the best one -even if it was not an EM_ message-. Try EM_GETLIMITTEXT for a start. If it returns a number larger than zero, you are probably in a valid esit control.

      Regards:rose:

      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