|
Hello,
I'm using the source from the THIS ARTICLE:
http://www.codeproject.com/dialog/cdialogsk.asp[^]
but when I run this code:
.h file:
http://pastebin.com/887372[^]
.cpp file:
http://pastebin.com/887377[^]
I'v got the following errors:
<br />
<br />
1>DOLPHIN_MFC.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CDialogSK::~CDialogSK(void)" (__imp_??1CDialogSK@@UAE@XZ) referenced in function "public: virtual __thiscall CDOLPHIN_MFCDlg::~CDOLPHIN_MFCDlg(void)" (??1CDOLPHIN_MFCDlg@@UAE@XZ)<br />
1>DOLPHIN_MFCDlg.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall CDialogSK::~CDialogSK(void)" (__imp_??1CDialogSK@@UAE@XZ)<br />
1>DOLPHIN_MFCDlg.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall CDialogSK::CDialogSK(unsigned int,class CWnd *)" (__imp_??0CDialogSK@@QAE@IPAVCWnd@@@Z) referenced in function "public: __thiscall CDOLPHIN_MFCDlg::CDOLPHIN_MFCDlg(class CWnd *)" (??0CDOLPHIN_MFCDlg@@QAE@PAVCWnd@@@Z)<br />
1>DOLPHIN_MFCDlg.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: virtual void __thiscall CDialogSK::DoDataExchange(class CDataExchange *)" (__imp_?DoDataExchange@CDialogSK@@MAEXPAVCDataExchange@@@Z) referenced in function "protected: virtual void __thiscall CDOLPHIN_MFCDlg::DoDataExchange(class CDataExchange *)" (?DoDataExchange@CDOLPHIN_MFCDlg@@MAEXPAVCDataExchange@@@Z)<br />
1>DOLPHIN_MFCDlg.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: static struct AFX_MSGMAP const * __stdcall CDialogSK::GetThisMessageMap(void)" (__imp_?GetThisMessageMap@CDialogSK@@KGPBUAFX_MSGMAP@@XZ) referenced in function "protected: static struct AFX_MSGMAP const * __stdcall CDOLPHIN_MFCDlg::GetThisMessageMap(void)" (?GetThisMessageMap@CDOLPHIN_MFCDlg@@KGPBUAFX_MSGMAP@@XZ)<br />
1>DOLPHIN_MFCDlg.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) protected: virtual int __thiscall CDialogSK::OnInitDialog(void)" (__imp_?OnInitDialog@CDialogSK@@MAEHXZ) referenced in function "protected: virtual int __thiscall CDOLPHIN_MFCDlg::OnInitDialog(void)" (?OnInitDialog@CDOLPHIN_MFCDlg@@MAEHXZ)<br />
1>C:\Documents and Settings\Semion Naidis\My Documents\Visual Studio 2005\Projects\DOLPHIN_MFC\Debug\DOLPHIN_MFC.exe : fatal error LNK1120: 5 unresolved externals<br />
Why, And how can I solve them?
***Another little ask-Do you know any classes with a button that looks like switchs with On And OFF?
You know this metal switch...
SnaidiS(Semion)
|
|
|
|
|
Anybody please?
SnaidiS(Semion)
|
|
|
|
|
They are all linker errors and from the looks of it, you are missing the object code that
implements the CDialogSK class. If the sample code was provided as a library then you can link to
that (add the library to your project). If the sample code is in source form then you could add
the source files to your project.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
I added the files but maybe I'm adding it in a wrong way, can you please give me the correct steps to add .h and .cpp files to my project?
SnaidiS(Semion)
|
|
|
|
|
I usually right click on the "Source Files" folder under the project in the solution explorer.
Choose "Add"/"Existing item..." and select the .cpp files I wanrt to add. Repeat for the .h
files in the "Header Files" folder. This can also be done from the "Project" menu and I imagine
with drag-n-drop as well.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
(Rex Kramer "Airplane!")
|
|
|
|
|
Hey guys, Im working on a small app that deals with loading different types of images(jpeg etc...). My problem is, when I use a scroll bar the image doesnt move, or a least show movement; however, the image bands. What I mean by bands is, that it moves the requested direction, but the image doesnt change, it just shows a smaller portion of the initial image and scrolls whats left over.
say image = xxx
after the scroll command i get x|xxx
I figure its a redraw error, but its got me stumped. Here's what Im doing:
<br />
ScrollWindowEx(nScrollDirection, 0, NULL, &thisWindow, NULL, NULL, <br />
SW_INVALIDATE | SW_ERASE | SW_SCROLLCHILDREN);<br />
<br />
<br />
RedrawWindow(&thisWindow, NULL, RDW_ALLCHILDREN | <br />
RDW_UPDATENOW | RDW_FRAME); <br />
I win because I have the most fun in life...
|
|
|
|
|
are you moving the place where you draw the image?
|
|
|
|
|
haha, im not sure, which leads me to believe that im not... looks like its back to the good ole msdn drawing board... (no pun intended)
I win because I have the most fun in life...
|
|
|
|
|
Option 1: Adjust the X, Y drawing coordinate to match relative scroll position.
Upper left corner is 0, 0 so to scroll image up one line Y = Y – size of line.
Option 2: Take a look at CScrollView, which provides more information.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Isn't there a way to view the number of running threads in one application? I forget where.
|
|
|
|
|
Yes. Use the Thread32First() /Thread32Next() pair.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Could someone please point me in the right direction to Canonicalise (c14n) an XML document in C++.
Thank you so much.
|
|
|
|
|
Hi,
How can i determine, if an specific project is using unicode character set or multibyte character set is there any macro.
Warm Regards,
Mushq
|
|
|
|
|
Mushq wrote: How can i determine, if an specific project is using unicode character set or multibyte character set is there any macro.
if UNICODE, _UNICODE is defined then it's unicode project.
|
|
|
|
|
Just to clarify, are you asking how to see if the application is going to be built as a UNICODE, ANSI/SBSC, or MBCS application? If so, then checking for the _UNICODE , or _MBCS preprocessor defs is the way to go.
However, an application that is built as an ANSI/SBCS app is more than capable of managing UNICODE data and using UNICODE APIs, and vice-versa, so I want to make sure exactly what you mean by "using".
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Hi all,
i want to know exactly why there will not be any Virtual Constructors but There exist a Virtual Destructor.
Please let me know the exact reason behind this.
Uday kiran
|
|
|
|
|
please search the board and some FAQs, this question has been asked bilions of times
|
|
|
|
|
Does the v-table exist at the time the class' constructor is invoked? I think a virtual constructor would actually be pretty pointless since it is used for derived classes. See here for more.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks David, You have give a more valuable information.
thank you very much.
Uday kiran
|
|
|
|
|
uday kiran janaswamy wrote: You have give a more valuable information.
He didn't give "information" to you he gave you a "pointer" to it. Typical C++ nub... not understanding pointers.
led mike
|
|
|
|
|
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
I think you misunderstood what he wrote.
it should have been something like :
You have given me a most valuable information.
or something like that.
|
|
|
|
|
When an object is created you are specifying the exact object type.
It is constructed from the inside out so there is no need for a v-constructor.
Once an object exists it can be pointed to by a pointer to a parent class type.
Yet, the object needs to be destroyed from the outside in.
Without a v-destructor destruction would start with the type of the pointer not of the actual object.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
In Other words, When the First Step of construction takes place, we are constructing the Root Class, which has the V-Table of the Root Class.(No Idea yet of Your Classes' V-Table) If the language allowed you to declare a Virtual constructor, it would be in the V-Table of your final class, and only be available AFTER your class was constructed. Now that would be realy like mustard after the meal. Ofcourse someone could write a compiler which takes account of these things. The language it compiles would no longer be cpp though.
The long and short of it is therefore, If you need a Virtual Constructor, you are organising your code wrong. Look at your code and try again.
regards
LateNightsInNewry
|
|
|
|
|
LateNightsInNewry wrote: The long and short of it is therefore, If you need a Virtual Constructor, you are organising your code wrong. Look at your code and try again.
Even if you need one, C++ is not going to let you have one. That would be a compile time error blunder.
The greater the difficulty, the greater the glory.
- Marcus Tullius Cicero
|
|
|
|