Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to use rc2 file?

Posted on 2001-08-14
5
Medium Priority
?
780 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:Meir Rivkin
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

782 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