Copying Resource from One Workspace to Another
-
Is it possible to copy a dialog resource in one workspace and add it to the resources in another workspace? Thanks in advance.
John P.
-
Is it possible to copy a dialog resource in one workspace and add it to the resources in another workspace? Thanks in advance.
John P.
open one of the two workspaces, and the resource file of the other workspace. the drag n' drop the dialog from one to the other. if that doesn't work, open the doalog template, select all the controls on it (Ctrl+A should do) and paste on an empty, freshly created dialog of the resource file to edit. save, close.
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
Is it possible to copy a dialog resource in one workspace and add it to the resources in another workspace? Thanks in advance.
John P.
Hi. I hope you were successful. I have a problem while trying to insert a resource for the dialog. Below is the code i am trying to use to create a dialog: After i insert the resource and create a new class for the dialog, it cant find the Script1.rc which has the dialog ID. If you can help me i'm really stuck: Below is my code: #include #include "resource.h" #include "newdialog.h" //my new dialog class class MFC_Tutorial_Window :public CFrameWnd { public: MFC_Tutorial_Window() { Create(NULL,"MFC Tutorial Part 5 CoderSource Dialog"); } void OnClickDialogNew(); DECLARE_MESSAGE_MAP() }; BEGIN_MESSAGE_MAP( MFC_Tutorial_Window, CFrameWnd) ON_COMMAND(ID_MYDIALOG,OnClickDialogNew) END_MESSAGE_MAP() void MFC_Tutorial_Window::OnClickDialogNew() { NewDialog dlg; dlg.DoModal(); } class MyApp :public CWinApp { MFC_Tutorial_Window *wnd; public: BOOL InitInstance() { wnd = new MFC_Tutorial_Window(); m_pMainWnd = wnd; m_pMainWnd->ShowWindow(1); return 1; } }; MyApp theApp;
TreeS
-
open one of the two workspaces, and the resource file of the other workspace. the drag n' drop the dialog from one to the other. if that doesn't work, open the doalog template, select all the controls on it (Ctrl+A should do) and paste on an empty, freshly created dialog of the resource file to edit. save, close.
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
Thanks, toxcct --- I'll give it a try.
John P.
-
open one of the two workspaces, and the resource file of the other workspace. the drag n' drop the dialog from one to the other. if that doesn't work, open the doalog template, select all the controls on it (Ctrl+A should do) and paste on an empty, freshly created dialog of the resource file to edit. save, close.
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
Neither of those approaches worked. Anything else you can think of? I tried copying all the .aps/.clw/.ncb/.opt/.plg/.rc files over to an older version and that didn't help either. Right now, I guess I'll just have to re-create the dialog into the version now running. Thanks for your response.
John P.
-
Neither of those approaches worked. Anything else you can think of? I tried copying all the .aps/.clw/.ncb/.opt/.plg/.rc files over to an older version and that didn't help either. Right now, I guess I'll just have to re-create the dialog into the version now running. Thanks for your response.
John P.
Try opening the old .rc in text mode, finding the dialog in question and copy / paste it into the new .rc (also open in text mode). You'll need to add any control IDs that exist in the dialog in question to the resource.h.
jparken wrote:
aps/.clw/.ncb/.opt/.plg
These are internal work files (class wizard, resource editor, build output, intellisense, ...) created on the fly by the IDE. They should never be copied when moving things between workspaces / solutions. Judy
-
Try opening the old .rc in text mode, finding the dialog in question and copy / paste it into the new .rc (also open in text mode). You'll need to add any control IDs that exist in the dialog in question to the resource.h.
jparken wrote:
aps/.clw/.ncb/.opt/.plg
These are internal work files (class wizard, resource editor, build output, intellisense, ...) created on the fly by the IDE. They should never be copied when moving things between workspaces / solutions. Judy
Thanks, Judy. I'll try it your way.
JudyL_FL wrote:
These are internal work files (class wizard, resource editor, build output, intellisense, ...) created on the fly by the IDE. They should never be copied when moving things between workspaces / solutions.
I was grasping at straws and hoping --- thanks for the info.
John P.