I dont find any way to play the animation of a loaded GIF file in C, not C++.
Is it possible ??
I tried using GDI+ with the gdiplusflat.h and i aborded with the error "unknown type: Graphics, Image, or Pen" when compiling.
Tried too with the types GpGraphics, GpImage, or GpPen and then i get an error on Color() and dont find what was the problem...
Yes, maybe i dont need Color() or Pen, but it was for testing if GDI+ was really there.
GdiplusStartupInput and GdiplusStartup() seem working.
Next, after many test/search, i found this, a C code for displaying GIF image :
JPG and BMP are ok, but GIF dont play the frames and looks to have no alpha.
So, is there a way to do this with the OLE !?
Or any other way that dont need switching to C++
I'm with CodeBlock IDE (MinGW and GCC) using the Win32 GUI.
Please help me! im a good rookie who begin in C
So i retry GDI+ and "pass" the error Color() with Color(Blue) and now it's DrawLine() error: undefined reference to pen...
C++ good code:
Graphics graphics(HDC hdc);
Pen pen(Color(255, 0, 0, 255));
graphics.DrawLine(&pen, 0, 0, 200, 100);
C bad code:
GpGraphics graphics(HDC hdc);
GdipDrawLine(&graphics, &pen, 0, 0, 200, 100);
Have tried without success some: GpPen myPen = pen(Color(Blue));
Ok i resign C/GDI+ without help, and i dont know if GpX/GdipX is the right way..
The msdn docs say "Windows GDI+ is a class-based API for C/C++ programmers" but i dont find anybody that have implemented it in C.
Tried GDI+ with C++ project and get it working directly.. damn...
I hope there is something for C
Please HELP !
modified 16-Jan-18 5:10am.
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
Copyright © CodeProject
All Rights Reserved.