Page 1 of 1

ani gif and purebasic with resource ...

Posted: Fri Feb 24, 2006 1:06 pm
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 ... !