Is it possible that more than 1 project to share the same resource.h file?

Hi all....

before getting crazy fighting with ID's I want to receive your advice on
what's the best way to do this:

I'm programming an application that is very big, so to make it more
understandable, it was necessary to program different modules in DLL's. I
have at present 3 different projects in the workspace. The main project is
the application itself (that has the CWinApp derived class) and the others
are extension DLL projects.

The application is MDI. The main project only has CManFrame class and some
CControlBar's. One DLL project is the administration module, where master
tables are configured. I have in that module some dialog boxes that carry
out the inserts, updates or deletes of master tables.

The last DLL has different document templates that I open depending on some
commands. The views of the templates are derived from CFormView.

As this is a big application formed by different modules, you can imagine
that message transmission between modules is very intensive. For example, if
in administration module I modify a data that is shown in a MDI document
(belonging to the last DLL), that MDI document need to refresh that modified
data.

At the moment all is working fine, but with a little detail. Since each
project has its own resource.h, resource editor assigns the ID's for each
project separetedly which causes that a lot of ID's have the same number
assigned (from the whole application point of view). This problem has more
significance in menu commands and toolbar commands. For example, some time
ago I got a problem that a message was being redirected to an unexpected
window. I realized later that command id was already used by a menu in other
DLL.

So, is it possible that the 3 DLL's share the same resource.h but different
..rc file? that way, I can be sure that the ID's will be unique for the whole
application.

I have Visual C++ 6.0

Thanks a lot in advance
Jaime


0
6/23/2004 1:59:09 AM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
628 Views

Similar Articles

[PageSpeed] 43

"Jaime Stuardo" <jstuardo@manquehue.net> wrote in message
news:uGeFnWMWEHA.1952@TK2MSFTNGP12.phx.gbl...
> Hi all....
>
> before getting crazy fighting with ID's I want to receive your advice on
> what's the best way to do this:
>
> I'm programming an application that is very big, so to make it more
> understandable, it was necessary to program different modules in DLL's. I
> have at present 3 different projects in the workspace. The main project is
> the application itself (that has the CWinApp derived class) and the others
> are extension DLL projects.
>
> The application is MDI. The main project only has CManFrame class and some
> CControlBar's. One DLL project is the administration module, where master
> tables are configured. I have in that module some dialog boxes that carry
> out the inserts, updates or deletes of master tables.
>
> The last DLL has different document templates that I open depending on
some
> commands. The views of the templates are derived from CFormView.
>
> As this is a big application formed by different modules, you can imagine
> that message transmission between modules is very intensive. For example,
if
> in administration module I modify a data that is shown in a MDI document
> (belonging to the last DLL), that MDI document need to refresh that
modified
> data.
>
> At the moment all is working fine, but with a little detail. Since each
> project has its own resource.h, resource editor assigns the ID's for each
> project separetedly which causes that a lot of ID's have the same number
> assigned (from the whole application point of view). This problem has more
> significance in menu commands and toolbar commands. For example, some time
> ago I got a problem that a message was being redirected to an unexpected
> window. I realized later that command id was already used by a menu in
other
> DLL.
>
> So, is it possible that the 3 DLL's share the same resource.h but
different
> .rc file? that way, I can be sure that the ID's will be unique for the
whole
> application.
>
> I have Visual C++ 6.0
>
> Thanks a lot in advance
> Jaime
>
>

    The approved solution to your problem is to go to the #defines at the
bottom of the resource.h files and adjust the "next" values for each
resource type to avoid conflicts.  This aproach doesn't allow you to create
a reuseable extension dll, but if you are sharing command IDs between dlls,
you probably aren't planning to use them for any other project.

                                        Nathan Holt


0
nathanh (83)
6/23/2004 1:50:20 PM
Reply:

Similar Artilces:

