OpenWindow()

Just starting out? Need help? Post your questions and find answers here.
MVXA
User
User
Posts: 18
Joined: Tue Feb 22, 2005 11:09 pm
Contact:

OpenWindow()

Post by MVXA »

Hi
I think, this is now a bug and not my fault <_<...

Code: Select all

;
;   Avatar Maker
;

Global lAvatarImg.l

lAvatarImg = CatchImage(#PB_Any, ?resAvatar_Start)
If lAvatarImg
    If OpenWindow(1, 1, 1, ImageWidth(lAvatarImg), ImageHeight(lAvatarImg), "Avatar")
        Debug ImageWidth(lAvatarImg) ; is 100
        Debug WindowWidth(1) ; But this is 106 o_O
    
        CreateGadgetList(WindowID(1))
            ImageGadget(2, 0, 0, ImageWidth(lAvatarImg), ImageHeight(lAvatarImg), ImageID(lAvatarImg))
            
        Repeat
            Select WindowEvent()
                Case #PB_Event_CloseWindow
                    Break
            EndSelect
        ForEver
    EndIf
EndIf


DataSection
    resAvatar_Start:
        IncludeBinary "C:\Avatar.bmp"
    resAvatar_Stopp:
EndDataSection
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

There is a minimum window width for a bordered window, its more than 100. It's a windows limitation, not your fault or that of PureBasic. You have to make it borderless if you want something smaller. Try your test with #PB_Window_Borderless. (you'll have to close it with alt-F4)
BERESHEIT
MVXA
User
User
Posts: 18
Joined: Tue Feb 22, 2005 11:09 pm
Contact:

Post by MVXA »

is there a way to find out the border size?
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

We added a note to the doc to tell this 'feature'.
Post Reply