Free since 2005 · No login required
AT

Academic Tutorials

Learn at your own pace

site-mobile-top-banner · 320x50

How can I copy a dialog resource from one project to another?

You can copy the resource directly. Open the .rc files from both projects in VC++ as text files, or open them in your favorite text editor, and copy the relevant bits from one to another. You can spot the portion of the file you need to copy by looking for the section where the dialog resource is defined, which will be something along the lines of: IDD_MYDIALOG_ID DIALOG DISCARDABLE 0, 0, 235, 55 where IDD_MYDIALOG_ID is the id of your dialog. Copy the full thing until the END statement. You'll also need to add the dialog id to the new project, either by using DevStudio's facilities for doing so, or by directly editing resource.h.