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 / C++ / MFC
  4. How to get handle of control ?

How to get handle of control ?

Scheduled Pinned Locked Moved C / C++ / MFC
csharpcomjsontutorial
5 Posts 4 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.
  • D Offline
    D Offline
    dlhson
    wrote on last edited by
    #1

    Some Window Engine in this page is very good (use API function: WindowFromPoint()) . But I can't use it for my purpose: -Get handle of a "static " (label) created in Visual Basic 6.0. It seems VB label is drawn onto screen, not be a control (so you can't get its handle). Can you give me an answer ? Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

    N P C 3 Replies Last reply
    0
    • D dlhson

      Some Window Engine in this page is very good (use API function: WindowFromPoint()) . But I can't use it for my purpose: -Get handle of a "static " (label) created in Visual Basic 6.0. It seems VB label is drawn onto screen, not be a control (so you can't get its handle). Can you give me an answer ? Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      dlhson wrote: It seems VB label is drawn onto screen, not be a control I think the VB label is a STATIC control. I might be wrong here. But that's my impression. Nish


      The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?

      1 Reply Last reply
      0
      • D dlhson

        Some Window Engine in this page is very good (use API function: WindowFromPoint()) . But I can't use it for my purpose: -Get handle of a "static " (label) created in Visual Basic 6.0. It seems VB label is drawn onto screen, not be a control (so you can't get its handle). Can you give me an answer ? Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

        P Offline
        P Offline
        Paul M Watt
        wrote on last edited by
        #3

        You are correct, the VB label is not a control. The form draws it. My guess this is to reduce the number of controls that VB programmers place on a form, since you are only allowed to have 255 declared in a resource file. What purposes do you want to have the handle to the label in VB? Depending on what you plan on doing, there are options.


        Checkout my Guide to Win32 Paint for Intermediates

        1 Reply Last reply
        0
        • D dlhson

          Some Window Engine in this page is very good (use API function: WindowFromPoint()) . But I can't use it for my purpose: -Get handle of a "static " (label) created in Visual Basic 6.0. It seems VB label is drawn onto screen, not be a control (so you can't get its handle). Can you give me an answer ? Hung Son A Vietnamese student i-g.hypermart.net dlhson2001@yahoo.com

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

          control.hwnd Best Regards Carlos Antollini. Sonork ID 100.10529 cantollini

          C 1 Reply Last reply
          0
          • C Carlos Antollini

            control.hwnd Best Regards Carlos Antollini. Sonork ID 100.10529 cantollini

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

            I'm sorry I thinked that you was talking about VB... If you want to Know the HWND of the label, you must to use the label like a CWnd, and asign it with CWnd::GetDlgItem. You can get the handle with the data memeber CWnd::m_hWnd...;) Best Regards... Carlos Antollini. Sonork ID 100.10529 cantollini

            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