Solved

MFC Sample ?

Posted on 1998-05-11
1
897 Views
Last Modified: 2013-11-20
I'm a beginner in VC++/MFC and reading a sample of Microsoft : DLGTEMP
The DLGTEMPL sample shows how to create a dialog template dynamically
and use the template with CDialog::InitModalIndirect. The sample displays a
dialog box for selecting the height, width, and other attributes of a button,
static text, and multiline edit control, then displays the resulting dialog box
using templates in memory.
Why they had to use TRY; CATCH,... in CMyDialogTemplate::DemoIt() ?
Can I creat the second dialog by Resource editor with less code line, and
in this situation, of course I do not use TRY, CATCH?
0
Comment
Question by:nhcuong
1 Comment
 
LVL 23

Accepted Solution

by:
naveenkohli earned 0 total points
ID: 1309551
TRY and CATCH are standard MFC macros for Exception handling. Its always advisable to use these macros if you the process with in TRY block can generate any kind of exception which can generate crash. You can take of the exception in the CATCH block and have a nice exit from the routine instead of crashing the programme.
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Separate into files by filename 12 91
Excel Use VBA to get user's Mac Address for their computer 5 338
format the code in java 6 109
wordappend challenge 8 223
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question