Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

how to use rc2 file?

Posted on 2001-08-14
5
Medium Priority
?
776 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

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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…
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 this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

688 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