Sign in to follow this  
Followers 0
saturnknts

child gui blurred when main gui is moved sorry if i'm stupid

2 posts in this topic

ok, i'm going insane. and i just know its going to be something stupid. but i might as well suck it up and ask a question.

per my first image you can see that the child is drawn fine. stays stationary like i want it to when the scroll bars are moved and everything. even resizing the main gui window does not affect it.

second image is now the problem, when you grab the main gui and move it the child blurs for lack of a better term. i guess you could say it doesnt redraw with everything else. of course if you minimize the window redrws just fine until you move the main window again.

third image is making the child tranparent and its properties work like i want them(stationary despite window move or scrollbar move), but the image is messed up(semi transparent) then for some reason instead of being opaque :whistle:

i just am having a mental block as to how to make it work right, i have read and searched (forums and help) and tested everything under the sun for the last 2 days and still no luck. please help.

thanks very much in advance to whoever might lend a hand, tim

p.s. i know my code is a mess right now( will clean it once i get this figured out), but just wanted to show some of the stuff i had been trying.

#include <GUIConstants.au3>
#include <GUIScrollBars.au3>
#include <file.au3>

Global $m_width = -871 , $m_height = 799
$tempchild = 0
$tempchildpic = 0
$world = _TempFile()
$banner = _TempFile()
$spark1 = _TempFile()
$spark2 = _TempFile()
$minelvls = _TempFile()

FileInstall("C:\voyage\voyage program\world.jpg", $world)
FileInstall("C:\voyage\voyage program\banner1.gif", $banner)
FileInstall("C:\voyage\voyage program\sparklies1.jpg", $spark1)
FileInstall("C:\voyage\voyage program\sparklies2.jpg", $spark2)
FileInstall("C:\voyage\voyage program\minelvls.jpg", $minelvls)


GUIRegisterMsg($WM_CREATE, "MY_WM_CREATE")
GUIRegisterMsg($WM_SIZE, "MY_WM_SIZE")
GUIRegisterMsg($WM_VSCROLL, "MY_WM_VSCROLL")
GUIRegisterMsg($WM_HSCROLL, "MY_WM_HSCROLL")
;~ -
;$trans = GUICreate("", 512, 256, 555, 115,$WS_POPUP,$WS_EX_LAYERED)
;   GUICtrlCreatePic($banner, 0, 0, 512, 256)
;   GUISetState(@SW_SHOW)
;sleep(2000)
;GUIDelete($trans)
;~ -
$gui = GUICreate("VCO Navigator", 250, 400, 555, 115, BitOR($WS_SIZEBOX,$WS_MAXIMIZEBOX,$WS_MINIMIZEBOX),$WS_EX_TOPMOST)
GUISetBkColor(0xFF0000)
$temppic = GUICtrlCreatePic($world, 0, 0, 0, 0, BitOR($SS_NOTIFY,$WS_GROUP))
GuiCtrlSetState(-1,$GUI_DISABLE)
GUISetState(@SW_SHOW)
;$tempchild0 = GUICreate("",231,24,1,20,$WS_POPUP, $WS_EX_MDICHILD,$gui)
;GUISetBkColor(0xFF0000)
;$Label1 = GUICtrlCreateLabel("Mining levels", 1, 20, 231, 24)
;GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
;GUICtrlSetBkColor(-1, 0x008080)
;GUISetState(@SW_SHOW, $tempchild0)
;GuiCtrlSetState(-1,$GUI_DISABLE)

$sparkliesmenu = GUICtrlCreateMenu("Sparklies")
$sparklieitem1 = GUICtrlCreateMenuitem ("Show Level 1 Sparkles",$sparkliesmenu)
;$tempsparklieitem = GUICtrlCreateMenuitem ("testing",$sparklieitem1)
$sparklieitem2 = GUICtrlCreateMenuitem ("Show Level 2 Sparkles",$sparkliesmenu)
$sparklieitem3 = GUICtrlCreateMenuitem ("Show Level 3 Sparkles",$sparkliesmenu)
$sparklieitem4 = GUICtrlCreateMenuitem ("Show Level 4 Sparkles",$sparkliesmenu)

$tradegoodsmenu = GUICtrlCreateMenu("Trade Goods")
$displaymenu = GUICtrlCreateMenu("Various Displays")


