Sign in to follow this  
Followers 0
jcpetu

PopUp Window Layered & sizeable

12 posts in this topic

Hi Forum,

is it possible to create a layered pop up window where the image changes the size as the window is resize?

thanks in advance.

Share this post


Link to post
Share on other sites



I would say yes.

Br,

UEZ ;)


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

would you please tell me how? :

Share this post


Link to post
Share on other sites

Show me first what you did so far.

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

So far I got this, the idea is create a RichEdit control and buttons on each window.

 
#include <EditConstants.au3>
#include <GDIPlus.au3>
#include <GuiConstantsEx.au3>
#include <GuiRichEdit.au3>
#include <MenuConstants.au3>
#include <SendMessage.au3>
#include <WinAPI.au3>
#include <WinAPIEx.au3>
#include <Windowsconstants.au3>

HotKeySet("{ESC}", "On_Exit")

Global $i
Global Const $SC_DRAGMOVE = 0xF012
Global Const $iMargin = 4; Set distance from edge of window where resizing is possible
Global Const $GUIMinX0 = 200, $GUIMinY0 = 200, $GUIMaxX0 = 800, $GUIMaxY0 = 600; Set max and min GUI0 limits
Global Const $GUIMinX1 = 200, $GUIMinY1 = 200, $GUIMaxX1 = 800, $GUIMaxY1 = 600; Set max and min GUI1 limits
Global Const $GUIMinX2 = 200, $GUIMinY2 = 200, $GUIMaxX2 = 800, $GUIMaxY2 = 600; Set max and min GUI1 limits
Global Const $GUIMinX3 = 200, $GUIMinY3 = 200, $GUIMaxX3 = 800, $GUIMaxY3 = 600; Set max and min GUI1 limits

Global $GUI0, $GUI1, $GUI2, $GUI3
Global $GUIcolor0 = 0x00FF00
Global $GUIcolor1 = 0xAFFF00
Global $GUIcolor2 = 0xAFFFAA
Global $GUIcolor3 = 0xFFFF00


Global $Edit0, $Edit1, $Edit2, $Edit3
$sFontName = 'Arial' ; font name
$iFontSize = 10 ; font size
$iDefaultSize = 10 ; default size


;------------------------------------------------------------------------------------------------------------
$GUI0 = GUICreate("", $GUIMinX0, $GUIMinY0, 100, 100, $WS_POPUP)
GUICtrlSetState($GUI0, 128 + 32) ;$GUI_DISABLE (128) + $GUI_HIDE (32)
;------------------------------------------------------------------------------------------------------------

_GDIPlus_Startup()
$hPng1 = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\Notes.png')
$hBitmap1 = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hPng1)
$Width = _GDIPlus_ImageGetWidth($hPng1)
$Height = _GDIPlus_ImageGetHeight($hPng1)

$GUI1 = GUICreate("", $Width, $Height, 100, 100, $WS_POPUP, $WS_EX_LAYERED, $GUI0)
;GUISetBkColor($GUIcolor1)
$Edit1 = _GUICtrlRichEdit_Create($GUI1, "1", 5, 50, $Width - 10, $Height - 60, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) ; creates the main text window for typing text
_GUICtrlRichEdit_SetBkColor($Edit1, $GUIcolor1)
GUISetState()
;_WinAPI_SetLayeredWindowAttributes($GUI1, 0xABCDEF, 250)

_WinAPI_UpdateLayeredWindowEx($GUI1, -1, -1, $hBitmap1, 255, 1)
_GDIPlus_ImageDispose($hPng1)

;------------------------------------------------------------------------------------------------------------
$GUI1 = GUICreate("2", $GUIMinX1, $GUIMinY1, 100, 100, $WS_POPUP, -1, $GUI0)
GUISetBkColor($GUIcolor1)
$Edit1 = _GUICtrlRichEdit_Create($GUI1, "", 5, 50, $GUIMinX1 - 10, $GUIMinY1 - 60, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) ; creates the main text window for typing text
_GUICtrlRichEdit_SetBkColor($Edit1, $GUIcolor1)
GUISetState()

;------------------------------------------------------------------------------------------------------------
$GUI2 = GUICreate("2", $GUIMinX2, $GUIMinY2, 100, 100, $WS_POPUP, -1, $GUI0)
GUISetBkColor($GUIcolor2)
$Edit2 = _GUICtrlRichEdit_Create($GUI2, "", 5, 50, $GUIMinX2 - 10, $GUIMinY2 - 60, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) ; creates the main text window for typing text
_GUICtrlRichEdit_SetBkColor($Edit2, $GUIcolor2)
GUISetState()

