Solved

how to use rc2 file?

Posted on 2001-08-14
5
767 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
lucky13 challenge 11 120
tripleUp challenge 7 73
Fibonacci challenge 11 108
firstChar challenge 13 107
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

919 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

20 Experts available now in Live!

Get 1:1 Help Now