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. MFC application does not open up

MFC application does not open up

Scheduled Pinned Locked Moved C / C++ / MFC
c++helptutorialquestion
10 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
    Boaz V
    wrote on last edited by
    #1

    Hi, After changing alot of code in my MFC application, it is no longer opens up. Compile has no errors or warnings. It seems that the program DOES load, but exit immediatly. Any idea where to look for? Any idea where i can put a break point to help me catch it? How to define an entry point?

    M V B 3 Replies Last reply
    0
    • B Boaz V

      Hi, After changing alot of code in my MFC application, it is no longer opens up. Compile has no errors or warnings. It seems that the program DOES load, but exit immediatly. Any idea where to look for? Any idea where i can put a break point to help me catch it? How to define an entry point?

      M Offline
      M Offline
      Marc Soleda
      wrote on last edited by
      #2

      If you have a dialog based app you could look into the InitInstance method and add a breakpoint where you call the DoModal method. If the problem is inside the dialog class then begin looking into OnInitDialog method. Hope it helps, Marc Soleda. ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.

      B 1 Reply Last reply
      0
      • M Marc Soleda

        If you have a dialog based app you could look into the InitInstance method and add a breakpoint where you call the DoModal method. If the problem is inside the dialog class then begin looking into OnInitDialog method. Hope it helps, Marc Soleda. ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.

        B Offline
        B Offline
        Boaz V
        wrote on last edited by
        #3

        I've put a breakpoint in that function. Does not reach there.... debuger did not stop there.

        M 1 Reply Last reply
        0
        • B Boaz V

          I've put a breakpoint in that function. Does not reach there.... debuger did not stop there.

          M Offline
          M Offline
          Marc Soleda
          wrote on last edited by
          #4

          Does it reach the constructor of the app? Marc Soleda. ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.

          B 1 Reply Last reply
          0
          • B Boaz V

            Hi, After changing alot of code in my MFC application, it is no longer opens up. Compile has no errors or warnings. It seems that the program DOES load, but exit immediatly. Any idea where to look for? Any idea where i can put a break point to help me catch it? How to define an entry point?

            V Offline
            V Offline
            vikas amin
            wrote on last edited by
            #5

            press F10 u will go to extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { // call shared/exported WinMain return AfxWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow); } no press F10 again and then F11 to go to the defination of afxwinmain check out the afxwinmain function in "Winmain.cpp" by pressing "F10" find out from which function call the program exit int AFXAPI AfxWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) Vikas Amin Embin Technology Bombay vikas.amin@embin.com

            B 1 Reply Last reply
            0
            • M Marc Soleda

              Does it reach the constructor of the app? Marc Soleda. ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.

              B Offline
              B Offline
              Boaz V
              wrote on last edited by
              #6

              Nope.

              1 Reply Last reply
              0
              • V vikas amin

                press F10 u will go to extern "C" int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) { // call shared/exported WinMain return AfxWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow); } no press F10 again and then F11 to go to the defination of afxwinmain check out the afxwinmain function in "Winmain.cpp" by pressing "F10" find out from which function call the program exit int AFXAPI AfxWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow) Vikas Amin Embin Technology Bombay vikas.amin@embin.com

                B Offline
                B Offline
                Boaz V
                wrote on last edited by
                #7

                No help. Pressing f10 or f11 does not reach anywhere. Again, it seems it starts (the layout of the VS changes) and it immediattly returns with return number 0xff.

                1 Reply Last reply
                0
                • B Boaz V

                  Hi, After changing alot of code in my MFC application, it is no longer opens up. Compile has no errors or warnings. It seems that the program DOES load, but exit immediatly. Any idea where to look for? Any idea where i can put a break point to help me catch it? How to define an entry point?

                  B Offline
                  B Offline
                  Boaz V
                  wrote on last edited by
                  #8

                  Found my error. A simple bug in some other lib i used. But, i could find it after i added breakpoints to ALL the functions used in the solution. Is there any simple way to debug an application from the first instruction?

                  M V 2 Replies Last reply
                  0
                  • B Boaz V

                    Found my error. A simple bug in some other lib i used. But, i could find it after i added breakpoints to ALL the functions used in the solution. Is there any simple way to debug an application from the first instruction?

                    M Offline
                    M Offline
                    Marc Soleda
                    wrote on last edited by
                    #9

                    Adding a breakpoint at the declaration of the global app object? CYourApp theApp; ... she said you are the perfect stranger she said baby let's keep it like this... Tunnel of Love, Dire Straits.

                    1 Reply Last reply
                    0
                    • B Boaz V

                      Found my error. A simple bug in some other lib i used. But, i could find it after i added breakpoints to ALL the functions used in the solution. Is there any simple way to debug an application from the first instruction?

                      V Offline
                      V Offline
                      vikas amin
                      wrote on last edited by
                      #10

                      Sorry No idea regarding that Vikas Amin Embin Technology Bombay vikas.amin@embin.com

                      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