CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Posts
    18

    Copying a dialog to another project

    Hi,

    I want to copy a dialog box and its associated code into another project. I'm having trouble doing it and class wizard seems to get confused by the things I try. What is the best way to accomplish this task?

    Thank.

    Cornel Van Egmond


  2. #2
    Join Date
    May 1999
    Location
    Paris, France
    Posts
    216

    Re: Copying a dialog to another project

    1)Open the project where you whant to copy the dialog
    2) Open the rc File where is the dialog
    3) Do a copy With Drag and drop to the ressource file of the project
    4) Insert the files (h, cpp) which described the class of the dialog box


  3. #3
    Join Date
    May 1999
    Location
    Rochester, NY USA
    Posts
    65

    Re: Copying a dialog to another project

    First open the project (the destination of the dialog box).
    File \ Open of the .rc file of where the dialog box current exist.
    Highlight the dialog resource that you want to copy, hit ctrl+c. Click on the resource tab of the current project and click on the dialog folder. Hit ctrl+v (paste)

    Now code the source code to the new directory.

    Now to make the code wizard understand, you can do 2 things.
    1) Display the new dialog box in the window and hit ctrl+w (code wizard). It will ask you if this a new dialog, or use an existing dialog. Choose existing. It will then ask you for the file names.

    2) Delete the .clw in the project folder. Then bring up code wizard, it will ask you to build for the projects files, say "yes".

    NOTE: Make sure that the dialog ID number in the resource file matches the ID number in the source code.

    I hope this helps and you can follow this.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured