ani gif and purebasic with resource ...

Share your advanced PureBasic knowledge/code with the community.
User avatar
bingo
Enthusiast
Enthusiast
Posts: 210
Joined: Fri Apr 02, 2004 12:21 pm
Location: germany/thueringen
Contact:

ani gif and purebasic with resource ...

Post by bingo »

Code updated For 5.20+

step1:

Code: Select all

Procedure.l Ansi2Uni(ansi.s) ;short way to unicode
SHStrDup_(@ansi,@memtarget)
ProcedureReturn memtarget
EndProcedure

OpenLibrary(0, "ATL.dll")
CallFunction(0,"AtlAxWinInit") 
OpenWindow(0, 100, 100, 200, 90, "einfach... pb-anigif!", #PB_Window_SystemMenu) 
handle = CreateWindowEx_(0,"AtlAxWin","res://" + GetFilePart(ProgramFilename()) + "/ani.htm",#WS_VISIBLE|#WS_CHILD|#WS_DISABLED ,5,5,60,54,WindowID(0),0,GetModuleHandle_(0),0) 
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
CloseWindow(0)
CloseLibrary(0)
End
step2:

resource


win.gif 23 "c:\\anigif\\win.gif"
ani.htm 23 "c:\\anigif\\ani.htm"


step3:

mini-html

<HTML>
<BODY scroll='no' leftmargin='0' topmargin='0'>
<img src="win.gif">
</BODY>
</HTML>


all in one download -->> http://kyf.net/tmp/anigif.zip

also useful for png ... !
["1:0>1"]