Exit and save
-
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
-
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
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!
-
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!
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 ;) !
-
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 ;) !
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
-
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
Hi ! I replaced WS_NONAVDONEBUTTON by WS_MINIMIZEBOX and that works fine! Thanks :)