Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Linking object file ? Pin
CarteBlanche2-Feb-04 19:26
CarteBlanche2-Feb-04 19:26 
Questionconvert double to Integer????????? Pin
wow99992-Feb-04 18:56
wow99992-Feb-04 18:56 
AnswerRe: convert double to Integer????????? Pin
alex.barylski2-Feb-04 21:57
alex.barylski2-Feb-04 21:57 
AnswerRe: convert double to Integer????????? Pin
jhwurmbach2-Feb-04 23:03
jhwurmbach2-Feb-04 23:03 
Questionhow can i find sqlcli1.h? Pin
google732-Feb-04 18:05
google732-Feb-04 18:05 
AnswerRe: how can i find sqlcli1.h? Pin
Roger Wright2-Feb-04 18:22
professionalRoger Wright2-Feb-04 18:22 
GeneralRe: how can i find sqlcli1.h? Pin
google732-Feb-04 18:47
google732-Feb-04 18:47 
QuestionProgram not responding? Pin
Xzyx987X2-Feb-04 17:46
Xzyx987X2-Feb-04 17:46 
I'm trying to write a peice of code to allow me to intercept the close command in the console attached to my application's process so it will prompt the user before destroying the process. Below is the function I wrote for this. It works fine, but the problem is that when the message box pops up it convinces windows the program has stalled, and an end task window opens. Is there any way to prevent this? If it matters, I'm only considering Windows 2000/XP compatibility for this app.

BOOL WINAPI ConsoleHandlerRoutine(DWORD dwCtrlType)
{

 int i;

 switch(dwCtrlType)
 {

 case CTRL_C_EVENT:
 case CTRL_CLOSE_EVENT:
  for(i = 0; i < (MAX_DASMS - 1); i++)
  {
   if(dasmDialogProcInfo[i].handle)
   {
    if( MessageBox(hWnd_console, "All work in open windows will be lost if you terminate the application. Proceed?", "Information", MB_YESNO | MB_ICONQUESTION) == IDYES )
     return FALSE;  //Don't handle this massage so the application will terminate normally
    else
     return TRUE;   //Handle this message and the application will continue running

   }
  }
  break;

 }

 return FALSE;

}

Generalansi/iso C++ compiler Pin
Anonymous2-Feb-04 17:33
Anonymous2-Feb-04 17:33 
GeneralRe: ansi/iso C++ compiler Pin
valikac2-Feb-04 17:35
valikac2-Feb-04 17:35 
GeneralRe: ansi/iso C++ compiler Pin
Joe Woodbury2-Feb-04 18:23
professionalJoe Woodbury2-Feb-04 18:23 
GeneralRe: ansi/iso C++ compiler Pin
jhwurmbach2-Feb-04 23:08
jhwurmbach2-Feb-04 23:08 
GeneralRe: ansi/iso C++ compiler Pin
Nemanja Trifunovic3-Feb-04 5:18
Nemanja Trifunovic3-Feb-04 5:18 
Generalcompilie error: error C2955: 'modulus' : use of class template requires template argument list Pin
Sheetal S P2-Feb-04 17:21
sussSheetal S P2-Feb-04 17:21 
GeneralRe: compilie error: error C2955: 'modulus' : use of class template requires template argument list Pin
jan larsen3-Feb-04 1:45
jan larsen3-Feb-04 1:45 
GeneralCRectTracker+CScrollView=&quot;going crazy!!!&quot; Pin
Gavriloaie Andrei2-Feb-04 16:34
Gavriloaie Andrei2-Feb-04 16:34 
Generaltypedef vector&lt;vector&lt;vector&lt;double&gt; &gt; &gt; vMatrix; Pin
closecall2-Feb-04 15:52
closecall2-Feb-04 15:52 
GeneralRe: typedef vector&lt;vector&lt;vector&lt;double&gt; &gt; &gt; vMatrix; Pin
ZoogieZork2-Feb-04 19:10
ZoogieZork2-Feb-04 19:10 
GeneralRegisterHotKey function Pin
zephyr1232-Feb-04 15:05
susszephyr1232-Feb-04 15:05 
GeneralRe: RegisterHotKey function Pin
valikac2-Feb-04 17:37
valikac2-Feb-04 17:37 
GeneralRe: RegisterHotKey function Pin
Zephy1232-Feb-04 20:37
sussZephy1232-Feb-04 20:37 
Generaldavidlee108 Pin
davidlee1082-Feb-04 14:59
sussdavidlee1082-Feb-04 14:59 
GeneralOpenFile &gt; Cancel - Problem Pin
TiberiusvP2-Feb-04 14:32
TiberiusvP2-Feb-04 14:32 
GeneralRe: OpenFile &gt; Cancel - Problem Pin
Roger Allen3-Feb-04 2:59
Roger Allen3-Feb-04 2:59 
GeneralRe: OpenFile &gt; Cancel - Problem Pin
TiberiusvP3-Feb-04 3:44
TiberiusvP3-Feb-04 3:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.