|
Anthony Appleyard wrote: Thanks everybody
man, I was alone on this thread
BTW, please read the WHOLE page after now, because I didn't invent anything. all you need was provided in the first related link.
|
|
|
|
|
toxcct wrote: because I didn't invent anything.
Ahh, don't be so modest, Tox. We all know that your middle name is bmp-to-jpg.
"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
|
|
|
|
|
|
I have the free version of Visual C++ 2008.
In reply to this query, you told me to read http://msdn2.microsoft.com/en-us/library/ms533798.aspx about GDI+.
I went from there to its subpage about "Setting JPEG Compression Level", which has an example coding. Thus, I first inserted the line
#include <gdiplus.h>
in a small test program. The result was 104 compile errors and 8 warnings, of which the first were:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1>c:\program files\microsoft sdks\windows\v6.0a\include\gdiplusimaging.h(74) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...\include\gdiplusimaging.h(74) : error C2440: 'initializing' : cannot convert from 'const char [37]' to 'int'
1> There is no context in which this conversion is possible
...\include\gdiplusimaging.h(74) : error C2146: syntax error : missing ';' before identifier 'IImageBytes'
...include\gdiplusimaging.h(74) : error C2470: 'IImageBytes' : looks like a function definition, but there is no parameter list; skipping apparent body
...\include\gdiplusimaging.h(74) : error C2059: syntax error : 'public'
...\include\gdiplusimaging.h(280) : error C2146: syntax error : missing ';' before identifier 'id'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please, what should I do now?
|
|
|
|
|
I inserted #include (less-than-sign) gdiplus.h (greater-than-sign) :: the %^&*&* vagaries of HTLM code.
|
|
|
|
|
for < > lines just use a blank space to separate the signs from the texts
#include < header.h >
template < BLABLABLA >
or click on Ignore HTML tags in this message (good for code snippets)
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Nelek wrote: for < > lines just use a blank space to separate the signs from the texts
...or just type < >
|
|
|
|
|
Yes, you are right, I forgot the new issues
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Probably you have to remove
#define WIN32_LEAN_AND_MEAN
in your stdafx.h header (or wherever else it is in your project).
see http://www.gamedev.net/community/forums/topic.asp?topic_id=303606[^]
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.
|
|
|
|
|
Thanks. That cured it. ~~~~
|
|
|
|
|
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
|
|
|
|