Solved

MFC Sample ?

Posted on 1998-05-11
1
882 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now