Combining Resources

This is a discussion on Combining Resources within the Windows Programming forums, part of the Platform Specific Boards category; I am new to programming with the windows API, and I figured that what I want to do is possible, ...

Combining Resources

I am new to programming with the windows API, and I figured that what I want to do is possible, but I didn't even know what to search for to find out more about it.

More specifically, I am programming for Windows Mobile 6.5. I have created my own open file dialog because the one that is provided by the API is useless. Now I want to take the open file dialog and all of its functionality, and drop it into another project. The problem is that when I drop my resource files into another project, I get conflicting ID numbers. For example:

Code:

#define IDS_MENU 102

appears in my project, and

Code:

#define IDC_BROWSE 102

is a resource in the dialog that I am bringing in.

Short of going through and manually reassigning numbers, is there any way that I can drop this dialog into my new project and not have any conflicts? I want to just add the resource files to the project, and add:

Thanks for the reply novacain. I didn't know that controls could share a resource ID number as long as they were in different windows. Does that mean that if I create a separate .rc file that contains the dialogs that I want to use in multiple apps, I should just be able to drop it in and go?