Saturday, May 9, 2009

Visual C++ developers HELP?

What code or lines of code will I use to close my application e.g. the same as that of clicking the exit button on any windows application?





I tried


1. exit(0), exit(1) ---%26gt; but it gives an error message


2. CFrameWnd::PostMessage(WM_CLOSE, 0, 0); (same)


3. //AfxGetMainWnd()-%26gt;SendMessage(WM_DESTRO...


//AfxGetMainWnd()-%26gt;SendMessage(WM_QUIT); (same)


4. ((CMainFrame *)AfxGetMainWnd())-%26gt;SendMessage(WM_CLOSE... 0, 0); (same)





I have an activeX control embedded in my application.


The error message comprises of three buttons namely Debug, Send Error Report and Don't Send...





Please help

Visual C++ developers HELP?
try this...


Application::Exit();


No comments:

Post a Comment