Solved

how to use rc2 file?

Posted on 2001-08-14
5
766 Views
Last Modified: 2013-11-20
Hello,

I would like to use rc2 file. I know that such a file must be include in compile directive of the "resource include" dlg. However I don't know how to use this file in my project? For example I have a dlg resource whose ID is IDD_DIALOG_RC2. How Can I do I class that use this resource?

Thanks in advance
rgrand
0
Comment
Question by:rgrand
5 Comments
 
LVL 42

Expert Comment

by:sedgwick
ID: 6383615
the wizard is creating it for you automaticaly when u choose what kind of application u want (SDI,MDI, dialog-based etc..)

if u wanna attach some ID to a dialog, goto the resource view, insert a dialog and change its ID in the properties.
double click on the dialog will display a window which ask whether u wanna create new clas for it or to select an existing class, (this wrapper class is a CDialog class).
now u will need to give a name to this dialog files (h and cpp).
0
 
LVL 2

Expert Comment

by:SamratAshok
ID: 6384275
Hi rgrand

rc2 file is created by wizards as a place holder for any resources that you may need in application
that cannot be edited by resource editor or you don't want it to edit.

Needless to say, resources that fall into this category are very rare and becoming rarer. Also
it is much more work than going through the resource editor.

you will have to create the resource template, you will have to create #defines in the resource.h
or anyother file that you choose to use.

One example I can think of (I have never implemented nor needed to) is that

Consider a portion of dialog box that is common to one or more forms in your application (i.e.
same controls repeat in roughly the same layout).

You could create duplicates on both regular resources or you could create it once
and paste it into rc2 file. Advantage you now have is that resource files is smaller. Disadvantage
You've created a lot of work for yourself  (job security???)

In most projects, you can delete the rc2 file and all its references and leave happily ever after.
If you do delete, remember that there are two references to rc2 file from main file. One regular
and one commented. Delete both of 'em


0
 
LVL 23

Expert Comment

by:Roshan Davis
ID: 9521177
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by: SamratAshok, sedgwick (points to be split)

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Roshan Davis
EE Cleanup Volunteer
0
 
LVL 2

Expert Comment

by:SamratAshok
ID: 9524369
Answer that sedgwick has suggested would only make changes
to rc file and never rc2 file.

Also every MFC project you create will always have rc2 file created
as placeholder for your custom resources.

After I answered this question, I did work on project where we had
used rc2 file. So my earlier opinion that it increases work was slightly
incorrect. It actually leads to smaller and simpler to manage files.


Cheers
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 9565779
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Expand macro to include alternate header placement and naming 5 60
Folder Comparison 12 52
haveThree challenge 22 100
changeXy challenge 13 57
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

705 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

17 Experts available now in Live!

Get 1:1 Help Now