Solved

how to use rc2 file?

Posted on 2001-08-14
5
770 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Perl Awk Need Help 3 150
Best tools for Backup and restore of Wordpress site 6 58
bigDiff challenge 17 144
lucky13 challenge 11 168
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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…
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.
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Suggested Courses

751 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