;------------------------------------------------------------------------------------------------------------
$GUI3 = GUICreate("3", $GUIMinX3, $GUIMinY3, 100, 100, $WS_POPUP, -1, $GUI0)
GUISetBkColor($GUIcolor3)
$Edit3 = _GUICtrlRichEdit_Create($GUI3, "", 5, 50, $GUIMinX3 - 10, $GUIMinY3 - 60, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL)) ; creates the main text window for typing text
_GUICtrlRichEdit_SetBkColor($Edit3, $GUIcolor3)
GUISetState()
;------------------------------------------------------------------------------------------------------------

; Register message handlers
GUIRegisterMsg($WM_LBUTTONDOWN, "_WM_LBUTTONDOWN") ; For resize/drag
GUIRegisterMsg($WM_GETMINMAXINFO, "_WM_GETMINMAXINFO") ; For GUI size limits
GUIRegisterMsg($WM_NCHITTEST, "_MY_NCHITTEST") ;to set cursor for Window onhover
GUIRegisterMsg($WM_SIZE, "WM_SIZE") ;To resize Richedit

While 1
    Sleep(10)
WEnd

Func _SetCursor($hW)
    Local $iCursorID
    Switch _Check_Border($hW)
        Case 0
            $iCursorID = 2
        Case 1, 2
            $iCursorID = 13
        Case 3, 6
            $iCursorID = 11
        Case 5, 7
            $iCursorID = 10
        Case 4, 8, 9
            $iCursorID = 12
    EndSwitch
    GUISetCursor($iCursorID, 1)
EndFunc   ;==>_SetCursor

Func _WM_LBUTTONDOWN($hWnd, $iMsg, $wParam, $lParam) ;; Check cursor type and resize/drag window as required
    Local $iCursorType = _Check_Border($hWnd)
    If $iCursorType = 0 Then GUISetCursor(9, 1)
    If $iCursorType > 0 Then ; Cursor is set to resizing style so send appropriate resize message
        $iResizeType = 0xF000 + $iCursorType
        _SendMessage($hWnd, $WM_SYSCOMMAND, $iResizeType, 0)
    Else
        Local $aCurInfo = GUIGetCursorInfo($hWnd)
        If Not @error And $aCurInfo[4] = 0 Then _SendMessage($hWnd, $WM_SYSCOMMAND, $SC_DRAGMOVE, 0); Mouse not over a control
    EndIf
EndFunc   ;==>_WM_LBUTTONDOWN

Func _Check_Border($hW); ; Determines if mouse cursor over a border
    Local $aCurInfo = GUIGetCursorInfo($hW)
    If @error Or Not IsArray($aCurInfo) Then Return SetError(1)
    Local $aWinPos = WinGetPos($hW)
    Local $iSide, $iTopBot
    If $aCurInfo[0] < $iMargin Then $iSide = 1
    If $aCurInfo[0] > $aWinPos[2] - $iMargin Then $iSide = 2
    If $aCurInfo[1] < $iMargin Then $iTopBot = 3
    If $aCurInfo[1] > $aWinPos[3] - $iMargin Then $iTopBot = 6
    Return $iSide + $iTopBot
EndFunc   ;==>_Check_Border

Func _WM_GETMINMAXINFO($hWnd, $iMsg, $wParam, $lParam) ; Set min and max GUI sizes
    #forceref $iMsg, $WPARAM
    $tMinMaxInfo0 = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam)
    $tMinMaxInfo1 = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam)
    $tMinMaxInfo2 = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam)
    $tMinMaxInfo3 = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $lParam)
    Switch $hWnd
        Case $GUI0
            DllStructSetData($tMinMaxInfo0, 7, $GUIMinX0)
            DllStructSetData($tMinMaxInfo0, 8, $GUIMinY0)
            DllStructSetData($tMinMaxInfo0, 9, $GUIMaxX0)
            DllStructSetData($tMinMaxInfo0, 10, $GUIMaxY0)
        Case $GUI1
            DllStructSetData($tMinMaxInfo1, 7, $GUIMinX1)
            DllStructSetData($tMinMaxInfo1, 8, $GUIMinY1)
            DllStructSetData($tMinMaxInfo1, 9, $GUIMaxX1)
            DllStructSetData($tMinMaxInfo1, 10, $GUIMaxY1)
        Case $GUI2
            DllStructSetData($tMinMaxInfo2, 7, $GUIMinX2)
            DllStructSetData($tMinMaxInfo2, 8, $GUIMinY2)
            DllStructSetData($tMinMaxInfo2, 9, $GUIMaxX2)
            DllStructSetData($tMinMaxInfo2, 10, $GUIMaxY2)
        Case $GUI3
            DllStructSetData($tMinMaxInfo3, 7, $GUIMinX3)
            DllStructSetData($tMinMaxInfo3, 8, $GUIMinY3)
            DllStructSetData($tMinMaxInfo3, 9, $GUIMaxX3)
            DllStructSetData($tMinMaxInfo3, 10, $GUIMaxY3)
    EndSwitch
    Return 0
