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 ?
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.
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.
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 ?
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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.