#include #include #include #include #include #include #include Global Const $STM_SETIMAGER = 0x0172 #Region DE CONFIGURACIÓN DE LA PLANTILLA $dir = @ScriptDir $dir_ANT = StringLeft($dir, StringInStr($dir, "\", 0, -1) - 1) Global $backimage = ($dir_ANT & "\CUSTOM\IMAGES\WALLPAPER.jpg") _GDIPlus_Startup() Global $hBmp = _GDIPlus_BitmapCreateFromFile($backimage) Global $iW = _GDIPlus_ImageGetWidth($hBmp), $iH = _GDIPlus_ImageGetHeight($hBmp) Global $Form_1 = GUICreate("PETERSON UNATTED SWPI", 1024, 768, -1, -1) Global $idPic = GUICtrlCreatePic("", -8, 0, $iW, $iH, BitOR($GUI_SS_DEFAULT_PIC, $SS_CENTERIMAGE)) GLOBAL $Button1 = GUICtrlCreateButton("SALIR", 20, 700, 105, 41, BitOR($BS_DEFPUSHBUTTON, $BS_CENTER, $BS_PUSHLIKE, $BS_FLAT)) GUICtrlSetOnEvent(-1, "_CERRARPUTO") GUICtrlSetTip(-1, "CERRAR APLICACIÃ’N") $Combo1 = GUICtrlCreateCombo("Combo1", 296, 216, 145, 25, BitOR($CBS_DROPDOWN, $CBS_AUTOHSCROLL)) Global $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBmp) Global $hB = GUICtrlSendMsg($idPic, $STM_SETIMAGER, $IMAGE_BITMAP, $hHBitmap) If $hB Then _WinAPI_DeleteObject($hB) GUISetState(@SW_SHOWMAXIMIZED) #EndRegion DE CONFIGURACIÓN DE LA PLANTILLA GUIRegisterMsg($WM_SIZE, "WM_SIZE") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIRegisterMsg($WM_SIZE, "") _WinAPI_DeleteObject($hHBitmap) _GDIPlus_BitmapDispose($hBmp) _GDIPlus_Shutdown() GUIDelete() Exit Case $Button1 _CERRARPUTO EndSwitch WEnd Func WM_SIZE($hWnd, $Msg, $wParam, $lParam) #forceref $Msg, $wParam, $lParam Local $aSize = ControlGetPos($hWnd, "", $idPic) Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($aSize[2], $aSize[3]) Local $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap) _GDIPlus_GraphicsSetInterpolationMode($hContext, 5) _GDIPlus_GraphicsDrawImageRect($hContext, $hBmp, 0, 0, $aSize[2], $aSize[3]) _GDIPlus_GraphicsDispose($hContext) Local $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) Local $hB = GUICtrlSendMsg($idPic, $STM_SETIMAGER, $IMAGE_BITMAP, $hHBitmap) If $hB Then _WinAPI_DeleteObject($hB) _WinAPI_DeleteObject($hHBitmap) _GDIPlus_BitmapDispose($hBitmap) Return "GUI_RUNDEFMSG" EndFunc ;==>WM_SIZE Func _CERRARPUTO() GUIDelete() Exit EndFunc ;==>_CERRARPUTO