trancexx Posted January 29, 2011 Share Posted January 29, 2011 Proper would be: _WinAPI_DeleteObject(GUICtrlSendMsg(...)) Do it like that and memory leak no more. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
TiC01 Posted January 29, 2011 Author Share Posted January 29, 2011 Proper would be: _WinAPI_DeleteObject(GUICtrlSendMsg(...)) Do it like that and memory leak no more. And this also wouldn't give empty spaces when another window moves over it ? Link to comment Share on other sites More sharing options...
trancexx Posted January 29, 2011 Share Posted January 29, 2011 And this also wouldn't give empty spaces when another window moves over it ? Naturally. Btw, this too: $hLib = _WinAPI_LoadLibraryEx($filename, $LOAD_LIBRARY_AS_DATAFILE) That way bitness doesn't matter. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
TiC01 Posted January 30, 2011 Author Share Posted January 30, 2011 Perhaps this is better.... expandcollapse popup#include <Constants.au3> #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> Global Const $STM_SETIMAGE = 0x0172 $iResX = 640 ; @DesktopWidth $iResY = 480 ; @DesktopHeight ; ; PreLoad Images ; Local $hLib = _WinAPI_LoadLibraryEx(@SystemDir & "\winntbbu.dll", $LOAD_LIBRARY_AS_DATAFILE) Global $iWinLogo = _WinAPI_LoadImage ( $hLib, 100, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR) Global $iBackGround = _WinAPI_LoadImage ( $hLib, 103, $IMAGE_BITMAP, $iResX, $iResY, $LR_DEFAULTCOLOR) Global $iPhase[3] = [ _WinAPI_LoadImage ( $hLib, 105, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR), _ _WinAPI_LoadImage ( $hLib, 109, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR), _ _WinAPI_LoadImage ( $hLib, 104, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR)] Global $iBullet[7] = [_WinAPI_LoadImage ( $hLib, 185, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR), _ _WinAPI_LoadImage ( $hLib, 186, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR), _ _WinAPI_LoadImage ( $hLib, 187, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR), _ _WinAPI_LoadImage ( $hLib, 188, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR), _ _WinAPI_LoadImage ( $hLib, 187, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR), _ _WinAPI_LoadImage ( $hLib, 186, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR), _ _WinAPI_LoadImage ( $hLib, 185, $IMAGE_BITMAP, 0, 0, $LR_DEFAULTCOLOR)] _WinAPI_FreeLibrary($hLib) ; ; Build GUI ; DllCall("uxtheme.dll", "none", "SetThemeAppProperties", "int", 0) $hGUI = GUICreate("WinntBBU", 640, 480, -1, -1, BitOR($WS_EX_LAYERED,$WS_SYSMENU,$WS_POPUP,$WS_CLIPSIBLINGS)) Global $_J=0, $_X=1, $_StepOld=1, $_AnimOld Global $_Array1[6]= [6,62,101,140,179,218] Global $iStep[UBound ( $_Array1 )] For $_I = 1 To UBound ( $_Array1 ) -1 $iStep[$_I] = GUICtrlCreatePic("", 26, $_Array1[$_I], 18, 18, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUICtrlSendMsg($iStep[$_I], $STM_SETIMAGE, $IMAGE_BITMAP, $iPhase[0]) Next Global $_Image[8]= [8,185,186,187,188,187,186,185] Global $_Array2[6]= [6,552,566,580,594,608] Global $_Anim[UBound ( $_Array2 )] For $_I = 1 To UBound ( $_Array2 ) -1 $_Anim[$_I] = GUICtrlCreatePic("", $_Array2[$_I], 460, 9, 9, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS),$WS_EX_TRANSPARENT) GUICtrlSendMsg($_Anim[$_I], $STM_SETIMAGE, $IMAGE_BITMAP, $iBullet[0]) Next $_WinLogo = GUICtrlCreatePic("", 12, 2, 135, 26, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUICtrlSendMsg($_WinLogo, $STM_SETIMAGE, $IMAGE_BITMAP, $iWinLogo) $Progressbar = GUICtrlCreateProgress(26, 351, 127, 16, BitOR($PBS_SMOOTH,$WS_CLIPSIBLINGS)) GUICtrlSetData(-1, 20) GUICtrlSetColor(-1, 0x008000) GUICtrlSetBkColor(-1, 0xFFFFFF) $_Background = GUICtrlCreatePic("", 0, 0, 640, 480, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) GUICtrlSendMsg($_Background, $STM_SETIMAGE, $IMAGE_BITMAP, $iBackGround) GUICtrlSetState(-1, $GUI_DISABLE) GUISetState ( @SW_SHOW ) AdlibRegister ( '_Run_BulletAnim', 150 ) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Exit Func _Run_BulletAnim ( ) GUICtrlSendMsg($_Anim[$_X], $STM_SETIMAGE, $IMAGE_BITMAP, $iBullet[$_J]) $_J = $_J +1 If $_J = 7 Then $_J= 0 $_X = $_X + 1 If $_X = 6 Then $_X=1 EndIf EndFunc ; ==> _Run_BulletAnim Link to comment Share on other sites More sharing options...
TiC01 Posted February 1, 2011 Author Share Posted February 1, 2011 Been digging some more in winntbbu.dll. Maybe here's some info that wasn't out there yet. Found out that there we're still a lot of bugs in winntbbued since a lot of font-sizes were not correctly displayed and edited.WINNTBBU.DLL => Res = 640x480==========================================================Background = Bitmap\103 => Resize image to 640x480Windows Logo = Bitmap\100 => Size = defaultBullet Todo = Bitmap\105 => Size = defaultBullet Busy = Bitmap\109 => Size = defaultBullet Done = Bitmap\104 => Size = defaultAnim Phase 1 = Bitmap\185 => Size = defaultAnim Phase 2 = Bitmap\186 => Size = defaultAnim Phase 3 = Bitmap\187 => Size = defaultAnim Phase 4 = Bitmap\188 => Size = defaultFont Steps = String\1\4 => Size = String\1\3 Font Headline = String\1\5 => Size = String\1\14Font Billboard = String\2\19 => Size = String\2\16==========================================================WINNTBBU.DLL => Res = 800x600==========================================================Background = Bitmap\103 => Resize image to 800x600Windows Logo = Bitmap\101 => Size = defaultBullet Todo = Bitmap\105 => Size = defaultBullet Busy = Bitmap\109 => Size = defaultBullet Done = Bitmap\104 => Size = defaultAnim Phase 1 = Bitmap\185 => Size = defaultAnim Phase 2 = Bitmap\186 => Size = defaultAnim Phase 3 = Bitmap\187 => Size = defaultAnim Phase 4 = Bitmap\188 => Size = defaultFont Steps = String\1\4 => Size = String\1\2 Font Headline = String\1\5 => Size = String\1\14Font Billboard = String\2\19 => Size = String\1\12==========================================================WINNTBBU.DLL => Res = 1024x768==========================================================Background = Bitmap\103 => Size = defaultWindows Logo = Bitmap\102 => Size = defaultBullet Todo = Bitmap\105 => Size = defaultBullet Busy = Bitmap\109 => Size = defaultBullet Done = Bitmap\104 => Size = defaultAnim Phase 1 = Bitmap\185 => Size = defaultAnim Phase 2 = Bitmap\186 => Size = defaultAnim Phase 3 = Bitmap\187 => Size = defaultAnim Phase 4 = Bitmap\188 => Size = defaultFont Steps = String\1\4 => Size = String\1\1Font Headline = String\1\5 => Size = String\1\6Font Billboard = String\2\19 => Size = String\1\8==========================================================WINNTBBU.DLL => Colors (HexREAD)==========================================================Progressbar: 0x1F55 (6bytes)Text & Progressbar (Background): 0x1F0B (6bytes)Billboard Title Shadow: 0x1F35 (6bytes)Current Step Text: 0x1F4B (6bytes)Step Image Transparency: 0x1F73 (6bytes)========================================================== Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now