EndFunc   ;==>_WM_GETMINMAXINFO

Func _MY_NCHITTEST($hWnd, $uMsg, $wParam, $lParam) ;triggered on mouse over window
    _SetCursor($hWnd)
EndFunc   ;==>_MY_NCHITTEST

Func WM_SIZE($hWnd, $msg, $wParam, $lParam) ;resize RichEdit
    Local $aRet
    $aRet = WinGetClientSize($hWnd)
    Switch $hWnd
        Case $GUI0
            $edit = $Edit0
        Case $GUI1
            $edit = $Edit1
        Case $GUI2
            $edit = $Edit2
        Case $GUI3
            $edit = $Edit3
    EndSwitch
    WinMove($edit, "", 5, 50, $aRet[0] - 10, $aRet[1] - 60)
    Return $GUI_RUNDEFMSG
EndFunc   ;==>WM_SIZE

Func On_Exit()
    _GUICtrlRichEdit_Destroy($Edit0)
    _GUICtrlRichEdit_Destroy($Edit1)
    _GUICtrlRichEdit_Destroy($Edit2)
    _GUICtrlRichEdit_Destroy($Edit3)
    Exit
EndFunc   ;==>On_Exit

Share this post


Link to post
Share on other sites

I'm sorry but I don't know how to attach the png.

Share this post


Link to post
Share on other sites

Here is something I wrote some long time ago.

Might be useful:

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <ScreenCapture.au3>

Opt("GUIOnEventMode", 1)
Global $iW = 500, $iH = 500
Global Const $hGUI = GUICreate("test", $iW, $iH, -1, -1, BitOR($WS_SIZEBOX, $WS_POPUP))
GUISetState()

GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $hGUI)

_GDIPlus_Startup()
Global Const $hHBitmap = _ScreenCapture_Capture("", 0, 0, $iW, $iH)
Global Const $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap)

Global Const $iYCaption = _WinAPI_GetSystemMetrics($SM_CYSIZE), $iYFixedFrame = _WinAPI_GetSystemMetrics(8) ;8 = $SM_CYFIXEDFRAME
Global Const $iDHeight = $iYCaption + $iYFixedFrame

GUIRegisterMsg($WM_SIZE, "WM_SIZE")
GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")
_WinAPI_RedrawWindow($hGUI)


While Sleep(1000)
WEnd

Func WM_SIZE($hWnd, $Msg, $wParam, $lParam)
    #forceref $hWnd, $Msg, $wParam, $lParam
    Local Const $aWidth = WinGetClientSize($hGUI)
    $iW = $aWidth[0]
    $iH = $aWidth[1] + $iDHeight
    Return "GUI_RUNDEFMSG"
EndFunc   ;==>WM_SIZE

Func WM_ERASEBKGND($hWnd, $Msg, $wParam, $lParam)
    #forceref $hWnd, $Msg, $lParam
    Local Const $hGfx = _GDIPlus_GraphicsCreateFromHDC($wParam)
    _GDIPlus_GraphicsSetInterpolationMode($hGfx, 1)
    _GDIPlus_GraphicsDrawImageRect($hGfx, $hBitmap, 0, 0, $iW, $iH)
    _GDIPlus_GraphicsDispose($hGfx)
    Return True
EndFunc   ;==>WM_ERASEBKGND

Func _Exit()
    GUIRegisterMsg($WM_ERASEBKGND, "")
    GUIRegisterMsg($WM_SIZE, "")
    _WinAPI_DeleteObject($hHBitmap)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_Shutdown()
    GUIDelete()
    Exit
EndFunc   ;==>_Exit

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

When I use 

$hPng1 = _GDIPlus_ImageLoadFromFile('c:\Program Files (x86)\AutoIt3\Examples\GUI\Torus.png')

