|
I then inserted the instructions:
GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
Image* image = new Image(L"C:\\Poser4\\~~~~~.bmp");
and the result was successful compilation and these 7 linking faults:
>qwerty.obj : error LNK2019: unresolved external symbol _GdiplusStartup@12 referenced in function "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z)
1>qwerty.obj : error LNK2019: unresolved external symbol _GdipFree@4 referenced in function "public: static void __cdecl Gdiplus::GdiplusBase::operator delete(void *)" (??3GdiplusBase@Gdiplus@@SAXPAX@Z)
1>qwerty.obj : error LNK2019: unresolved external symbol _GdipAlloc@4 referenced in function "public: static void * __cdecl Gdiplus::GdiplusBase::operator new(unsigned int)" (??2GdiplusBase@Gdiplus@@SAPAXI@Z)
1>qwerty.obj : error LNK2019: unresolved external symbol _GdipLoadImageFromFile@8 referenced in function "public: __thiscall Gdiplus::Image::Image(wchar_t const *,int)" (??0Image@Gdiplus@@QAE@PB_WH@Z)
1>qwerty.obj : error LNK2019: unresolved external symbol _GdipLoadImageFromFileICM@8 referenced in function "public: __thiscall Gdiplus::Image::Image(wchar_t const *,int)" (??0Image@Gdiplus@@QAE@PB_WH@Z)
1>qwerty.obj : error LNK2019: unresolved external symbol _GdipDisposeImage@4 referenced in function "public: virtual __thiscall Gdiplus::Image::~Image(void)" (??1Image@Gdiplus@@UAE@XZ)
1>qwerty.obj : error LNK2019: unresolved external symbol _GdipCloneImage@8 referenced in function "public: virtual class Gdiplus::Image * __thiscall Gdiplus::Image::Clone(void)" (?Clone@Image@Gdiplus@@UAEPAV12@XZ)
Please what now??????????
|
|
|
|
|
You have to link to Gdiplus.lib too.
Select Project properties menu item, the choose Configuration Porperties->Linker->Command Line and add Gdiplus.lib to the additional options textbox.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
Uh, wonderful! Enjoy yourself with GDI+ .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi,
I am trying to implement my own dialog with its own style and myDialog wraps CDialog.
All works fine except Title bar buttons:
http://img517.imageshack.us/img517/2269/mydialoggv0.jpg[^]
(as you see on the picture)
When i minimize or maximize myDialog, some times its CDialog is drawing its titlebar buttons above my buttons.
Does anyone knows anything about this?
Thanks,
Cem
|
|
|
|
|
you can remove WS_MINIMIZEBOX and WS_MAXIMIZEBOX style for Dialog. then draw them youself.
Are you have gtalk ? please add me: xiangyangzhao@gmail.com
|
|
|
|
|
Hai Cem,
I just wnat to know how to implement our own dialog with its won style such as different buttons, different background.
I would appriciate if you can provide me any sample code link.
Saadhinchaali
|
|
|
|
|
Hi all,
I would like to know wheter it is better to declare a structure in a class or in a global space with regards to memory usage?
Can anyone please give me some advice?
Many Thanks in advance
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Programm3r wrote: I would like to know wheter it is better to declare a structure in a class or in a global space with regards to memory usage?
Memory usage should be the same. Anyway, IMHO that isn't the point: nested structs are declared to avoid name collisions.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
If the structure was declared globally, it would always exist on the stack. If it was declared within a class, it would only exist if an instance of the class also existed.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: If the structure was declared globally, it would always exist on the stack. If it was declared within a class, it would only exist if an instance of the class also existed.
The above is true for an instance of the struct not for the struct type itself.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
but a type itself doesn't exist in memory... only instances of this type.
|
|
|
|
|
OK. But the OP, IMHO, refers to the struct type declaration (i.e. to the memory usage of the instances of either globally declared struct type or the class nested struct type).
BTW your sentence isn't completely true (missing static members? ).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
CPallini wrote: BTW your sentence isn't completely true (missing static members? ).
nope, my sentence is still valid. even statics are concerned.
for global statics, types don't exist in memory, only instances.
for static class members, same is true.
modified on Monday, December 17, 2007 11:06:49 AM
|
|
|
|
|
Well this is a rather philosophic debate and technically I'm surely wrong... What I mean is that whenever you declare a static class member, you implicitely force that member instatiation hence memory usage without class instances around.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Of course, but since the OP did not specify, I opted for the former since most folks asking such a question would not be able to differentiate between the two.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
DavidCrow wrote: ince most folks asking such a question would not be able to differentiate between the two
Uhm, I think you're right.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I have the free download version of Visual C++ 2008.
I asked the above question recently, and was told to read http://msdn2.microsoft.com/en-us/library/zebw5zk9(VS.80).aspx . However, that page is for Visual C++ 2005, which uses different DLL's and mentions things that my Visual C++ 2008 does not have. So, please:
Which of the relevant Visual C++ 2008 DLL's do what and are needed for what?
Can they be merely put in the same directory/folder as the .EXE file, or do they have to be in a particular directory structure?
|
|
|
|
|
|
Thanks.
I tried it: I installed it; I dragged typecase_vc.exe into it, and it made a massive list of names of DLL's.
I then tried it on typecase.exe, which was compiled on my old Borland C++ 4.5 compiler, and I know that it only needs a Borland DLL called CW3215.DLL to make it run on other computers; but for typecase.exe Dependency Walker also made a massive list of names of DLL's. Of those, the rest are presumably permanent Windows DLL's.
Please how do I tell Dependency Walker not to list DLL's which are in Windows?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I compiled typecase_vc.exe under Windows Vista. When it is accompanied by the necessary DLL's, which versions of Windows would it run under?
|
|
|
|
|
actually, Depends.exe returns every dependency... but most of the time, the DLLs needed are Windows DLL (so, no need to provide them once again).
|
|
|
|
|
toxcct wrote: actually, Depends.exe returns every dependency...
There's no way for Depends.exe to know of DLLs that are linked explicitly.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Anthony Appleyard wrote: However, that page is for Visual C++ 2005, which uses different DLL's and mentions things that my Visual C++ 2008 does not have.
So read the page MSDN has that discusses deploying VS2008 applications which the other one you supposedly read has a link for.
|
|
|
|
|
Thanks. On top right corner of the Determining Which DLLs to Redistribute" page, I found and followed a link to the "Determining Which DLLs to Redistribute" page for 2008, which lists these DLL's: atl90.dll (Active Template Library); msvcm90.dll msvcp90.dll msvcr90.dll (C Runtime and Standard C++ Libraries); mfc90.dll mfc90u.dll mfcm90.dll mfcm90u.dll mfcmifc90.dll . But of those, atl90.dll mfc90.dll mfc90u.dll mfcm90.dll mfcm90u.dll mfcmifc90.dll do not seem to be anywhere in my C:\Program Files\Microsoft Visual Studio 9.0\ directory tree.
That page says "This page is specific to Microsoft Visual Studio 2008/.NET Framework 3.5", but also "Redist.txt is located in the Program Files\Microsoft Visual Studio 2005 directory on the second Visual Studio 2005 product CD or on the DVD.". Please what is happening. I am sorry to take up so muc of your time.
|
|
|
|