Jump to content

$WS_EX_LAYERED as not using _GUIScrollBars_Init


davidkim
 Share

Recommended Posts

i want making style Form to $WS_EX_LAYERED

using _GUIScrollBars_Init() Func.

Posted Image

my script

#include<GUIConstantsEx.au3>

#include<WindowsConstants.au3>

#include<StructureConstants.au3>

#include<GuiScrollBars.au3>

#include<ScrollBarConstants.au3>

#include<GDIPlus.au3>

#include<StaticConstants.au3>

#include<WinAPIEx.au3>

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

GlobalConst$AC_SRC_ALPHA=1

_GDIPlus_Startup()

Global$sGUI=_GDIPlus_ImageLoadFromFile(@ScriptDir&'s_GUI.png')

Global$subGUI=_GDIPlus_ImageLoadFromFile(@ScriptDir&'sub_GUI.png')

$hGUI=GUICreate('MainPng',520,500,-1,-1,$WS_POPUP,$WS_EX_LAYERED)

GUISetState()

SetBitmap($hGUI,$sGUI,255)

$sub_GUI=GUICreate('SubPng',500,700,0,0,$WS_POPUP,BitOR($WS_EX_LAYERED,$WS_EX_MDICHILD),$hGUI)

GUISetState()

SetBitmap($sub_GUI,$subGUI,255)

_GUIScrollBars_Init($hGUI)

While1

Sleep(30)

WEnd

Func _exit_()

_GDIPlus_Shutdown()

Exit

EndFunc

Func SetBitmap($hGUI,$hImage,$iOpacity)

Local$hScrDC,$hMemDC,$hBitmap,$hOld,$pSize,$tSize,$pSource,$tSource,$pBlend,$tBlend

$hScrDC=_WinAPI_GetDC(0)

$hMemDC=_WinAPI_CreateCompatibleDC($hScrDC)

$hBitmap=_GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)

$hOld=_WinAPI_SelectObject($hMemDC,$hBitmap)

$tSize=DllStructCreate($tagSIZE)

$pSize=DllStructGetPtr($tSize)

DllStructSetData($tSize,"X",_GDIPlus_ImageGetWidth($hImage))

DllStructSetData($tSize,"Y",_GDIPlus_ImageGetHeight($hImage))

$tSource=DllStructCreate($tagPOINT)

$pSource=DllStructGetPtr($tSource)

$tBlend=DllStructCreate($tagBLENDFUNCTION)

$pBlend=DllStructGetPtr($tBlend)

DllStructSetData($tBlend,"Alpha",$iOpacity)

DllStructSetData($tBlend,"Format",$AC_SRC_ALPHA)

_WinAPI_UpdateLayeredWindow($hGUI,$hScrDC,0,$pSize,$hMemDC,$pSource,0,$pBlend,$ULW_ALPHA)

_WinAPI_ReleaseDC(0,$hScrDC)

_WinAPI_SelectObject($hMemDC,$hOld)

_WinAPI_DeleteObject($hBitmap)

_WinAPI_DeleteDC($hMemDC)

EndFunc;==>SetBitmap

using png

1.

Posted Image

2.

Posted Image

help me......

Edited by davidkim

I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks.

Link to comment
Share on other sites

Try this:

;~ #include<GUIConstantsEx.au3>;~~~
#include<WindowsConstants.au3>
;~ #include<StructureConstants.au3>;~~~
#include<GuiScrollBars.au3>
;~ #include<ScrollBarConstants.au3>;~~~
#include<GDIPlus.au3>
;~ #include<StaticConstants.au3>;~~~
;~ #include<WinAPIEx.au3>;~~~

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

Global Const $AC_SRC_ALPHA=1

_GDIPlus_Startup()


Global $sGUI=_GDIPlus_ImageLoadFromFile(@ScriptDir&'s_GUI.png')
Global $subGUI=_GDIPlus_ImageLoadFromFile(@ScriptDir&'sub_GUI.png')

