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. get idd of object [modifed]

get idd of object [modifed]

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

    HI all :) I have CDerivedStatic class and method :

    void CDerivedStatic::foo()
    {
    ...
    SetDlgItemText( /*How to get ID of current object*/,
    "Some text" );
    ...
    }

    I know I can call the SetWindowText API, but I need this variant :) thank you. -- modified at 13:26 Friday 19th May, 2006

    C D M 3 Replies Last reply
    0
    • B big_denny_200

      HI all :) I have CDerivedStatic class and method :

      void CDerivedStatic::foo()
      {
      ...
      SetDlgItemText( /*How to get ID of current object*/,
      "Some text" );
      ...
      }

      I know I can call the SetWindowText API, but I need this variant :) thank you. -- modified at 13:26 Friday 19th May, 2006

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      It's the ID of the objects that you defined in the resource editor.


      Cédric Moonen Software developer
      Charting control

      1 Reply Last reply
      0
      • B big_denny_200

        HI all :) I have CDerivedStatic class and method :

        void CDerivedStatic::foo()
        {
        ...
        SetDlgItemText( /*How to get ID of current object*/,
        "Some text" );
        ...
        }

        I know I can call the SetWindowText API, but I need this variant :) thank you. -- modified at 13:26 Friday 19th May, 2006

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

        This will work fine:

        void CDerivedStatic::foo()
        {
        SetWindowText("Some text");
        }


        "The largest fire starts but with the smallest spark." - David Crow

        1 Reply Last reply
        0
        • B big_denny_200

          HI all :) I have CDerivedStatic class and method :

          void CDerivedStatic::foo()
          {
          ...
          SetDlgItemText( /*How to get ID of current object*/,
          "Some text" );
          ...
          }

          I know I can call the SetWindowText API, but I need this variant :) thank you. -- modified at 13:26 Friday 19th May, 2006

          M Offline
          M Offline
          Michael Dunn
          wrote on last edited by
          #4

          If that class is derived from CStatic, just call SetWindowText()

          --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

          B 1 Reply Last reply
          0
          • M Michael Dunn

            If that class is derived from CStatic, just call SetWindowText()

            --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

            B Offline
            B Offline
            big_denny_200
            wrote on last edited by
            #5

            I know Ican call SetWindowText API, but I need to get ID of current instance ? thank you.

            M 1 Reply Last reply
            0
            • B big_denny_200

              I know Ican call SetWindowText API, but I need to get ID of current instance ? thank you.

              M Offline
              M Offline
              Michael Dunn
              wrote on last edited by
              #6

              GetDlgCtrlID()

              --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

              B 1 Reply Last reply
              0
              • M Michael Dunn

                GetDlgCtrlID()

                --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

                B Offline
                B Offline
                big_denny_200
                wrote on last edited by
                #7

                thanks

                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