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. DialogBox fail in XP

DialogBox fail in XP

Scheduled Pinned Locked Moved C / C++ / MFC
csharpvisual-studioquestion
8 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.
  • W Offline
    W Offline
    William Engberts
    wrote on last edited by
    #1

    Hi everybody, I have a console application, that create a dialog box to show a progress bar. This has worked fine for years (it started as a Visual Studio 6 project, then I migrated it to Studio 2005) Now, I have migrated it to Studio 2010. It still works fine under Windows 7, but under XP, the dialog box returns -1, with a GetLastError() of 0. When I look at the messages sent to the dialog box, then I see WM_SETFONT, followed by WM_DESTROY and WM_NCDESTROY. I call it as DialogBox (hInstance, MAKEINTRESOURCE (IDD_MAPPER), HWND_DESKTOP, DialogProc), where DialogProc is defined as INT_PTR CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM); Like I said: it all worked fine and still does in Windows 7, but XP does not seem to co-operate anymore. Anybody any ideas? Would be grately appreciated! Thanks in advance, William

    C C D 3 Replies Last reply
    0
    • W William Engberts

      Hi everybody, I have a console application, that create a dialog box to show a progress bar. This has worked fine for years (it started as a Visual Studio 6 project, then I migrated it to Studio 2005) Now, I have migrated it to Studio 2010. It still works fine under Windows 7, but under XP, the dialog box returns -1, with a GetLastError() of 0. When I look at the messages sent to the dialog box, then I see WM_SETFONT, followed by WM_DESTROY and WM_NCDESTROY. I call it as DialogBox (hInstance, MAKEINTRESOURCE (IDD_MAPPER), HWND_DESKTOP, DialogProc), where DialogProc is defined as INT_PTR CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM); Like I said: it all worked fine and still does in Windows 7, but XP does not seem to co-operate anymore. Anybody any ideas? Would be grately appreciated! Thanks in advance, William

      C Offline
      C Offline
      CPallini
      wrote on last edited by
      #2

      Is you Windows XP updated to (at least) Service Pack 2 ? (see here here[^])

      Veni, vidi, vici.

      1 Reply Last reply
      0
      • W William Engberts

        Hi everybody, I have a console application, that create a dialog box to show a progress bar. This has worked fine for years (it started as a Visual Studio 6 project, then I migrated it to Studio 2005) Now, I have migrated it to Studio 2010. It still works fine under Windows 7, but under XP, the dialog box returns -1, with a GetLastError() of 0. When I look at the messages sent to the dialog box, then I see WM_SETFONT, followed by WM_DESTROY and WM_NCDESTROY. I call it as DialogBox (hInstance, MAKEINTRESOURCE (IDD_MAPPER), HWND_DESKTOP, DialogProc), where DialogProc is defined as INT_PTR CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM); Like I said: it all worked fine and still does in Windows 7, but XP does not seem to co-operate anymore. Anybody any ideas? Would be grately appreciated! Thanks in advance, William

        C Offline
        C Offline
        chaau
        wrote on last edited by
        #3

        It is most likely the manifest. When I converted my projects to VS2010, it changed all my manifests to use urn:schemas-microsoft-com:asm.v2 in this line:

        Awesome

        Also, please check if you still using the manifest loaded via RT_MANIFEST resource. You need to delete this from resource and use the project settings. VS2010 has a habit of assigning RT_MANIFEST to 2, making the program unusable under XP. And of cause you need to check this linker option: MinimumRequiredVersion. It should be 5.00.

        W 1 Reply Last reply
        0
        • C chaau

          It is most likely the manifest. When I converted my projects to VS2010, it changed all my manifests to use urn:schemas-microsoft-com:asm.v2 in this line:

          Awesome

          Also, please check if you still using the manifest loaded via RT_MANIFEST resource. You need to delete this from resource and use the project settings. VS2010 has a habit of assigning RT_MANIFEST to 2, making the program unusable under XP. And of cause you need to check this linker option: MinimumRequiredVersion. It should be 5.00.

          W Offline
          W Offline
          William Engberts
          wrote on last edited by
          #4

          Thanks for your answer, but I cannot find much out of the ordinary. I am not very well familiar with the manifest, but it looks to be generated by Studio2010? Anyway, it reads: There is no RT_MANIFEST mentioned in the resource Also, the MinimumRequiredVersion is left blank, so I don't expect any difficulties there! In any case: the program itself runs and it does everything up untill the point that I start the dialog box. (and everything after that dialogbox crashes) There are a number of log statements before and after and I see everyone of them. Only everything that occurs from within the dialogbox doe not appear in XP.

          C 1 Reply Last reply
          0
          • W William Engberts

            Thanks for your answer, but I cannot find much out of the ordinary. I am not very well familiar with the manifest, but it looks to be generated by Studio2010? Anyway, it reads: There is no RT_MANIFEST mentioned in the resource Also, the MinimumRequiredVersion is left blank, so I don't expect any difficulties there! In any case: the program itself runs and it does everything up untill the point that I start the dialog box. (and everything after that dialogbox crashes) There are a number of log statements before and after and I see everyone of them. Only everything that occurs from within the dialogbox doe not appear in XP.

            C Offline
            C Offline
            chaau
            wrote on last edited by
            #5

            Try to set MinimumRequiredVersion to 5.00

            W 1 Reply Last reply
            0
            • C chaau

              Try to set MinimumRequiredVersion to 5.00

              W Offline
              W Offline
              William Engberts
              wrote on last edited by
              #6

              Just tried that: No change :( Thanks anyway

              1 Reply Last reply
              0
              • W William Engberts

                Hi everybody, I have a console application, that create a dialog box to show a progress bar. This has worked fine for years (it started as a Visual Studio 6 project, then I migrated it to Studio 2005) Now, I have migrated it to Studio 2010. It still works fine under Windows 7, but under XP, the dialog box returns -1, with a GetLastError() of 0. When I look at the messages sent to the dialog box, then I see WM_SETFONT, followed by WM_DESTROY and WM_NCDESTROY. I call it as DialogBox (hInstance, MAKEINTRESOURCE (IDD_MAPPER), HWND_DESKTOP, DialogProc), where DialogProc is defined as INT_PTR CALLBACK DialogProc(HWND, UINT, WPARAM, LPARAM); Like I said: it all worked fine and still does in Windows 7, but XP does not seem to co-operate anymore. Anybody any ideas? Would be grately appreciated! Thanks in advance, William

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

                Is InitCommonControlsEx() of any help?

                "One man's wage rise is another man's price increase." - Harold Wilson

                "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                W 1 Reply Last reply
                0
                • D David Crow

                  Is InitCommonControlsEx() of any help?

                  "One man's wage rise is another man's price increase." - Harold Wilson

                  "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                  "Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous

                  W Offline
                  W Offline
                  William Engberts
                  wrote on last edited by
                  #8

                  YES! Thank you very much! I had commented that one out, since Studio 2005 at the time said it was no longer necessary! Including it again did the trick! Thank you very much!

                  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