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. Deleting a CStatic object

Deleting a CStatic object

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

    how to delete a CStatic Object. wt is the correct function? wts the syntax and parameters needed???

    _ T 2 Replies Last reply
    0
    • S SteamEngine

      how to delete a CStatic Object. wt is the correct function? wts the syntax and parameters needed???

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      SteamEngine wrote:

      delete a CStatic Object

      A CStatic object created on the stack within a window is automatically destroyed. If you create the CStatic object on the heap by using new , you must call delete on the object to destroy it when you are done with it. delete myObj; DestroyWindow(); To destroy a C++ Windows object, use DestroyWindow, not "delete". -- modified at 7:07 Monday 31st July, 2006

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      T 1 Reply Last reply
      0
      • S SteamEngine

        how to delete a CStatic Object. wt is the correct function? wts the syntax and parameters needed???

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        SteamEngine wrote:

        how to delete a CStatic Object. wt is the correct function? wts the syntax and parameters needed???

        how did you created it~!

        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

        1 Reply Last reply
        0
        • _ _AnsHUMAN_

          SteamEngine wrote:

          delete a CStatic Object

          A CStatic object created on the stack within a window is automatically destroyed. If you create the CStatic object on the heap by using new , you must call delete on the object to destroy it when you are done with it. delete myObj; DestroyWindow(); To destroy a C++ Windows object, use DestroyWindow, not "delete". -- modified at 7:07 Monday 31st July, 2006

          Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          _AnShUmAn_ wrote:

          f you create the CStatic object on the heap by using new , you must call delete on the object to destroy it when you are done with it. delete myObj;

          naah you have to call delete MyObj after DestroyWindow()

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

          cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

          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