Click here to Skip to main content
15,926,367 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: HBITMAP to Jpeg data stream? Pin
Arcrest12-Feb-04 14:04
Arcrest12-Feb-04 14:04 
GeneralTimed Updation Pin
Monty210-Feb-04 21:07
Monty210-Feb-04 21:07 
GeneralRe: Timed Updation Pin
Prakash Nadar11-Feb-04 0:27
Prakash Nadar11-Feb-04 0:27 
GeneralRe: Timed Updation Pin
Monty211-Feb-04 0:35
Monty211-Feb-04 0:35 
GeneralRe: Timed Updation Pin
Prakash Nadar11-Feb-04 0:41
Prakash Nadar11-Feb-04 0:41 
GeneralRe: Timed Updation Pin
jmkhael11-Feb-04 0:42
jmkhael11-Feb-04 0:42 
QuestionCan do that??? Pin
don7cry10-Feb-04 21:04
don7cry10-Feb-04 21:04 
AnswerRe: Can do that??? Pin
Antti Keskinen10-Feb-04 22:02
Antti Keskinen10-Feb-04 22:02 
Exceptions are errorenous program states from which it is still possible to close the program gracefully without losing data or crashing the system.

In C++, you can handle raised exceptions by using a try - catch block. You write the code you wish to execute in the try block, and then write either a conditional (specific exception) catch block or a generic one, if available.

Here is an example of handling an SQL-query exception:
try
{
    CRecordset myRecordset(&db);
    myRecordset.Open(...);
}
catch ( CDBException* e )
{
    // If an exception is raised
    AfxMessageBox( e->m_strError, MB_OK );

    e->Delete();
}
For more hands-on information and how to write your own routines that raise exceptions, see MSDN Library for Exception handling topics (C++)[^].

Hope this helps,
Antti Keskinen


----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralInsert ActiveX wizard trouble Pin
El'Cachubrey10-Feb-04 20:58
El'Cachubrey10-Feb-04 20:58 
GeneralAutomating Outlook Pin
ctbmei10-Feb-04 20:13
ctbmei10-Feb-04 20:13 
GeneralRe: Automating Outlook Pin
jmkhael11-Feb-04 0:37
jmkhael11-Feb-04 0:37 
GeneralDynamic display of MSChart Pin
vidyaby10-Feb-04 19:55
vidyaby10-Feb-04 19:55 
GeneralMemory usage for SetWindowText Pin
Coremn10-Feb-04 19:38
Coremn10-Feb-04 19:38 
GeneralArray of Objects of a class Pin
Member 38437310-Feb-04 18:16
Member 38437310-Feb-04 18:16 
GeneralRe: Array of Objects of a class Pin
Maxwell Chen10-Feb-04 19:39
Maxwell Chen10-Feb-04 19:39 
GeneralRe: Array of Objects of a class Pin
Member 38437310-Feb-04 21:54
Member 38437310-Feb-04 21:54 
GeneralRe: Array of Objects of a class Pin
Antti Keskinen10-Feb-04 23:37
Antti Keskinen10-Feb-04 23:37 
GeneralRe: Array of Objects of a class Pin
Member 38437311-Feb-04 20:10
Member 38437311-Feb-04 20:10 
GeneralObject ID's dont appear in Class Wizard Pin
SJS_OZ10-Feb-04 18:09
SJS_OZ10-Feb-04 18:09 
Generalweb browser customization Pin
Abhi Lahare10-Feb-04 18:05
Abhi Lahare10-Feb-04 18:05 
GeneralRunning VBscript Pin
pranavamhari10-Feb-04 17:21
pranavamhari10-Feb-04 17:21 
GeneralRe: Running VBscript Pin
Ryan Binns10-Feb-04 17:56
Ryan Binns10-Feb-04 17:56 
GeneralVERSIONINFO in program Pin
shultas10-Feb-04 16:09
shultas10-Feb-04 16:09 
GeneralRe: VERSIONINFO in program Pin
pranavamhari10-Feb-04 17:26
pranavamhari10-Feb-04 17:26 
Generalmax controls on a dialog using vc++ Pin
burnafatty10-Feb-04 14:17
burnafatty10-Feb-04 14:17 

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.