Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I create a Dialog box with s

Status
Not open for further replies.

youssef

Programmer
Mar 13, 2001
96
BE
Hi,

I create a Dialog box with some controls.
I would like to use my Dialog box for another application in VC++.
How can I do for import this dialog with all controls ?

Best Regards
 
Go to resource view and open the dialogs folder in the list on the left. Select the dialog resource you want and choose "copy" from the edit menu.

Paste the resource into the new project. Also, copy and paste the dialog's .cpp and .h files. You may or may not have to resolve the resource identifier from the old resource.h file.

Add the .cpp and .h files to the new project by choosing the "project->add files to project" menu.

When you create a dialog that you want to reuse in other projects, best to create a DLL or static library. This'll also make you code compile faster.

[rockband]
tellis.gif

programmer (prog'ram'er), n A hot-headed, anorak wearing, pimple-faced computer geek.
 
thanks for the link I understand but I can't insert my Dialog in my pgm. So I see in the samlpe code that we have 2 workspaces, 2 ressourceview but when I
Go to View|Resource Includes, and add your .h file to the symbol directives, and your .rc file to the compile-time directives but after nothing I don't see my dialog box.

Can you help me for that
 
under the resources|general property page did you add your path to the "Additional Include directories"?
 
when I go to the resource includes and includes the files, I see an error message : directive text will be written verbatim into your ressource script and may render it uncompilable. Press Ok or cancel ?

what is that ?
 
Now I can see my dialog box in FILEVIEW|EXTERNAL DEPENCIES|the files lib.rc
Now What is the next step for use this in my new project ?

Best regards
 
im not entirely sure of how you have it all set up. but if youve linked your library correctly and included the header file in the right .cpp or .h file, then you should be able to use the dialog just like you would any other dialog.

what version are you using?

 
I have the last version of Visual studio with pack 5.

Yesterday, At 02:00 I can copy the dialog in my project.
All is working .

If you can help me. I would like to use Utility Project
for separate my project like the sample code.

Do you have some litterature, link about this ?

Best Regards
 
hmmm...

well, im using visual studio .net which has a different ide to it. so im not familiar w/ your version.

but the link i posted above is for creating a library in one project and creating an executable in another project. then link the exe proj to the .lib, .h, and .rc files created by the library project. the two projects can be in the same workspace/solution or they can be in two separate workspaces/solutions.

and i think the link is for visual studio 6.0.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top