|
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.
|
|
|
|
|
Thanks, toxcct --- I'll give it a try.
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
|
|
|
|
|
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.
|
|
|
|
|
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 <afxwin.h>
#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
|
|
|
|
|
With the new time_t what is the optimum way to format it into a string? I’ll guess that %lld would work, but I can not find any clear recommendations.
time_t myTime;<br />
time(&myTime);<br />
sprintf("This is my Time %lld .", myTime)
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
The MS CRT supports the I64 modifier in the format string to indicate a 64-bit variable: %I64d
|
|
|
|
|
I thought lld was the same as I64d.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
MS must have added the ll modifier recently, in VC6 you have to use I64
|
|
|
|
|
I would suggest:
- In a global header:
#ifndef _WIN64
#define _USE_32BIT_TIME_T
#endif
This makes time_t (more) dependent on the target OS being 32bit or 64bit.
I consider this better than being (mainly) dependent on the compiler being VS6 or VS2005.
This should allow you to use %Id for printf with time_t, but ...
- Use either __time32_t or __time64_t (and related functions) explicitly.
Provide interfaces to handle both __time32_t and __time64_t.
If anyone will ever need to link to your API they will thank you.
If you need to link to someone else's time_t based API (compiled w/ VS6) you will understand.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hello all,
I need to be able to use a bridge to one machine that I'm making, I'd like to receive support from the guys in the company that made that machine, but it seems impossible.
I'm a little bit lucky, because I have a TLB file which I can import inside the C++ application that I'm developing.
In one header file I've just added: AInterfaces::CTPCallbackPtr m_ptrA; And in one function of the cpp file:
HRESULT hr = 0;<br />
hr = m_ptrA.CreateInstance("{99e84b23-58bb-11cf-b26c-00aa00b5c372}");<br />
if (hr == 0)<br />
{<br />
}
The return value is -2147221008, that indicates that the error is an OLE error, but here is when I get completely lost.
Could you give me an advice on that?
As always thank you in advance...
-- modified at 13:35 Thursday 19th April, 2007
|
|
|
|
|
Use the Error Lookup tool included with VC to find out what that error means: CoInitialize has not been called
|
|
|
|
|
I've noticed that, and I've called the CoInitialize(NULL); with the same result.
Which tool do you mean?
As always thank you in advance...
|
|
|
|
|
Tools->Error Lookup in the IDE, and it's in the VC6 start menu group too.
|
|
|
|
|
I can promise you that I've looked into the start menu... and I've not seen that...
I think that now it's time to go home and sleep a little bit...
the error that appears is: "Non registered class".
Any idea?
Thank you
|
|
|
|
|
Joan Murt wrote: I can promise you that I've looked into the start menu... and I've not seen that...
Goto your msdev installation directory
%MsDevDir%\Common\Tools\ERRLOOK.EXE
|
|
|
|
|
"Non Registered class" means the class is not registered ! lol
more seriously it's because the COM server implementing your CLSID hasnot registered in windows' registry
|
|
|
|
|
How should I register it? because I've been able to see it there...
Thank you in advance.
|
|
|
|
|
Where do you remove help files from make?
I added Express 2005 and now I have a conflict with VC 6.0 help files.
I just need to temporary remove it from build.
I cannot find it in Project .. Settings.
Thanks for reading
Vaclav
Here is the error I get after renaming the hlp directory in an attempt to stop making the help file.
Making help file...
hlp\X_FFT.hpj(1) : error:
The system cannot find the file specified.
Error executing c:\windows\system32\cmd.exe.
|
|
|
|
|
Select Dependencies from the Project menu.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Found it!
I had a wrong include path for afxhelp.hm and my ;Phack in renaming the directory acually masked the real error message.
|
|
|
|
|
Hi!
I have developed a VC++ Dll. This Dll resides in a common location accessible to 2-3 applications (VC++ applications). Can anyone please tell me how can i limit only one application to call the DLL at a time.
My requirement is only one VC++ application should load the DLL at the same time. No two applications should load the DLL at same time.
This is very urgent. Any help is greatly appreciated.
-- modified at 10:52 Thursday 19th April, 2007
|
|
|
|
|
That sounds odd. One of the primary advantages of using DLLs is that more than one application can use it at a time. Why do you want to do that?
|
|
|
|