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. vc++

vc++

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++architecture
12 Posts 8 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.
  • G GANsJob

    Hi, Im working in doc-view architecture .' the problem is when closing the project using syscommand 'close' in the title bar I have to call some fns. I have tried to catch WM_CLOSE IN view class but it doesnt work. so need some help regards, Murugan

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

    You can definetly give a call to your functions in OnClose function. Where have you got stuck? Somethings seem HARD to do, until we know how to do them. ;-) _AnShUmAn_

    1 Reply Last reply
    0
    • G GANsJob

      Hi, Im working in doc-view architecture .' the problem is when closing the project using syscommand 'close' in the title bar I have to call some fns. I have tried to catch WM_CLOSE IN view class but it doesnt work. so need some help regards, Murugan

      L Offline
      L Offline
      Laxman Auti
      wrote on last edited by
      #3

      Override the Exitinstance Method. Knock out 't' from can't, You can if you think you can :cool:

      T 1 Reply Last reply
      0
      • G GANsJob

        Hi, Im working in doc-view architecture .' the problem is when closing the project using syscommand 'close' in the title bar I have to call some fns. I have tried to catch WM_CLOSE IN view class but it doesnt work. so need some help regards, Murugan

        N Offline
        N Offline
        Naveen
        wrote on last edited by
        #4

        catch WM_CLOSE in the CMainFrame class nave

        G S 2 Replies Last reply
        0
        • N Naveen

          catch WM_CLOSE in the CMainFrame class nave

          G Offline
          G Offline
          GANsJob
          wrote on last edited by
          #5

          ya it working with frame class thank u

          1 Reply Last reply
          0
          • L Laxman Auti

            Override the Exitinstance Method. Knock out 't' from can't, You can if you think you can :cool:

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

            A_Laxman wrote:

            Override the Exitinstance Method.

            ExitInstance is for application, not for View

            "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

            L D 3 Replies Last reply
            0
            • T ThatsAlok

              A_Laxman wrote:

              Override the Exitinstance Method.

              ExitInstance is for application, not for View

              "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

              L Offline
              L Offline
              Laxman Auti
              wrote on last edited by
              #7

              GANsJob wrote:

              When closing the project using syscommand 'close' in the title bar

              what is the meaning of this???:~ Knock out 't' from can't, You can if you think you can :cool:

              M 1 Reply Last reply
              0
              • L Laxman Auti

                GANsJob wrote:

                When closing the project using syscommand 'close' in the title bar

                what is the meaning of this???:~ Knock out 't' from can't, You can if you think you can :cool:

                M Offline
                M Offline
                Maxwell Chen
                wrote on last edited by
                #8

                button at top-right corner of a window.


                Maxwell Chen

                1 Reply Last reply
                0
                • T ThatsAlok

                  A_Laxman wrote:

                  Override the Exitinstance Method.

                  ExitInstance is for application, not for View

                  "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

                  L Offline
                  L Offline
                  Laxman Auti
                  wrote on last edited by
                  #9

                  Maxwell Chen wrote:

                  button at top-right corner of a window.

                  Alok wrote:

                  ExitInstance is for application, not for View

                  am i right alok, that Maxwell want to do something when he exit from the project?:) Knock out 't' from can't, You can if you think you can :cool:

                  1 Reply Last reply
                  0
                  • T ThatsAlok

                    A_Laxman wrote:

                    Override the Exitinstance Method.

                    ExitInstance is for application, not for View

                    "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

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

                    ThatsAlok wrote:

                    ExitInstance is for application, not for View

                    The requirement was "when closing the project...I have to call some fns." Calling those functions in ExitInstance() satisfies that requirement.


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

                    1 Reply Last reply
                    0
                    • N Naveen

                      catch WM_CLOSE in the CMainFrame class nave

                      S Offline
                      S Offline
                      SharanyaMahi
                      wrote on last edited by
                      #11

                      1. Add WM_CLOSE() in message map. 2. Add afx_msg void OnClose() function to that class. 3. Add the functionality u want to perform in that function on close of application.

                      N 1 Reply Last reply
                      0
                      • S SharanyaMahi

                        1. Add WM_CLOSE() in message map. 2. Add afx_msg void OnClose() function to that class. 3. Add the functionality u want to perform in that function on close of application.

                        N Offline
                        N Offline
                        Naveen
                        wrote on last edited by
                        #12

                        Sharanya.. this post is 5 years old.. :)

                        nave [My Articles] [My Blog]

                        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