$hGUI=GUICreate('MainPng',520,500,-1,-1,$WS_POPUP,BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST))
GUISetState()
SetBitmap($hGUI,$sGUI,255)

$sub_GUI=GUICreate('SubPng',500,700,0,0,$WS_POPUP,BitOR($WS_EX_LAYERED,$WS_EX_MDICHILD),$hGUI)
GUISetState()
WinSetState($sub_GUI, "",  @SW_DISABLE)
SetBitmap($sub_GUI,$subGUI,255)

$sb_GUI = GUICreate("", 400, 600, 50, 50, $WS_POPUP, BitOR($WS_EX_MDICHILD, $WS_EX_LAYERED,$WS_EX_TOPMOST),$hGUI)
GUISetBkColor(0xC01DC2, $sb_GUI)
 $listview = GUICtrlCreateListView("col1  |col2|col3  ", 10, 10, 380, 585)
GUICtrlSetBkColor(-1, 0xC01DC2)
GUICtrlSetColor(-1, 0xF0F0F0)
_WinAPI_SetLayeredWindowAttributes($sb_GUI, 0xC01DC2)
For $i = 0 To 100
    GUICtrlCreateListViewItem("Item" & Random(1, 100, 1) & "|" & "Item" & Random(1, 100, 1) & "|" & "Item" & Random(1, 100, 1), $listview)
Next
_GUIScrollBars_Init($sb_GUI, 1, 0)
GUISetState(@SW_SHOW, $sb_GUI)

While 1
    Sleep(30)
WEnd

Func _exit_()
    _GDIPlus_ImageDispose($sGUI)
    _GDIPlus_ImageDispose($subGUI)
    _GDIPlus_Shutdown()
    Exit
EndFunc

Func SetBitmap($hGUI,$hImage,$iOpacity)
    Local $hScrDC,$hMemDC,$hBitmap,$hOld,$pSize,$tSize,$pSource,$tSource,$pBlend,$tBlend
    $hScrDC=_WinAPI_GetDC(0)
    $hMemDC=_WinAPI_CreateCompatibleDC($hScrDC)
    $hBitmap=_GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
    $hOld=_WinAPI_SelectObject($hMemDC,$hBitmap)
    $tSize=DllStructCreate($tagSIZE)
    $pSize=DllStructGetPtr($tSize)
    DllStructSetData($tSize,"X",_GDIPlus_ImageGetWidth($hImage))
    DllStructSetData($tSize,"Y",_GDIPlus_ImageGetHeight($hImage))
    $tSource=DllStructCreate($tagPOINT)
    $pSource=DllStructGetPtr($tSource)
    $tBlend=DllStructCreate($tagBLENDFUNCTION)
    $pBlend=DllStructGetPtr($tBlend)
    DllStructSetData($tBlend,"Alpha",$iOpacity)
    DllStructSetData($tBlend,"Format",$AC_SRC_ALPHA)
    _WinAPI_UpdateLayeredWindow($hGUI,$hScrDC,0,$pSize,$hMemDC,$pSource,0,$pBlend,$ULW_ALPHA)
    _WinAPI_ReleaseDC(0,$hScrDC)
    _WinAPI_SelectObject($hMemDC,$hOld)
    _WinAPI_DeleteObject($hBitmap)
    _WinAPI_DeleteDC($hMemDC)
EndFunc;==>SetBitmap

Br,

UEZ

Edited by 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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Try this:

;~ #include<GUIConstantsEx.au3>;~~~
#include<WindowsConstants.au3>
;~ #include<StructureConstants.au3>;~~~
#include<GuiScrollBars.au3>
;~ #include<ScrollBarConstants.au3>;~~~
#include<GDIPlus.au3>
;~ #include<StaticConstants.au3>;~~~
;~ #include<WinAPIEx.au3>;~~~

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

Global Const $AC_SRC_ALPHA=1

_GDIPlus_Startup()


Global $sGUI=_GDIPlus_ImageLoadFromFile(@ScriptDir&'s_GUI.png')
Global $subGUI=_GDIPlus_ImageLoadFromFile(@ScriptDir&'sub_GUI.png')