it works properly. I can see the image in one of your GUIs.

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

UEZ, I can't see the image, the Window flashes and the script exits. :

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <ScreenCapture.au3>
#include <GuiRichEdit.au3>

Opt("GUIOnEventMode", 1)
Global $iW = 500, $iH = 500
Global Const $hGUI = GUICreate("test", $iW, $iH, -1, -1, BitOR($WS_SIZEBOX, $WS_POPUP))
Global $Edit1 = _GUICtrlRichEdit_Create($hGUI, "1", 5, 50, 1000, 600, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL), $WS_EX_TRANSPARENT)
; creates the main text window for typing text
;_GUICtrlRichEdit_SetBkColor($Edit1, 0xABCDEF)
GUISetState()

GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $hGUI)

_GDIPlus_Startup()
;Global Const $hHBitmap = _ScreenCapture_Capture("", 0, 0, $iW, $iH)
;Global Const $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap)
;<===============================                    
Global Const $hHBitmap = _GDIPlus_ImageLoadFromFile("c:\Program Files (x86)\AutoIt3\Examples\GUI\Torus.png")
Global Const $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hHBitmap)
;<===============================

Global Const $iYCaption = _WinAPI_GetSystemMetrics($SM_CYSIZE), $iYFixedFrame = _WinAPI_GetSystemMetrics(8) ;8 = $SM_CYFIXEDFRAME
Global Const $iDHeight = $iYCaption + $iYFixedFrame

GUIRegisterMsg($WM_SIZE, "WM_SIZE")
GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")
_WinAPI_RedrawWindow($hGUI)


While Sleep(1000)
WEnd

Func WM_SIZE($hWnd, $Msg, $wParam, $lParam)
    #forceref $hWnd, $Msg, $wParam, $lParam
    Local Const $aWidth = WinGetClientSize($hGUI)
    $iW = $aWidth[0]
    $iH = $aWidth[1] + $iDHeight
    Return "GUI_RUNDEFMSG"
EndFunc   ;==>WM_SIZE

Func WM_ERASEBKGND($hWnd, $Msg, $wParam, $lParam)
    #forceref $hWnd, $Msg, $lParam
    Local Const $hGfx = _GDIPlus_GraphicsCreateFromHDC($wParam)
    _GDIPlus_GraphicsSetInterpolationMode($hGfx, 1)
    _GDIPlus_GraphicsDrawImageRect($hGfx, $hBitmap, 0, 0, $iW, $iH)
    _GDIPlus_GraphicsDispose($hGfx)
    Return True
EndFunc   ;==>WM_ERASEBKGND

Func _Exit()
    GUIRegisterMsg($WM_ERASEBKGND, "")
    GUIRegisterMsg($WM_SIZE, "")
    _WinAPI_DeleteObject($hHBitmap)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_Shutdown()
    GUIDelete()
    Exit
EndFunc   ;==>_Exit

Share this post


Link to post
Share on other sites

You are mixing up GDI and GDI+ bitmaps.

Use this:

#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <ScreenCapture.au3>
#include <GuiRichEdit.au3>

Opt("GUIOnEventMode", 1)
Global $iW = 500, $iH = 500
Global Const $hGUI = GUICreate("test", $iW, $iH, -1, -1, BitOR($WS_SIZEBOX, $WS_POPUP))
;~ Global $Edit1 = _GUICtrlRichEdit_Create($hGUI, "1", 5, 50, 1000, 600, BitOR($ES_MULTILINE, $WS_VSCROLL, $ES_AUTOVSCROLL), $WS_EX_TRANSPARENT)
; creates the main text window for typing text
;_GUICtrlRichEdit_SetBkColor($Edit1, 0xABCDEF)
GUISetState()

GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $hGUI)

_GDIPlus_Startup()
;Global Const $hHBitmap = _ScreenCapture_Capture("", 0, 0, $iW, $iH)
;Global Const $hBitmap = _GDIPlus_BitmapCreateFromHBITMAP($hHBitmap)
;<===============================
Global Const $hBitmap = _GDIPlus_ImageLoadFromFile("c:\Program Files (x86)\AutoIt3\Examples\GUI\Torus.png")
;~ Global Const $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hHBitmap)
;<===============================

Global Const $iYCaption = _WinAPI_GetSystemMetrics($SM_CYSIZE), $iYFixedFrame = _WinAPI_GetSystemMetrics(8) ;8 = $SM_CYFIXEDFRAME
Global Const $iDHeight = $iYCaption + $iYFixedFrame