How to execute a .lnk file
I need to execute a .lnk file. With spawn, exec and system is impossible to do it. From a dos window, writing the path, the link open the application directly with no problem. Any idea about? > I need to execute a .lnk file. With spawn, exec and system is > impossible to do it. From a dos window, writing the path, the link open > the application directly with no problem. Any idea about? ShellExecute? --- Ajay "john wayne" <attackack@yahoo.com> wrote in message news:1153934123.572217.203440@m73g2000cwd.googlegroups.com... >I need to execute a .lnk file. With s...

find column with text data in row 1
I have the following macro which bounces me back and forth between b:k and m:u Private Sub Workbook_SheetBeforeDoubleClick( _ ByVal Sh As Object, ByVal target As Range, Cancel As Boolean) If Not Intersect(target, Range("B:J")) Is Nothing Then target.Offset(0, 11).Select If Not Intersect(target, Range("M:U")) Is Nothing Then target.Offset(0, -11).Select End Sub Now I would like to build on that. My K Column is my delimiter with the static text 'Totals'. I would like to be able to have the functionality of the above without have the number of columns static, so...

Report Crystal Report on CRM 1.2 Problem
Hi, I create a Crystal report. in this reports, i use "field of cumulated total" Sorry, i am french and in french it's "Champs de total cumul´┐Ż" I use result of this field to do statistic. the problem, When the fields is null, result of my stat are null too. Can you help me. thanks depending on the source of your data, you can use the ISNULL(fieldname,0,fieldname) T-SQL function to replace null values with zero values instead. This will allow your statistics to compute properly. Dave "Chdup" <chdup@monmail.com> wrote in message news:43df...

Getting a -1 Status in Disqualify Lead
I'm getting a -1 status when I try and disqualify a lead. When I click on the picklist I get an IE Script Error: 'firstChild.firstChild.children[...].offsetTop' is null or not an object My guess is that the picklist values were deleted or customized or something. Where can I edit the Disqualify - Status picklist values? Any ideas on what could be happening? Just a follow up. Hopefully it will help someone. Turns out somehow our XML file included duplicate contact sections. We exported the XML, sent it to Microsoft support, they fixed the XML file and sent it back. We imported i...

Shared folders #2
In an exchange enviroment, folders can be shared among users. But it seems to me that, on a larger scale, this can be pretty tedious. What if I want to a single shared calendar that is used by all users? how is this normally done? .. I know I can put it in public folders, my question here, again, is must that calendar be created on 'someones' PC......in 'someones' mailbox? What if several users are sharing folders among different other users? Doesn't this become difficult to administer? knowing what shared folder is hosted where? Am I missing something here? Sh...

where can i learn MS CRM 1.2
I've got MS CRM 1.2 installed at our office, and no one knows how to use it. How/where can I/we learn MS CRM 1.2 from. Are there any free online tuts or user guides to get us started? Version 3.0 is much better. Why are you still using 1.2 ? "Nikki" wrote: > I've got MS CRM 1.2 installed at our office, and no one knows how to use it. > How/where can I/we learn MS CRM 1.2 from. > > Are there any free online tuts or user guides to get us started? > > > ...

Data Files
If I split up my one data file in outlook into two, does it make outlook run faster? what if i put all my archive in one .pst file and then removed from outlook? i would only add it to outlook once a month to clean up and archive things. would that make outlook run faster? the real question i have is does it matter whether i temporarily remove the archive .pst file from outlook to make it run faster? thanks jim A smaller .pst will allow Outlook to run faster. If you empty your deleted items folder and then archive olds messages, it creates an archive.pst file. Remember, you can open any ...

PNG files not displayed
Help! I have a problem where PNG files I insert into Publisher aren't correctly displayed. The image place-holder is visible, but no image. Other graphics file-types are fine, but not PNG's. Another user with identical hardware and software can view the same PNG's without problems. I've tried resintalling Office and service packs with no success. However, when printing the publication, the PNG graphics are produced with no problems. I'm running Office 2003 sp 1. Thanks in advance! Casey. Casey <Casey@discussions.microsoft.com> was very recently heard to utte...

