Is it possible to have multiple .RC files in a Project ?

Is it possible to have multiple .RC files in a Project ?

Postby anserkk » Fri Feb 06, 2009 7:01 am

Dear Friends,

Is it possible to have multiple .RC files in a Project ?

For Eg.

1) In my application I have a Menu option named "Account Heads Master"
I plan to keep all screens designs and resources related to Account Heads like ADD, Edit, Delete etc in a .RC file named "AcHeads.RC"

2) In my application I have an Menu Option named "Voucher Entries"
I plan to keep all screens designs and resources related to Voucher Entries like Add Dialog, Edit Dialog's, Delete Dialog's etc in a .RC file named "Vouchers.RC"

And finally in my project I will have many .RC files and using these .RC files, ONE SINGLE EXE is generated

This helps in organising the code neatly. I don't prefer to keep all screens designs together in a single .RC file. In a large project it will be very difficult.

Is this possible ?

Thanks in advance.

Regards

Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Is it possible to have multiple .RC files in a Project ?

Postby Antonio Linares » Fri Feb 06, 2009 7:33 am

Anser,

The solution is to use a main RC file that includes each different RC:

myproject.rc:
Code: Select all  Expand view
#include "AcHeads.RC"
#include "Vouchers.RC"
...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Is it possible to have multiple .RC files in a Project ?

Postby anserkk » Fri Feb 06, 2009 7:53 am

Mr.Antonio,

Thankyou very much. :D

Let me explain what I have understood.

I'll have a MyProject.RC (Main RC) wich will contain only the includes of the other .RC files

#include "AcHeads.RC"
#include "Vouchers.RC"
...

NO dialog's, no resources in it (Main RC).

In my project make file I will be using only the MyProject.RC (Main RC ). As and when a new .RC file is added I should update the Main RC file to include the new .RC file in it.

I will have to take care and make sure that same ID's/resource names are not used in the other .RC files. ie Uniqness in resource ID's/Names should be enforced.

Hope I am right.


Regards

Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Is it possible to have multiple .RC files in a Project ?

Postby Antonio Linares » Fri Feb 06, 2009 8:24 am

Anser,

Yes, you are right :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 100 guests