Click here to Skip to main content
15,913,773 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralFile Open in SDI Pin
2-Nov-01 15:37
suss2-Nov-01 15:37 
GeneralRe: File Open in SDI Pin
Christian Graus2-Nov-01 20:44
protectorChristian Graus2-Nov-01 20:44 
Generaltry/catch Pin
Xian2-Nov-01 12:49
Xian2-Nov-01 12:49 
GeneralRe: try/catch Pin
Michael Dunn2-Nov-01 14:27
sitebuilderMichael Dunn2-Nov-01 14:27 
GeneralRe: try/catch Pin
Todd Smith2-Nov-01 19:05
Todd Smith2-Nov-01 19:05 
GeneralRe: try/catch [Thanks for the insight!] Pin
Xian3-Nov-01 4:54
Xian3-Nov-01 4:54 
GeneralRe: try/catch Pin
James R. Twine3-Nov-01 18:23
James R. Twine3-Nov-01 18:23 
GeneralRe: try/catch Pin
Xian4-Nov-01 7:53
Xian4-Nov-01 7:53 
Yeah, my main function looks kinda like this :
XGameObj * pGameObj = new XGameObj();

try
{
  pGameObj->initGame();
  pGameObj->startListener();
  pGameObj->gameLoop();
}
catch( const char * pszError )
{
  // stuff
}


My support functions in my Socket handler throw back errors and if they are
bad then I throw them back to the main loop. Other than that I am not doing much with it. I only throw back to the beginning for irrecoverable errors. I hope this is the "proper" way of doing it. I pretty much just figured it out on my own. I dont try/catch every send and receive, plus this is a console app, so no windows pumps! Every heartbeat the events are fired based on time. Like connections are checked and messages are checked every beat, while updates to the queues may occur every 1 real second, etc. I am pretty much just making it up as I go along Smile | :)

Peace.
GeneralRe: try/catch Pin
James R. Twine4-Nov-01 8:13
James R. Twine4-Nov-01 8:13 
GeneralRe: try/catch Pin
Mike Nordell7-Nov-01 2:20
Mike Nordell7-Nov-01 2:20 
GeneralRe: try/catch Pin
James R. Twine7-Nov-01 15:08
James R. Twine7-Nov-01 15:08 
GeneralADO in MFC Pin
2-Nov-01 12:02
suss2-Nov-01 12:02 
GeneralRe: ADO in MFC Pin
Christian Graus2-Nov-01 20:46
protectorChristian Graus2-Nov-01 20:46 
GeneralRe: ADO in MFC Pin
5-Nov-01 14:51
suss5-Nov-01 14:51 
GeneralSystemParametersInfo Fails under WindowsXP... Pin
Joshua Guy2-Nov-01 10:40
Joshua Guy2-Nov-01 10:40 
QuestionIs there a memory limit for the "new" operator? Pin
clintsinger2-Nov-01 9:57
clintsinger2-Nov-01 9:57 
AnswerRe: Is there a memory limit for the "new" operator? Pin
Xian2-Nov-01 12:54
Xian2-Nov-01 12:54 
AnswerTry this... Pin
2-Nov-01 19:05
suss2-Nov-01 19:05 
GeneralRe: Try this... Pin
Anders Molin3-Nov-01 6:31
professionalAnders Molin3-Nov-01 6:31 
GeneralRe: Try this... Pin
clintsinger5-Nov-01 9:18
clintsinger5-Nov-01 9:18 
GeneralRe: Try this... Pin
Anders Molin5-Nov-01 9:47
professionalAnders Molin5-Nov-01 9:47 
GeneralMFC Bitmaps..... Pin
2-Nov-01 7:06
suss2-Nov-01 7:06 
GeneralRe: MFC Bitmaps..... Pin
Christian Graus2-Nov-01 20:50
protectorChristian Graus2-Nov-01 20:50 
Generalstring and CString Pin
2-Nov-01 7:01
suss2-Nov-01 7:01 
GeneralRe: string and CString Pin
2-Nov-01 7:07
suss2-Nov-01 7:07 

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.