Problem to open excel file
Hi to all, I have a problem with all excel file. The user can't open all excel file when she did a double click on it. She has this error message : "cannot find the file 'c:\documents and settings\desktop\......test.xls' (or one of its components). Make sure the path and filename are correct. And that all required libraries are available" Do you know what can I do to solve the issue?? regards Malcolm Your Excel file association may be lost. Start>Run "excel.exe /regserver"(no quotes and note the space before the / mark). You may have to en...

Excel is creating temp files Help!!!
Hi i have to files in excel, i cant figure it out, whenever i open th files, they create temp files into the same location, when i shut dow the program the temp files are left there. Is their a way to make it so temp files are not saved. Or is their a way to make it so that the creation of temp files i turned off. Thanks jaso -- greenfalco ----------------------------------------------------------------------- greenfalcon's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1362 View this thread: http://www.excelforum.com/showthread.php?threadid=26182 What do th...

How do I Restore old save dbx files back into OE store folder
I have some old dbx files that I saved into a folder in 'My documents' some time ago during earlier OE back ups. I now wish to re-import some of these saved dbx folders back into OE in order to assess some of these emails again. I've been looking at the wed sites 'Inside OE' and 'OE help'. But can't seem find or see the part that will give me directions on how to do this. Some of these saved dbx folders have the same names of existing folders that I'm currently using in OE. So presumably, I'm going to have to do some folder renaming or s...

Uninstalling Project Accounting
Hi, Does anyone have a quick script to drop all Project accouting related objects from the database (tables/views/procs)? This would be for GP v7 or 8 HS ...

Workbook Not Shared, Still Opens?
We have one user on our LAN with a Laptop and docking stations. For some reason, when he opens certain Excel spreadsheets, other users can still open them without getting a warning message that another user already has it open. Other spreadsheets work as expected (the second user gets the warning message). I don't see any obvious differences in the worksheet properties or Tools (these are Not Shared workbooks). Any idea why this is happening? What should we check? Thanks. ...

How do I set default start time, File-New-Meeting "start time"
when we point on a date in the furture - and then click on "File", "New", "Booking" - then thus form starts at 23:59 the day BEFORE .... I would like to have to start on the same date - and mayby at 08:00 ... Will it possible to change the start time? What happens if you double click on the date or time period? If you use month view, you'll get all day appointments, if you use a day view with time periods, you'll get an appointment for the time period. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook ...

A page of file in pdf
I have a friend who I want to give one page of a file in pdf that has several pages. How do I just give him one page in pdf. Thanks Rod -- Thanks for your Help On Sun, 2 Nov 2008 16:47:01 -0800, jcreek <jcreek@discussions.microsoft.com> wrote: >I have a friend who I want to give one page of a file in pdf that has several >pages. How do I just give him one page in pdf. If you can create PDF files then just save the appropriate page as a PDF. If you can't then get one of the many PDF creation programs. -- Regards, Paul Herber, Sandrila Ltd. http://www.electronics-pa...

H E L P!!
Good Morning.. Help Me To Make Arabic Calendar (Arabic Months)?!! Thanks.. http://images.google.com/images?hl=en&q=Arabic+Calendar&btnG=Search+Images&gbv=2 -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "??? ???" <@discussions.microsoft.com> wrote in message news:CF902B21-B80F-4750-9EBD-7460849CE503@microsoft.com... > Good Morning.. > > Help Me To Make Arabic Calendar (Arabic Months)?!! > > Thanks.. ...

