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. Mobile Development
  3. Mobile
  4. Exit and save

Exit and save

Scheduled Pinned Locked Moved Mobile
questionhelp
5 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.
  • C Offline
    C Offline
    Cedric Moonen
    wrote on last edited by
    #1

    Hi all! Let me explain my problem: I need my application to be closed 'completely'. I achieve this by removing the 'smart minimize' button and replace it by the OK button (I tried to remove all two but it doesn't work). So, that works fine but now I want to know when the user clicked on this button (so I can ask him if he wants to leave without saving or stay in the program). How can I do this? Another solution would be also to remove completely the 'smart minimize' and the Ok button (I've another exit button on my toolbar). Any idea? Thanks

    D 1 Reply Last reply
    0
    • C Cedric Moonen

      Hi all! Let me explain my problem: I need my application to be closed 'completely'. I achieve this by removing the 'smart minimize' button and replace it by the OK button (I tried to remove all two but it doesn't work). So, that works fine but now I want to know when the user clicked on this button (so I can ask him if he wants to leave without saving or stay in the program). How can I do this? Another solution would be also to remove completely the 'smart minimize' and the Ok button (I've another exit button on my toolbar). Any idea? Thanks

      D Offline
      D Offline
      Daniel Strigl
      wrote on last edited by
      #2

      Have you tried the following code to remove both buttons (the OK and the minimize button)?

      SHDoneButton(m_hWnd, SHDB_HIDE);
      ModifyStyle(0, WS_NONAVDONEBUTTON, SWP_NOSIZE);

      Daniel ;) --------------------------- Never change a running system!

      C 1 Reply Last reply
      0
      • D Daniel Strigl

        Have you tried the following code to remove both buttons (the OK and the minimize button)?

        SHDoneButton(m_hWnd, SHDB_HIDE);
        ModifyStyle(0, WS_NONAVDONEBUTTON, SWP_NOSIZE);

        Daniel ;) --------------------------- Never change a running system!

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

        I tried but WS_NONAVDONEBUTTON is undeclared !! :confused: I have this error at compilation: C:\MEC\Sources Pocket\CVVisual\MainFrm.cpp(107) : error C2065: 'WS_NONAVDONEBUTTON' : undeclared identifier In wich header file is it declared ? Thanks for your response ;) !

        H 1 Reply Last reply
        0
        • C Cedric Moonen

          I tried but WS_NONAVDONEBUTTON is undeclared !! :confused: I have this error at compilation: C:\MEC\Sources Pocket\CVVisual\MainFrm.cpp(107) : error C2065: 'WS_NONAVDONEBUTTON' : undeclared identifier In wich header file is it declared ? Thanks for your response ;) !

          H Offline
          H Offline
          Halls
          wrote on last edited by
          #4

          WS_NONAVDONEBUTTON is defined as: #define WS_NONAVDONEBUTTON WS_MINIMIZEBOX while WS_MINIMIZEBOX is defined as: #define WS_MINIMIZEBOX 0x00010000L http://msdn.microsoft.com/library/default.asp?url=/library/en-us/guide\_ppc/htm/programming\_pocket\_pc\_2002\_iguu.asp

          C 1 Reply Last reply
          0
          • H Halls

            WS_NONAVDONEBUTTON is defined as: #define WS_NONAVDONEBUTTON WS_MINIMIZEBOX while WS_MINIMIZEBOX is defined as: #define WS_MINIMIZEBOX 0x00010000L http://msdn.microsoft.com/library/default.asp?url=/library/en-us/guide\_ppc/htm/programming\_pocket\_pc\_2002\_iguu.asp

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

            Hi ! I replaced WS_NONAVDONEBUTTON by WS_MINIMIZEBOX and that works fine! 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