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 the handle of a control in properties sheet.

How to get the handle of a control in properties sheet.

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
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.
  • B Offline
    B Offline
    bin8922
    wrote on last edited by
    #1

    Hello, everyone, In my current project, I want to display xp style button(OK, Cancel and apply) in the properties sheet. If I do it using MFC, it would be very easy. I just need to m_btnXPButton.SubclassWindow(GetDlgItem(ID_APPLY_NOW)->m_hWand); But when I tried to do the same thing in ATL, the returned handle for ID_APPLY_NOW (IDOK and IDCANCEL) is NULL. How can I get the handle of a control in the properties sheet written in ATL. Thanks a lot in advance. bin

    D P 2 Replies Last reply
    0
    • B bin8922

      Hello, everyone, In my current project, I want to display xp style button(OK, Cancel and apply) in the properties sheet. If I do it using MFC, it would be very easy. I just need to m_btnXPButton.SubclassWindow(GetDlgItem(ID_APPLY_NOW)->m_hWand); But when I tried to do the same thing in ATL, the returned handle for ID_APPLY_NOW (IDOK and IDCANCEL) is NULL. How can I get the handle of a control in the properties sheet written in ATL. Thanks a lot in advance. bin

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      bin8922 wrote: How can I get the handle of a control in the properties sheet written in ATL. Don't forget about this forum.


      "The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)

      1 Reply Last reply
      0
      • B bin8922

        Hello, everyone, In my current project, I want to display xp style button(OK, Cancel and apply) in the properties sheet. If I do it using MFC, it would be very easy. I just need to m_btnXPButton.SubclassWindow(GetDlgItem(ID_APPLY_NOW)->m_hWand); But when I tried to do the same thing in ATL, the returned handle for ID_APPLY_NOW (IDOK and IDCANCEL) is NULL. How can I get the handle of a control in the properties sheet written in ATL. Thanks a lot in advance. bin

        P Offline
        P Offline
        Prakash Nadar
        wrote on last edited by
        #3

        Does GetdlgItem(...) does not work?


        MSN Messenger. prakashnadar@msn.com Tip of the day of visual C++ IDE. "We use it before you do! Visual C++ was developed using Visual C++"

        B 1 Reply Last reply
        0
        • P Prakash Nadar

          Does GetdlgItem(...) does not work?


          MSN Messenger. prakashnadar@msn.com Tip of the day of visual C++ IDE. "We use it before you do! Visual C++ was developed using Visual C++"

          B Offline
          B Offline
          bin8922
          wrote on last edited by
          #4

          I tried to use GetDlgItem(IDOK), but the returned value is NULL

          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