While 1
    $Msg = GUIGetMsg()
    $sethorz = -1*($iHorzPos*7)
    $setvert = -1*($iVertPos*16)
    Select
        case $Msg = $sparklieitem1 
            _del()
            $temppic = GUICtrlCreatePic($spark1, $sethorz, $setvert, 0, 0)
            GuiCtrlSetState(-1,$GUI_DISABLE)
            $tempchild = GUICreate("",100,46,10,160, $WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD,$gui)
            $tempchildpic = GUICtrlCreatePic($minelvls,0,0,0,0)
            ;GUISetState(@SW_SHOW)
            GuiCtrlSetState(-1,$GUI_DISABLE)
            GUISetState(@SW_SHOW)
            
            ;GUISwitch($GUI)
        case $msg = $sparklieitem2
            _del()
            $temppic = GUICtrlCreatePic($spark2, $sethorz, $setvert, 0, 0)
            $tempchild = GUICreate("",229,72,1,20,$WS_POPUP, $WS_EX_MDICHILD,$gui)
            $tempchildpic = GUICtrlCreatePic($minelvls,0,0,0,0)
            GUISetState(@SW_SHOW, $tempchild)
                 
        case $msg = $sparklieitem3
            ; transparent pic
            ;$trans = GUICreate("", 512, 256, 0, 0,$WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD,$gui)
            ;GUICtrlCreatePic($banner, 0, 0, 512, 256)
            ;GUISetState(@SW_SHOW)
            ;sleep(2000)
            ;GUIDelete($trans)
            
    EndSelect
    
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func _del()
        GUICtrlDelete($temppic)
        If $tempchild <> 0 Then GUIDelete($tempchild)
        ;GUISetState(@SW_SHOW,$gui)
EndFunc

Posted Image

Posted Image

Posted Image

Share this post


Link to post
Share on other sites



not trying to bump, just wanted to add some new code that should be reproducible since i cleaned it up a but and replaced my images with system images from xp.

needs gafrosts GUIScrollBars.au3

thanks again in advance to anyone who might give me some light on this subject.

tim houser

#include <GUIConstants.au3>
#include <GUIScrollBars.au3>

Global $m_width = -871 , $m_height = 799

$tempchild = 0
$tempchildpic = 0
$world = @Systemdir & "\oobe\images\monitor.gif"
$spark1 = @Systemdir & "\oobe\images\wpakey.jpg"
$minelvls = @Systemdir & "\oobe\images\mslogo.jpg"

GUIRegisterMsg($WM_CREATE, "MY_WM_CREATE")
GUIRegisterMsg($WM_SIZE, "MY_WM_SIZE")
GUIRegisterMsg($WM_VSCROLL, "MY_WM_VSCROLL")
GUIRegisterMsg($WM_HSCROLL, "MY_WM_HSCROLL")

$gui = GUICreate("VCO Navigator", 250, 400, 555, 115, BitOR($WS_SIZEBOX,$WS_MAXIMIZEBOX,$WS_MINIMIZEBOX),$WS_EX_TOPMOST)
GUISetBkColor(0xFF0000)
$temppic = GUICtrlCreatePic($world, 0, 0, 0, 0, BitOR($SS_NOTIFY,$WS_GROUP))
GuiCtrlSetState(-1,$GUI_DISABLE)
GUISetState(@SW_SHOW)

$sparkliesmenu = GUICtrlCreateMenu("opaque")
$sparklieitem1 = GUICtrlCreateMenuitem ("opaque",$sparkliesmenu)

$sparkliesmenu2 = GUICtrlCreateMenu("transparent")
$sparklieitem2 = GUICtrlCreateMenuitem ("transparent",$sparkliesmenu2)

While 1
    $Msg = GUIGetMsg()
    $sethorz = -1*($iHorzPos*7)
    $setvert = -1*($iVertPos*16)
    Select 
        
    Case $Msg = $sparklieitem1
        _del()
        $temppic = GUICtrlCreatePic($spark1, $sethorz, $setvert, 0, 0)
        GuiCtrlSetState(-1,$GUI_DISABLE)
        $tempchild = GUICreate("",100,46,10,160, $WS_POPUP,$WS_EX_MDICHILD,$gui)
        $tempchildpic = GUICtrlCreatePic($minelvls,0,0,0,0)
        GuiCtrlSetState(-1,$GUI_DISABLE)
        GUISetState(@SW_SHOW)
        
    Case $Msg = $sparklieitem2
        _del()
        $temppic = GUICtrlCreatePic($spark1, $sethorz, $setvert, 0, 0)
        GuiCtrlSetState(-1,$GUI_DISABLE)
        $tempchild = GUICreate("",100,46,10,160, $WS_POPUP,$WS_EX_LAYERED+$WS_EX_MDICHILD,$gui)
        $tempchildpic = GUICtrlCreatePic($minelvls,0,0,0,0)
        GuiCtrlSetState(-1,$GUI_DISABLE)
        GUISetState(@SW_SHOW)
        
    EndSelect
        
    Switch $Msg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func _del()
        GUICtrlDelete($temppic)
        If $tempchild <> 0 Then GUIDelete($tempchild)
        
EndFunc

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