$hGUI=GUICreate('MainPng',520,500,-1,-1,$WS_POPUP,BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST))
GUISetState()
SetBitmap($hGUI,$sGUI,255)

$sub_GUI=GUICreate('SubPng',500,700,0,0,$WS_POPUP,BitOR($WS_EX_LAYERED,$WS_EX_MDICHILD),$hGUI)
GUISetState()
SetBitmap($sub_GUI,$subGUI,255)

$sb_GUI = GUICreate("", 400, 600, 50, 50, $WS_POPUP, BitOR($WS_EX_MDICHILD, $WS_EX_LAYERED),$hGUI)
GUISetBkColor(0xC01DC2, $sb_GUI)
$listview = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 380, 585)
GUICtrlSetBkColor(-1, 0xC01DC2)
GUICtrlSetColor(-1, 0xF0F0F0)
_WinAPI_SetLayeredWindowAttributes($sb_GUI, 0xC01DC2)
$item1 = GUICtrlCreateListViewItem("item2|col22|col23", $listview)
$item2 = GUICtrlCreateListViewItem("item1|col12|col13", $listview)
$item3 = GUICtrlCreateListViewItem("item3|col32|col33", $listview)
GUISetState(@SW_SHOW, $sb_GUI)
_GUIScrollBars_Init($sb_GUI)

While 1
    Sleep(30)
WEnd

Func _exit_()
    _GDIPlus_ImageDispose($sGUI)
    _GDIPlus_ImageDispose($subGUI)
    _GDIPlus_Shutdown()
    Exit
EndFunc

Func SetBitmap($hGUI,$hImage,$iOpacity)
    Local $hScrDC,$hMemDC,$hBitmap,$hOld,$pSize,$tSize,$pSource,$tSource,$pBlend,$tBlend
    $hScrDC=_WinAPI_GetDC(0)
    $hMemDC=_WinAPI_CreateCompatibleDC($hScrDC)
    $hBitmap=_GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
    $hOld=_WinAPI_SelectObject($hMemDC,$hBitmap)
    $tSize=DllStructCreate($tagSIZE)
    $pSize=DllStructGetPtr($tSize)
    DllStructSetData($tSize,"X",_GDIPlus_ImageGetWidth($hImage))
    DllStructSetData($tSize,"Y",_GDIPlus_ImageGetHeight($hImage))
    $tSource=DllStructCreate($tagPOINT)
    $pSource=DllStructGetPtr($tSource)
    $tBlend=DllStructCreate($tagBLENDFUNCTION)
    $pBlend=DllStructGetPtr($tBlend)
    DllStructSetData($tBlend,"Alpha",$iOpacity)
    DllStructSetData($tBlend,"Format",$AC_SRC_ALPHA)
    _WinAPI_UpdateLayeredWindow($hGUI,$hScrDC,0,$pSize,$hMemDC,$pSource,0,$pBlend,$ULW_ALPHA)
    _WinAPI_ReleaseDC(0,$hScrDC)
    _WinAPI_SelectObject($hMemDC,$hOld)
    _WinAPI_DeleteObject($hBitmap)
    _WinAPI_DeleteDC($hMemDC)
EndFunc;==>SetBitmap

Br,

UEZ

Thank's UEZ

i want form is this

Posted Image

I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks.

Link to comment
Share on other sites

I updated the code. The main form is in the background. -> http://tinypic.com/r/1j91qo/6

Br,

UEZ

Edited by 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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

I updated the code. The main form is in the background. -> http://tinypic.com/r/1j91qo/6

Br,

UEZ

i want this png...

1.

Posted Image

sub form drag is in icon group moving...

2.

Posted Image

drag up - down is moveable icon group....

I interest am many quite in AutoitScript.From that is [http://cafe.naver.com/autoitscript[/color]] Korea of cafe(blog) to be operating, [size="2"][color="#ff00ff"]English cannot well[/size].Many help it requests.To read, it stands it thanks.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...