Problem with (1) Office database & (2) Updates installation failures
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Power PC I have two problems that may be related (or not): (1) When I open Word or Excel it takes a very long time and then I get this: "There is a problem with the Office database. Office might be unable to access the database or the database file might be damaged. Without the database, you might be unable to use the Address Book, Scrapbook, and other features that store your personal information." It goes on to explain how to "rebuild the database". I did this properly though without success. (I only w...

Is it possible to setup a mail address change reminder?
I'm managing an Exchange 2000 server. We've undergone a mail address change recently (both new and old addresses are still valid) and I'd like to know if it's possible to set up a mail address change reminder. Such reminder's job is like this: When a person sends to the old address, I'd like Exchange to send a reminder back to this person to tell him that he could use the new address to contact the user. How to do this? TIA Perhaps have users setup Rules or use a transport event sink. -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog -----...

Alternative links between tasks in MS Project 2003
Hi - new here! Using MS Project 2003, I would like to "link" two tasks on a project. I am fully familiar with traditional task linking (predecessors, successors, FS, SF, FF, SS relationships, etc.), but I want to do something slightly different! Basically, I use a VB script in my project to trawl between tasks using the predecessor relationship. Ideally however, I only want the script to traverse certain predecessors. The logic of which predecessors to follow and which to not follow is not always straight forward or consistent. At the moment, I get around this by dup...

Locating a file in excel with a partial file name. #4
I have been runnimg with Office 2000 with which when I go to open a file in excel I am able to enter a partial file name, any part of the file name, to search for the file I wish to open. I am finding in Excel 2002 this function does not apprear to exsit, only the function where it will search for the fille that starts with what your typing will appear once its narrowed it down to the first of a few possible options. I require the ability to be able to just go to the file open icon in excel and on the file name line be able to typr the last few chararacters of a file name to find the ...

Office 2007
How do I fix the problem of an error message stating that the file is full - unable to display. I just upgraded to Office 2007 and the problem did not correct. I have only a single user and do not want to add anothe user to copy files there Outlook throws no such message. Provide the rest of the information like mail account type, how you configured it, and what action produces the error. I doubt this is an Outlook issue at all. -- Russ Valentine "Pearson385" <Pearson385@discussions.microsoft.com> wrote in message news:B1A864AE-9464-4E3E-B5F0-F656BACD76B0@mi...

Share Outlook file on DSB storage device between 2 computers
Hello I want to be able to run outlook at home and at work, but have the files stored on my USB storage device. I can see where the .pst file is storred on each computer, but cannot figure out how change the location of the .pst file in setup. Can anyone help? Thanks You should'nt rely on the integrity of a pst stored in such a way. In OL File/Open/Data File (wording depends on version) and browse to the pst You can either, in OL, alter the default pst or use the usb pst as a backup <rhatala@stny.rr.com> wrote in message news:cmsgq1h8taq0sp0qb2om5cvqg2gtnbgr32@4ax.com......

Timeout/Out of memory
We have a CRM implementation with an unusually large number of Resource Groups (more than 10,000) as they are used for both skills and geographical breakup. The problem is that CRM's handliong of this is less than ideal in the System User dialog and whenever a user selected the "Resource Groups" related view or "Serivces" related view we get timeouts followed by an Out of Memory exception which kills the w3wp process. I have discovered from the logging that the system queries each group in the system in turn to see if the user is a member or not, one at a time. Not a...

Not being able to view shared folder contents
It happens both on the client and on the server when I attempt to access the folders via UNC. I can access the folder via explorer just fine. The permissions seem to be all right. Any ideas? yaro On 9 June, 11:10, yaro137 <yaro...@googlemail.com> wrote: > It happens both on the client and on the server when I attempt to > access the folders via UNC. I can access the folder via explorer just > fine. The permissions seem to be all right. Any ideas? > yaro Furthermore when I try to remove the share to then recreate it a message tells me that 4 users are connected to...

share outlook caledar oon the network without exchange
The only way to share a calendar with other users on a network without having Exchange is if the users have Outlook 98 or 2000. Then you could use Net Folders to share the calendar through e-mail. Here is a link to an article that explains Net Folders, http://support.microsoft.com/default.aspx?scid=KB;EN-US;258619. I hope this information is helpful. Robert Findlay Partner Technical Lead -- Outlook/Office Setup Microsoft Technical Support for Platforms and Business Applications -------------------- >Content-Class: urn:content-classes:message >From: "Paul Meyer" <...