|
Too Vague Kash.
Ask something more specific or give more details.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Dear All,
I would like to have 2 different views for a document. Each view to be display one at a time or together using a splitter window at any point of time.
How best should I approach this? I'm open to any new ideas.
I've just started programming and I think my question will be trivial to most of you out there. Thanks very much for taking the time to help me out
Regards,
Chun Te
|
|
|
|
|
If when you say different views you mean, different view classes, then you should use a Splitter Window and create static views, look at MSDN.
Its difficult to create a Static Splitter window which can turn into a single window since the Splitter Asserts if there is only once view. have a look in the Splitter Section of codeproject.. there might be some ideas you can use.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
I've used this class, ST_SplitterWnd,to do just what you want. I have two views which are the same because the view has a tab control. The dual views allows the user to see two different tabs of data at once, if desired.
It is here on Code Project in the Articles section. BTW, the class has a nice function called ToggleSide() which allows hiding one of the views. Thus, you can add both views and hide one and the user only sees one. But, when the user wants a second view, you just call ToggleSide() again.
|
|
|
|
|
Hi,
I have written a MFC Extended dll.It works fine in Debug mode.In Release mode if i use /MDd it works.But if i use /MD it crashes. Could any one pl tell me why is it happening so?
Thanks
Neha
|
|
|
|
|
You have probably screwed something with project settings. What exactly crashes?
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
A third party dll(IMGSCAN.OCX)loads my dll(It is a TWAIN Datasource).If i use /MD configuration it says access violation in imgscan.ocx .
|
|
|
|
|
You've mentioned in original post that your dll is 'MFC extended'. There are two kinds of MFC-based DLLs: MFC extensions DLLs and regular MFC dll. If you have MFC extension DLL, then it can be used only by .exe which link to MFC as well. If 3rd party module is not using MFC, then you're heading into crashland.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
It is a MFC extension dll. 3rd party module does uses MFC.
|
|
|
|
|
You mean the program hosting .ocx? Does it link dynamically with MFC?
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
I don't have the code for host application.So i don't know anything. Also it works fine, if i link my MFC dll using static library.
|
|
|
|
|
The rule is quite simple: you can create MFC extension .dlls *only* if client app (the OCX host in your case) is linking dynamically with MFC.
Seems you'll have to switch to regular DLL or link statically.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
If i switch to regular dll also i will get that problem.
Any idea?
|
|
|
|
|
If you switch to regular DLL then your .dll interface must be C-style, e.g. no MFC objects passed around --and-- each exported function must have AFX_MANAGE_STATE macro.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
I had tried that but same result.
If i
a)link statically or dynamically
OR
b)make it a regular or extension dll
also if i have MTD or MDD then only it works in the release mode.
|
|
|
|
|
Just an obvious note, but make sure that you are using the appropriate
dll build.
The debug and release compilation of your dlls are not compatible!
The debug DLL produced will NOT work with the release build of the client using it. Debug Client -> Debug DLL [AND] Release Client-> Release DLL.
-Chin-
|
|
|
|
|
Neha wrote:
Could any one pl tell me why is it happening so?
It's most certainly because of you limiting the input set. Last I checked "pl" was the country letters for Poland, and if you only want answers from Poland, perhaps you have stumbled in on the wrong site?
Yes, I'm an a**hole, but at least I try to spell!
|
|
|
|
|
I created a CDblyLinkList<t> class and put into DblyLinkList.h and DblyLinkList.cpp file in a common folder of many projects.
In the header file declaring CTIFRowset, of a DLL project, I included "..\common\DblyLinkList.h", and the class has a variable m_rowlist of CTIFRowList, which is typedefed in CTIFRow header file as CDblyLinkList<ctifrow *="">.
The CDblyLinkList.h and CDblyLinkList.cpp were added to the DLL project.
When I built it, all compiles correctly, but i got many linking errors like:
Tracy error LNK2019: unresolved external symbol "public: __thiscall CDblyLinkListIterator<class ctifrow="" *="">::CDblyLinkListIterator<class ctifrow="" *="">(class CDblyLinkListIterator<class ctifrow="" *=""> &)" (??0?$CDblyLinkListIterator@PAVCTIFRow@@@@QAE@AAV0@@Z) referenced in function "public: __thiscall CTIFRowset::CTIFRowset(class CTIFRowset &)" (??0CTIFRowset@@QAE@AAV0@@Z)
|
|
|
|
|
Did you create CBlyLinkListIterator copy constructor? Or is it only declared in .h file?
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
yes, i did declared the copy constructor. The error I shown was a instance of error. Actually, it has many, such as:
Tracy error LNK2019: unresolved external symbol "public: class CDblyLinkListIterator<class ctifrow="" *=""> __thiscall CDblyLinkList<class ctifrow="" *="">::end(void)" (?end@?$CDblyLinkList@PAVCTIFRow@@@@QAE?AV?$CDblyLinkListIterator@PAVCTIFRow@@@@XZ) referenced in function "public: __thiscall CTIFRowset::CTIFRowset(class CTIFConnection *)" (??0CTIFRowset@@QAE@PAVCTIFConnection@@@Z)
Tracy error LNK2019: unresolved external symbol "public: __thiscall CDblyLinkListIterator<class ctifrow="" *="">::CDblyLinkListIterator<class ctifrow="" *="">(class CDblyLinkListIterator<class ctifrow="" *=""> &)" (??0?$CDblyLinkListIterator@PAVCTIFRow@@@@QAE@AAV0@@Z) referenced in function "public: __thiscall CTIFRowset::CTIFRowset(class CTIFRowset &)" (??0CTIFRowset@@QAE@AAV0@@Z)
Tracy error LNK2019: unresolved external symbol "public: void __thiscall CDblyLinkList<class ctifrow="" *="">::erase(class CDblyLinkListIterator<class ctifrow="" *="">)" (?erase@?$CDblyLinkList@PAVCTIFRow@@@@QAEXV?$CDblyLinkListIterator@PAVCTIFRow@@@@@Z) referenced in function "public: bool __thiscall CTIFRowset::Delete(void)" (?Delete@CTIFRowset@@QAE_NXZ)
The declaration was in a .h file, and implementation was in a .cpp file.
|
|
|
|
|
I think in Template Classes you have to add an include statement to the implementation file in the header file.
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Original post mentions that both .cpp and .h are parts of project.
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
No i mean in the header file you should
#include "poo.cpp",
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
Now I got what do you mean. Yes, this may have been the problem
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|
|
1) since CP forum code strips triangle brackets by default, use 'display this message as-is (no HTML) option. I'm not sure if your CDblyXXx classes are actually templates (probably they are).
2) you can't link DLL or EXE?
Tomasz Sowinski -- http://www.shooltz.com
To some its a six-pack, to me it's a support group
|
|
|
|