|
Okay, thanks for the prompt reply.
Is there a way to achieve what I wanted, as in combine 2 programs such that the dialog box of 1 program will open up the dialog box of the other program. They are in different workspace
|
|
|
|
|
Well, if you have to do something like that, it probably means you have a design issue. Why would you want to open a dialog box from a completely different project ?
|
|
|
|
|
I thought it will be a common problem. As in for large scale project, normally there are 2 or more ppl doing a project. Each person will be in charge of a certain part of the project. Later, they will combine their individual sub-project into one project.
|
|
|
|
|
kindaichinisan wrote: Later, they will combine their individual sub-project into one project.
You cannot "combine" several projects into one. Unless you are talking about code.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi gray man.
|
|
|
|
|
I'll see to it if I can make you a red man.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
kindaichinisan wrote: As in for large scale project, normally there are 2 or more ppl doing a project. Each person will be in charge of a certain part of the project. Later, they will combine their individual sub-project into one project.
That's not how it is done. Typically, everybody will have a 'copy' of the workspace and work on it. The full project is managed through a versioning system (like SVN) which allows each developper to submit his changes. The versioning system will then merge the changes with the previous version.
|
|
|
|
|
This is actually a lot simpler than these veterans are making it, Kindaichini-san
Create your first dialog, and the second, in separate (or the same) workspaces, and get them both running.
You'll notice that you have created a CSOMENAMEDlg class. Your "program" is in the CSOMENAMEApp.cpp file and consists of
include #CSomenameDlg.h
...
CSomenameDlg myDialog;
myDialog.doModal();
... "
All you have to do to combine the two is, create a copy of the "master" dialog, or create a new win32 app, as a master project, and then make sure you get all the files that your CSomenameDlg class needs to compile in that master project.
If you want to instantiate a CXXXDlg from a former, you need to make CXXXDlg member object, because when these go out of scope, they disappear.
You can either run them with .doModal() or with .Create(...), and I think if I keep typing, I'll reveal exactly how little I really know.. good luck!
-edit: /pre tag >.<
|
|
|
|
|
Hi bulg,
Your idea is to copy all the .h and .cpp file from my 2nd project folder to my first project folder. I managed to do that but for the 2 project folders, there is a resource.h file which keeps a list of ID names and numbers. There seem to be a unknown mechanism that ms visual c++ 6 use to keep track of ID (that I don't know else I may be able to proceed.) My question will be : how to merge 2 resource files together so that I would be able to call the dialog of Project 2 from a class of Project 1
Project 1
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
...
#define IDC_DOWN 1014
Project 2
#define IDM_ABOUTBOX 0x0010
#define IDD_ABOUTBOX 100
#define IDS_ABOUTBOX 101
...
#define IDC_UDTB_PULSEWIDTH 1005
#define IDC_UDTB_PULSEAMPLITUDE 1006
#define IDC_BN_START 1007
Thanks for all the help rendered by everyone.
|
|
|
|
|
This error msg occur when i am calling property sheet.
"
Debug Assertion Failed!
Program...
File:f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\dlgprop.cpp
Line:1184
For more information on how your program can cause an assertion failure,see the visual c++ documentation on asserts.
(Press Retry to debug the application)
"
I m using SDI type application in VC++ 2005, this problem is occured when i run my application in Debug mode.
If i run my application in Release mode then it is working properly, but i want to use in Debug mode .
So please tell me how can i remove this error.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Use your debugger to locate the problem properly. Press F5 to start, and once the crash occurs, use the callstack to locate the problem in your sources. You will be able to see a bit more in details what the problem might be (you'll also be able to inspect the different variables).
|
|
|
|
|
Its minimum info can you show line that products this error?
|
|
|
|
|
So have you looked at line 1184 of dlgprop.cpp ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi Gurus!
I am a relative newbie to VC++ and I am now working on a small VC++ prj wherein I need to convert what is currently an exported DLL into an exe.
An insight into what the DLL does:
It primarily exports User Interface functions for a parent app. The objective is to convert this DLL into a standalone exe application.
I'd be very thankful for any suggestions to get me going...
Thanks in advance,
Rennie.
|
|
|
|
|
The short answer is: you can't. But what you can do is start a new exe project from scratch and then reuse part of the code of your dll.
|
|
|
|
|
Thank you Cedric.. That much I did gather.
I was actually looking for some coding guidelines on how to convert the exported functions of the DLL when I add them in the exe (maybe a sample..)
Thanks again,
Rennie.
|
|
|
|
|
There's no guidelines because it totally depends of your code and which functionalities you want to 'convert'. There's no automated process neither. Think of it like if you want to take some functionalities of a standalone exe to put them into another one. The problem is the same.
|
|
|
|
|
Rennie76 wrote: I was actually looking for some coding guidelines on how to convert the exported functions...
There should be little, if anything, to convert. The functions, for the most part, can be put in the new project as-is, but you'll want to remove __declspec(dllexport) from them.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks David, this is what I was looking for...
Let me give an example of what the DLL main looks like (it's mainly an User Interface):
<pre>
CResourceModule _Module;
MY_OBJECT_MAP_BEGIN()
MY_OBJECT_ENTRY(WSPACE::UI::IID_MYUIObj, CMYUIObj)
MY_OBJECT_MAP_END()
// DLL Entry Point
extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpRs)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
_Module.Init(NULL, hInstance);
DisableThrdLibCalls(hInstance);
MY_RESOURCE_MAP_BEGIN(_Module)
MY_RESOURCE_MAP_MODULE_ENTRY(L"MYUIRes.loc")
MY_RESOURCE_MAP_END()
}
return TRUE;
}
</pre>
My question is if I put the same code (after I remove the explicit DLL references) in the _tWinMain() of my new EXE file, will it work???
|
|
|
|
|
Hi,
In my application i need to create shortcuts for the menu items.
I have done that by overridding the ProcessMessageFilter() method.
For the first time if i run my application all the short cuts are working fine. If i use the same combination again it is not working. Please help me...........
|
|
|
|
|
Hi,
After calling your function, are you passing message to default handler?
Please refer MSDN and its remarks section:
CWinApp::ProcessMessageFilter [^]
--
"Programming is an art that fights back!"
|
|
|
|
|
|
Hi all..
I dont have knowledge on Com...I no Basic Mfc..
I want to study COM..Any good site...where i can study..
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
Hi Manju,
I strongly recommend that you should learn (or at least begin learning) a technology by reading books. There may be several great articles over the internet, but reading a book is more important and will do you more good. At least that was my experience. Ask people over here to suggest you a good beginners book and I'm sure they will suggest you the best ones.
I'll recommend Beginning MFC COM Programming by Julian Templeman.
CodeProject has a dedicated article section for COM and COM+[^] as well.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
HI sir.
Thank you for ur suggestion..
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|