GUIRegisterMsg($WM_SIZE, "WM_SIZE")
GUIRegisterMsg($WM_ERASEBKGND, "WM_ERASEBKGND")
_WinAPI_RedrawWindow($hGUI)


While Sleep(1000)
WEnd

Func WM_SIZE($hWnd, $Msg, $wParam, $lParam)
    #forceref $hWnd, $Msg, $wParam, $lParam
    Local Const $aWidth = WinGetClientSize($hGUI)
    $iW = $aWidth[0]
    $iH = $aWidth[1] + $iDHeight
    Return "GUI_RUNDEFMSG"
EndFunc   ;==>WM_SIZE

Func WM_ERASEBKGND($hWnd, $Msg, $wParam, $lParam)
    #forceref $hWnd, $Msg, $lParam
    Local Const $hGfx = _GDIPlus_GraphicsCreateFromHDC($wParam)
    _GDIPlus_GraphicsSetInterpolationMode($hGfx, 1)
    _GDIPlus_GraphicsDrawImageRect($hGfx, $hBitmap, 0, 0, $iW, $iH)
    _GDIPlus_GraphicsDispose($hGfx)
    Return True
EndFunc   ;==>WM_ERASEBKGND

Func _Exit()
    GUIRegisterMsg($WM_ERASEBKGND, "")
    GUIRegisterMsg($WM_SIZE, "")
;~     _WinAPI_DeleteObject($hHBitmap)
    _GDIPlus_BitmapDispose($hBitmap)
    _GDIPlus_Shutdown()
    GUIDelete()
    Exit
EndFunc   ;==>_Exit

Your next question will be how to clear the background probably.

Use this way:

#include <GDIPlus.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Global Const $STM_SETIMAGE = 0x0172

_GDIPlus_Startup()
Global Const $hBmp = _GDIPlus_ImageLoadFromFile("c:\Program Files (x86)\AutoIt3\Examples\GUI\Torus.png")
Global Const $iW = _GDIPlus_ImageGetWidth($hBmp), $iH = _GDIPlus_ImageGetHeight($hBmp)

Global $hGUI = GUICreate("Test", $iW, $iH, -1, -1, BitOR($WS_POPUP, $WS_SIZEBOX, $WS_THICKFRAME), $WS_EX_COMPOSITED)
GUISetBkColor(0xFFFFFF, $hGUI)
Global $idPic = GUICtrlCreatePic("", 0, 0, $iW, $iH)
GUICtrlSetResizing(-1, $GUI_DOCKVCENTER + $GUI_DOCKHCENTER)

Global $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBmp)
_WinAPI_DeleteObject(GUICtrlSendMsg($idPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBitmap))
GUISetState(@SW_SHOW)

GUIRegisterMsg($WM_SIZE, "WM_SIZE")

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            GUIRegisterMsg($WM_SIZE, "")
            _WinAPI_DeleteObject($hHBitmap)
            _GDIPlus_BitmapDispose($hBmp)
            _GDIPlus_Shutdown()
            GUIDelete()
            Exit
    EndSwitch
WEnd

Func WM_SIZE($hWnd, $Msg, $wParam, $lParam)
    #forceref $Msg, $wParam, $lParam
    Local Const $aSize = ControlGetPos($hWnd, "", $idPic)
    Local Const $hBitmap = _GDIPlus_BitmapCreateFromScan0($aSize[2], $aSize[3])
    Local Const $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap)
    _GDIPlus_GraphicsSetInterpolationMode($hContext, 3)
    _GDIPlus_GraphicsDrawImageRect($hContext, $hBmp, 0, 0, $aSize[2], $aSize[3])
    _GDIPlus_GraphicsDispose($hContext)
    Local Const $hHBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap)
    _WinAPI_DeleteObject(GUICtrlSendMsg($idPic, $STM_SETIMAGE, $IMAGE_BITMAP, $hHBitmap))
    _WinAPI_DeleteObject($hHBitmap)
    _GDIPlus_BitmapDispose($hBitmap)
    Return "GUI_RUNDEFMSG"
EndFunc

Why you want to draw to a RichEdit window?

 

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

UEZ, yes it works well. THANKS A LOT!!! :thumbsup: 

I want to draw to a RichEdit window to differentiate the content of each Window at first sight for my son, he plays on the PlayStation and publishes on Youtube tricks and cheats. The idea is to have a Window where he can write notes for each of the Games with the game background.

 

Thanks again.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0