New Update :Windows Hand Made TitleBar (Windows)

Share your advanced PureBasic knowledge/code with the community.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 3994
Joined: Sun Apr 12, 2009 6:27 am

New Update :Windows Hand Made TitleBar (Windows)

Post by RASHAD »

As per 'FB' suggestion
Skinned Characters this time
The TitleBar completely hand made
Any improvements are welcomed

Code: Select all

Global Width_1,Width_2,Height,x,y,r.RECT,im1.RECT,im2.RECT,im3.RECT,im4.RECT,im5.RECT,h

Procedure ImgDim()
  StartDrawing(WindowOutput(1))
    DrawingFont(FontID(1))
    Width_1 = TextWidth(Chr(33)+" "+Chr(64)+" "+Chr(62)+" "+Chr(114)) + 10
    Width_2 = TextWidth(Chr(33))
    Height = TextHeight(Chr(33))
  StopDrawing()
EndProcedure

Procedure WTButton(img,s)
  StartDrawing(ImageOutput(img))
    DrawingFont(FontID(1))
    Box(0,0,Width_1,Height,#White)
    DrawText(0,0,Chr(33)+" "+Chr(64)+" "+Chr(62)+" "+Chr(114),$000000,#White)
    If s <> 0
      DrawingMode(#PB_2DDrawing_AlphaBlend)
      Box(s,0,Width_2,Height,RGBA(250,100,100,100))
      DrawingMode(#PB_2DDrawing_Outlined)
      Box(s,0,Width_2,Height,#Red)
    EndIf
  StopDrawing()
EndProcedure

Procedure WndProc(hwnd, uMsg, wParam, lParam)
      GetWindowRect_(WindowID(1),r.RECT)
      x = r\right - Width_1
      y = r\top + 2
      result = #PB_ProcessPureBasicEvents 

 Select uMsg
        
        Case #WM_GETMINMAXINFO     
            *pMinMax.MINMAXINFO = lParam
            *pMinMax\ptMinTrackSize\x=Width_1+100
        
      
        Case #WM_SIZE,#WM_MOVE,#WM_PAINT
             GetWindowRect_(WindowID(2),r2.RECT)         
             im1\top = r2\top + 3
             im1\left = r2\left + 2
             im1\right = im1\left + Width_2
             im1\bottom = im1\top + Height
             
             im2\top = r2\top + 3
             im2\left = r2\left + Width_2*1.5 + 2
             im2\right = im2\left + Width_2
             im2\bottom = im2\top + Height
             
             im3\top = r2\top + 3
             im3\left = r2\left + Width_2*3 + 2
             im3\right = im3\left + Width_2
             im3\bottom = im3\top + Height
             
             im4\top = r2\top + 3
             im4\left = r2\left + Width_2*4.5 + 2
             im4\right = im4\left + Width_2
             im4\bottom = im4\top + Height
             
;              im5\top = r2\top
;              im5\left = r2\left + 5
;              im5\right = im1\left + 30
;              im5\bottom = im1\top + 24
             
             ResizeWindow(2,x,y,Width_1,Height)
             ResizeGadget(0,10,(r\bottom-r\top-h-50),80,25)
             ResizeGadget(1,100,(r\bottom-r\top-h-50),80,25)
             
   EndSelect
   
  ProcedureReturn result 
EndProcedure


h = GetSystemMetrics_(#SM_CYCAPTION)
fh = Int(h*0.75)
LoadFont(1, "WebDings",fh)

OpenWindow(1,20,20,450,170,Chr(174)+"  Hand Made",#PB_Window_NoGadgets|#PB_Window_SizeGadget|#PB_Window_ScreenCentered)
ImgDim()
CreateImage(0,Width_1,Height)
CreateImage(1,Width_1,Height)
CreateImage(2,Width_1,Height)
CreateImage(3,Width_1,Height)
CreateImage(4,Width_1,Height)
WTButton(0,1)
WTButton(1,Width_2*1.5+1)
WTButton(2,Width_2*3+1)
WTButton(3,Width_2*4.5+2)
WTButton(4,0)
UseGadgetList(WindowID(1))
ButtonGadget(0,10,135,80,25,"TEST")
ButtonGadget(1,100,135,80,25,"QUIT")
OpenWindow(2,0,0,Width_1,Height,"",#WS_POPUP,WindowID(1))
SetWindowLong_(WindowID(2),#GWL_EXSTYLE,GetWindowLong_(WindowID(2),#GWL_EXSTYLE)|#WS_EX_LAYERED)
SetLayeredWindowAttributes_(WindowID(2),#White,0,#LWA_COLORKEY)
UseGadgetList(WindowID(2))
ImageGadget(10,0,0,Width_1,Height,ImageID(4))

SetWindowCallback(@WndProc())
InvalidateRect_(WindowID(1),0,1)
SetActiveWindow(1)


Repeat
  Select WaitWindowEvent()
           
      Case #PB_Event_Gadget
          Select EventGadget()
            Case 0
            
            Case 1
               Q = 1
               
                             
          EndSelect
           
      Case #WM_MOUSEMOVE,#WM_NCMOUSEMOVE
        GetCursorPos_(@p.POINT)
            If GetKeyState_(#VK_LBUTTON) = 1
                mouse_event_(#MOUSEEVENTF_LEFTDOWN,0,0,0,0)
                mouse_event_(#MOUSEEVENTF_LEFTUP,0,0,0,0)
            EndIf
           If PtInRect_(@im1,PeekQ(@p))
              SetGadgetState(10,ImageID(0))       
           ElseIf PtInRect_(@im2,PeekQ(@p))
              SetGadgetState(10,ImageID(1))
           ElseIf PtInRect_(@im3,PeekQ(@p))
              SetGadgetState(10,ImageID(2))
              If GetKeyState_(#VK_LBUTTON) = 1 And Run = 0
                ShowWindow_(WindowID(1),#SW_MAXIMIZE)
                Run = 1
              ElseIf GetKeyState_(#VK_LBUTTON) = 1
                ShowWindow_(WindowID(1),#SW_RESTORE)
                Run =0
              EndIf
           ElseIf PtInRect_(@im4,PeekQ(@p))
            SetGadgetState(10,ImageID(3))
              If GetKeyState_(#VK_LBUTTON)
                Q =1
              EndIf
           Else
            SetGadgetState(10,ImageID(4))          
           EndIf
           SetActiveWindow(1)         
          
  EndSelect 
Until Q = 1

Edit:Updated
Last edited by RASHAD on Mon Nov 15, 2010 10:52 pm, edited 5 times in total.
Egypt my love
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Windows Hand Made TitleBar (Windows)

Post by PB »

Nice! :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Mistrel
Addict
Addict
Posts: 3379
Joined: Sat Jun 30, 2007 8:04 pm

Re: Windows Hand Made TitleBar (Windows)

Post by Mistrel »

Very fancy with Windows Aero. But it doesn't render properly when tested in Windows XP x32:

Image
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 3994
Joined: Sun Apr 12, 2009 6:27 am

Re: Windows Hand Made TitleBar (Windows)

Post by RASHAD »

@PB and @Mistrel
Thank you and sorry for inconvenience
Code updated
Please check
Egypt my love
User avatar
DoubleDutch
Addict
Addict
Posts: 3185
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Windows Hand Made TitleBar (Windows)

Post by DoubleDutch »

Very nice, thanks. :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
IdeasVacuum
Always Here
Always Here
Posts: 6380
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Windows Hand Made TitleBar (Windows)

Post by IdeasVacuum »

Very impressive Rashad.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 3994
Joined: Sun Apr 12, 2009 6:27 am

Re: Windows Hand Made TitleBar (Windows)

Post by RASHAD »

@DoubleDutch & @IdeasVacuum
Thank you guys,much appreciated
Egypt my love
User avatar
electrochrisso
Addict
Addict
Posts: 979
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: Windows Hand Made TitleBar (Windows)

Post by electrochrisso »

Good one RASHAD I like it and made a couple of changes to get the GetAsyncKeyState_(#VK_LBUTTON) to work a bit more smoothly as it seemed to keep state sometimes. :D

Code: Select all

Repeat
  Select WaitWindowEvent()
      
    Case #PB_Event_Gadget
      Select EventGadget()
        Case 0
          MessageRequester("Button Clicked","Button Test")
        Case 1
          Q = 1
      EndSelect
      
    Case #WM_MOUSEMOVE,#WM_NCMOUSEMOVE
      GetCursorPos_(@p.POINT)
      a=GetAsyncKeyState_(#VK_LBUTTON)
      If PtInRect_(@im1,PeekQ(@p))
        SetGadgetState(10,ImageID(0))  
        If a=1
          MessageRequester("Button Clicked","Button TB 1"):a=0
        EndIf
      ElseIf PtInRect_(@im2,PeekQ(@p))
        SetGadgetState(10,ImageID(1))
        If a=1
          ShowWindow_(WindowID(1),#SW_NORMAL):a=0
        EndIf
      ElseIf PtInRect_(@im3,PeekQ(@p))
        SetGadgetState(10,ImageID(2))
        If a=1
          ShowWindow_(WindowID(1),#SW_MAXIMIZE):a=0
        EndIf
      ElseIf PtInRect_(@im4,PeekQ(@p))
        SetGadgetState(10,ImageID(3))
        If a=1
          Q=1
        EndIf
      Else
        SetGadgetState(10,ImageID(4))         
      EndIf
      SetActiveWindow(1)         
  EndSelect
Until Q=1
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 3994
Joined: Sun Apr 12, 2009 6:27 am

Re: Windows Hand Made TitleBar (Windows)

Post by RASHAD »

@electrochrisso
Thank you for your reply
But your code doesn't fit with Win 7

Please check


Edit: seems to be a problem with XP
Code UPDATED
Egypt my love
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 3994
Joined: Sun Apr 12, 2009 6:27 am

Re: New Update :Windows Hand Made TitleBar (Windows)

Post by RASHAD »

It is a crazy idea
But why not
Maybe it will be useful for somebody

Code: Select all

Global img1,img2,img3,img4,x,y,r.RECT,Run


Procedure WndProc(hwnd, uMsg, wParam, lParam)
      GetWindowRect_(WindowID(1),r.RECT)
      x = r\right - 125
      y = r\top + 2
      result = #PB_ProcessPureBasicEvents 

 Select uMsg
        
        Case #WM_GETMINMAXINFO     
            *pMinMax.MINMAXINFO = lParam
            *pMinMax\ptMinTrackSize\x=200
        
      
        Case #WM_SIZE,#WM_MOVE,#WM_PAINT        
             GetWindowRect_(WindowID(2),r2.RECT)         
             ResizeWindow(2,x,y,125,24)
             ResizeGadget(2,10,(r\bottom-r\top-70),80,25)
             ResizeGadget(3,100,(r\bottom-r\top-70),80,25)
             
            
   EndSelect
   
  ProcedureReturn result 
EndProcedure
 
 
 CatchImage(0, ?Exit)
 CatchImage(1, ?Expand)
 CatchImage(2, ?Globe)
 CatchImage(3, ?Blue_key)

 ResizeImage(0, 16,16)
 ResizeImage(1, 16,16)
 ResizeImage(2, 16,16)
 ResizeImage(3, 16,16)

OpenWindow(1,20,20,450,170,Chr(174)+"  Hand Made",#PB_Window_NoGadgets|#PB_Window_SizeGadget|#PB_Window_ScreenCentered)
UseGadgetList(WindowID(1))
ButtonGadget(2,10,135,80,25,"TEST")
ButtonGadget(3,90,135,80,25,"QUIT")
OpenWindow(2,0,0,125,24,"",#WS_POPUP|#PB_Window_BorderLess,WindowID(1))

  tbHnd = CreateToolBar(0, WindowID(2))
  ;SetWindowTheme_(tbHnd, @null.w, @null.w)  
  ToolBarImageButton(3,ImageID(3))
  ToolBarSeparator()
  ToolBarImageButton(2,ImageID(2))
  ToolBarSeparator()
  ToolBarImageButton(1,ImageID(1))
  ToolBarSeparator()
  ToolBarImageButton(0,ImageID(0))
  
  SetWindowColor(2,#White)
  SetWindowLong_(WindowID(2),#GWL_EXSTYLE,GetWindowLong_(WindowID(2),#GWL_EXSTYLE)|#WS_EX_LAYERED)
  SetLayeredWindowAttributes_(WindowID(2),#White,0,#LWA_COLORKEY)

SetWindowCallback(@WndProc())
InvalidateRect_(WindowID(1),0,1)
SetActiveWindow(1)


Repeat
  SetActiveWindow(1)
  Select WaitWindowEvent()
           
      Case #PB_Event_Gadget
          Select EventGadget()
            Case 2
            
            Case 3
               Q = 1
               
                             
          EndSelect          
   
      Case #PB_Event_Menu
        Select EventMenu()
          Case 0
            Q = 1
            
          Case 1            
            If Run = 0
              SetWindowState(1,#PB_Window_Maximize)
            Else
              SetWindowState(1,#PB_Window_Normal)
            EndIf      
            Run = Run ! 1
            
          Case 2
            Debug "Third Button Pressed"
            
          Case 3
            Debug "Forth Button Pressed"
            
        EndSelect
           
        
    EndSelect

  Until Q = 1
  
  DataSection

Exit:
  Data.b 66, 77, 246, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0, 192, 6, 0, 0, 0, 0
  Data.b 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 153, 95, 51, 215, 150, 31, 223, 174, 92, 235, 205, 152, 251, 245, 233, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 169, 106, 56, 215, 151, 31, 210, 144, 28, 210, 144, 28, 210, 144, 28, 210, 144, 28, 223, 175, 92, 236, 208, 158, 250, 242, 227, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 221, 191, 165, 192, 162, 138, 141, 144, 150, 140, 78, 26, 216, 153, 31
  Data.b 210, 144, 28, 210, 144, 28, 210, 144, 28, 210, 144, 28, 210, 144, 28, 210, 144, 28, 210, 144, 28, 213, 150, 39, 229, 188, 111, 209, 172, 143, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 186, 123, 69, 134, 75, 31, 11, 16, 27, 111, 55, 2, 217, 153, 31, 210, 144, 29, 210, 144, 29, 210, 144
  Data.b 29, 210, 144, 29, 210, 144, 29, 210, 144, 29, 210, 144, 29, 210, 144, 29, 213, 149, 29, 164, 88, 31, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 191, 131, 79, 137, 78, 32, 10, 15, 27, 116, 58, 2, 218, 153, 32, 211, 144, 30, 211, 144, 30, 211, 144, 30, 211, 144, 30, 211, 144, 30, 211
  Data.b 144, 30, 211, 144, 30, 211, 144, 30, 214, 148, 29, 167, 93, 35, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 248, 253, 255, 255, 255, 255, 255
  Data.b 255, 195, 135, 80, 141, 81, 34, 9, 15, 27, 120, 61, 2, 219, 153, 33, 212, 145, 31, 212, 145, 31, 212, 145, 31, 212, 145, 31, 212, 145, 31, 212, 145, 31, 212, 145, 31, 212, 145, 31
  Data.b 215, 149, 30, 170, 97, 37, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 21, 19, 205, 255, 255, 255, 255, 255, 255, 208, 146, 78, 141, 85, 37, 9
  Data.b 15, 27, 123, 65, 2, 219, 154, 35, 212, 146, 32, 212, 146, 32, 212, 146, 32, 212, 146, 32, 212, 146, 32, 212, 146, 32, 212, 146, 32, 212, 146, 32, 215, 150, 31, 173, 101, 40, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 21, 19, 205, 27, 27, 228, 255, 255, 255, 217, 159, 88, 146, 88, 38, 9, 14, 27, 128, 70, 6, 220, 155, 37
  Data.b 214, 149, 34, 213, 148, 35, 213, 148, 35, 213, 148, 35, 213, 148, 35, 213, 148, 35, 213, 148, 35, 213, 148, 35, 215, 151, 34, 176, 104, 44, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 21, 19, 205, 36, 44, 248, 21, 25, 232, 128, 80, 102, 161, 98, 31, 9, 14, 25, 134, 73, 10, 215, 145, 31, 196, 135, 39, 215, 150, 35, 213, 149
  Data.b 37, 213, 149, 37, 213, 149, 37, 213, 149, 37, 213, 149, 37, 213, 149, 37, 215, 153, 36, 179, 107, 45, 31, 44, 235, 31, 44, 235, 34, 45, 235, 34, 44, 235, 33, 44, 235, 33, 43, 235
  Data.b 34, 44, 236, 37, 50, 244, 35, 49, 246, 25, 37, 247, 54, 36, 130, 13, 17, 14, 136, 75, 11, 234, 208, 149, 196, 203, 220, 192, 121, 23, 215, 153, 41, 215, 151, 40, 215, 151, 40, 215
  Data.b 151, 40, 215, 151, 40, 215, 151, 40, 217, 155, 39, 183, 112, 47, 109, 118, 239, 38, 61, 244, 42, 63, 244, 42, 63, 244, 42, 62, 244, 41, 61, 244, 41, 60, 244, 39, 58, 243, 39, 57
  Data.b 243, 40, 57, 245, 32, 47, 248, 11, 9, 143, 144, 81, 6, 234, 200, 117, 222, 195, 145, 212, 148, 37, 215, 153, 44, 215, 154, 44, 215, 154, 44, 215, 154, 44, 215, 154, 44, 215, 154, 44
  Data.b 218, 158, 44, 185, 116, 49, 111, 120, 239, 42, 68, 244, 45, 70, 244, 45, 69, 244, 44, 69, 244, 44, 68, 244, 44, 66, 244, 44, 66, 244, 43, 65, 244, 41, 62, 244, 47, 72, 246, 92
  Data.b 111, 255, 79, 43, 125, 232, 184, 77, 223, 173, 77, 224, 176, 84, 221, 167, 69, 217, 158, 50, 217, 155, 47, 217, 156, 48, 217, 156, 49, 217, 156, 49, 220, 160, 49, 188, 120, 51, 112, 123
  Data.b 242, 42, 69, 244, 44, 72, 244, 44, 71, 244, 44, 70, 244, 44, 69, 244, 44, 70, 243, 47, 72, 244, 44, 69, 244, 56, 82, 245, 149, 167, 255, 27, 26, 207, 150, 88, 25, 231, 187, 90
  Data.b 224, 178, 86, 224, 178, 86, 224, 179, 87, 225, 180, 90, 222, 172, 75, 217, 160, 54, 217, 159, 54, 218, 160, 55, 220, 164, 55, 193, 125, 53, 116, 128, 244, 132, 160, 250, 132, 158, 249, 132
  Data.b 158, 249, 131, 156, 249, 132, 156, 249, 139, 160, 250, 46, 75, 244, 61, 91, 246, 145, 167, 255, 38, 32, 214, 11, 13, 17, 154, 94, 29, 232, 188, 101, 226, 180, 93, 226, 180, 93, 226, 180
  Data.b 93, 226, 180, 93, 226, 182, 94, 227, 180, 94, 223, 171, 75, 221, 163, 59, 223, 167, 62, 196, 128, 54, 58, 58, 237, 77, 80, 239, 75, 78, 239, 74, 78, 239, 74, 78, 239, 75, 80, 239
  Data.b 54, 59, 239, 68, 103, 247, 148, 172, 254, 98, 69, 183, 165, 107, 44, 7, 12, 20, 158, 101, 36, 233, 193, 108, 228, 185, 101, 228, 185, 101, 228, 185, 101, 228, 185, 101, 228, 185, 101, 228
  Data.b 185, 101, 228, 186, 103, 228, 182, 96, 223, 170, 70, 200, 132, 57, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 41, 43, 239, 141, 161, 249, 37, 39
  Data.b 250, 234, 184, 98, 171, 113, 50, 6, 11, 22, 164, 106, 39, 236, 196, 117, 230, 188, 109, 230, 188, 109, 230, 188, 109, 230, 188, 109, 230, 188, 109, 230, 188, 109, 230, 188, 109, 230, 188, 111
  Data.b 232, 192, 113, 202, 137, 55, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 43, 39, 241, 27, 23, 241, 255, 255, 255, 229, 177, 94, 171, 117, 54, 6
  Data.b 10, 22, 170, 111, 43, 237, 201, 123, 232, 194, 116, 232, 194, 116, 232, 194, 116, 232, 194, 116, 232, 194, 116, 232, 194, 116, 232, 194, 116, 232, 194, 116, 234, 198, 121, 205, 140, 59, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 24, 18, 241, 255, 255, 255, 255, 255, 255, 224, 174, 103, 175, 120, 56, 5, 10, 21, 175, 117, 46, 239, 205, 132
  Data.b 234, 198, 125, 234, 198, 125, 234, 198, 125, 234, 198, 125, 234, 198, 125, 234, 198, 125, 234, 198, 125, 234, 198, 125, 237, 202, 131, 208, 144, 60, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 225, 176, 107, 177, 123, 58, 4, 10, 21, 178, 122, 50, 241, 209, 143, 237, 202, 134, 237, 202, 134, 237, 202
  Data.b 134, 237, 202, 134, 237, 202, 134, 237, 202, 134, 237, 202, 134, 237, 202, 134, 239, 206, 141, 211, 148, 61, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 227, 180, 108, 179, 126, 59, 4, 9, 20, 184, 128, 55, 244, 215, 151, 239, 208, 143, 239, 208, 143, 239, 208, 143, 239, 208, 143, 239, 208, 143, 239
  Data.b 208, 143, 239, 208, 143, 239, 208, 143, 241, 212, 150, 214, 153, 63, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 230, 184, 110, 184, 130, 62, 4, 10, 20, 198, 144, 63, 255, 228, 169, 248, 222, 159, 246, 218, 156, 243, 215, 154, 242, 215, 153, 242, 215, 153, 242, 215, 153, 242, 215, 153, 242, 215, 153
  Data.b 244, 219, 160, 216, 156, 65, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 231, 187, 113, 183, 131, 63, 4
  Data.b 9, 20, 38, 33, 28, 132, 116, 88, 144, 123, 93, 200, 177, 130, 244, 220, 166, 254, 232, 176, 250, 228, 173, 249, 226, 171, 247, 223, 169, 246, 223, 167, 247, 226, 175, 219, 160, 69, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 233, 189, 115, 208, 155, 72, 112, 81, 46, 117, 85, 47, 109, 79, 44
  Data.b 107, 77, 43, 103, 73, 41, 98, 69, 39, 92, 64, 36, 178, 139, 79, 191, 150, 85, 237, 202, 123, 240, 211, 143, 244, 217, 155, 223, 167, 72, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 234, 193, 117, 230, 179, 82, 234, 183, 85, 235, 184, 85, 235, 184, 85, 235, 184, 85, 235, 184, 85, 235, 184
  Data.b 85, 234, 183, 85, 232, 179, 81, 230, 177, 80, 227, 173, 78, 227, 172, 77, 227, 172, 77, 228, 176, 80
Exitend:

Expand:
  Data.b 66, 77, 246, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0, 0
  Data.b 24, 0, 0, 0, 24, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0, 192, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 177, 90, 24, 187
  Data.b 103, 24, 185, 96, 20, 185, 97, 20, 185, 97, 20, 185, 97, 20, 187, 99, 21, 182, 93, 21, 174, 86, 21, 249, 243, 238, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 243
  Data.b 238, 174, 86, 20, 183, 103, 29, 189, 106, 25, 185, 96, 19, 185, 97, 20, 185, 97, 20, 185, 97, 20, 186, 98, 20, 176, 90, 21, 196, 119, 42, 232, 175, 44, 225, 152, 23, 225, 154, 24
  Data.b 226, 154, 24, 227, 156, 24, 223, 146, 23, 178, 92, 23, 229, 199, 175, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 229, 198, 175, 181, 94, 23, 238
  Data.b 204, 111, 230, 166, 32, 225, 152, 22, 225, 154, 24, 225, 154, 24, 228, 157, 24, 190, 102, 23, 197, 120, 43, 232, 175, 51, 224, 153, 27, 225, 155, 29, 226, 155, 29, 220, 145, 31, 180, 94
  Data.b 26, 230, 201, 178, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 230, 201, 178, 181, 91, 23, 231, 187, 91, 225, 153, 25
  Data.b 225, 155, 29, 225, 155, 29, 227, 159, 30, 191, 104, 25, 199, 123, 47, 232, 178, 59, 225, 157, 34, 226, 159, 37, 227, 161, 38, 207, 125, 31, 200, 136, 85, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 180, 94, 29, 214, 138, 32, 227, 159, 35, 226, 159, 37, 226, 157, 35, 228, 162
  Data.b 37, 194, 109, 29, 202, 126, 51, 233, 181, 68, 230, 165, 43, 230, 165, 43, 229, 165, 43, 229, 165, 45, 193, 108, 32, 210, 153, 108, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 183, 96, 28, 217, 143, 39, 231, 169, 46, 230, 166, 46, 231, 167, 45, 229, 168, 46, 231, 168, 44, 196, 112, 33, 204, 130, 52, 236
  Data.b 188, 77, 225, 156, 44, 225, 172, 83, 242, 207, 117, 230, 168, 46, 233, 170, 51, 195, 111, 34, 211, 157, 109, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 185, 98, 31, 219, 147, 44, 232, 173, 52, 231, 171, 51, 233, 170, 52, 200, 117, 31, 238, 208, 138, 236, 182, 64, 199, 115, 32, 207, 136, 59, 242, 207, 117, 192, 106, 31, 188, 100, 29
  Data.b 231, 190, 117, 242, 207, 117, 232, 171, 56, 234, 174, 60, 197, 115, 36, 213, 158, 110, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 188, 102, 32, 221, 150, 50, 234, 177, 62, 233
  Data.b 174, 61, 234, 175, 61, 197, 115, 36, 207, 142, 88, 192, 106, 29, 242, 215, 146, 205, 126, 44, 203, 128, 46, 197, 117, 38, 235, 207, 181, 255, 255, 255, 189, 101, 26, 232, 192, 119, 242, 207
  Data.b 117, 235, 177, 62, 236, 181, 66, 202, 119, 37, 216, 161, 111, 255, 255, 255, 255, 255, 255, 192, 107, 32, 224, 156, 54, 235, 182, 68, 234, 179, 67, 236, 181, 67, 202, 119, 38, 215, 160, 111
  Data.b 255, 255, 255, 235, 206, 181, 197, 116, 35, 203, 128, 46, 197, 115, 35, 235, 206, 180, 255, 255, 255, 255, 255, 255, 255, 255, 255, 193, 107, 26, 233, 194, 123, 242, 207, 117, 236, 181, 69, 235
  Data.b 183, 72, 204, 125, 40, 215, 158, 106, 194, 109, 32, 224, 160, 59, 237, 185, 75, 236, 183, 74, 235, 183, 74, 204, 122, 40, 217, 162, 111, 255, 255, 255, 255, 255, 255, 255, 255, 255, 235, 206
  Data.b 180, 197, 115, 35, 251, 245, 239, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 197, 112, 28, 234, 198, 126, 242, 207, 117, 237, 184, 75, 237, 186, 78, 210, 134, 46
  Data.b 225, 164, 63, 238, 190, 81, 237, 186, 80, 237, 187, 80, 206, 127, 42, 218, 165, 113, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 251, 245, 239, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 200, 117, 30, 234, 201, 130, 241, 207, 124, 238, 190, 85, 238, 193, 88, 238, 193, 87, 238, 191, 87, 238, 192
  Data.b 86, 209, 131, 43, 221, 168, 114, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 204, 120, 33, 233, 194, 120, 240, 195, 92, 239, 195, 93, 239, 195, 93, 241, 199, 97, 211, 133, 45, 225, 175, 123, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 208, 128, 39, 230, 174, 72, 241, 199, 102, 240, 198, 101, 240, 198, 100, 242, 202, 105, 214, 140, 47, 227, 179, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 210, 131, 41, 233, 183, 81, 244
  Data.b 205, 110, 243, 202, 107, 243, 203, 108, 243, 206, 117, 242, 201, 104, 243, 202, 107, 216, 144, 51, 227, 176, 117, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 253, 247, 240, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 212, 134, 42, 234, 186, 88, 244, 209, 116, 244, 206, 114, 243, 207, 111, 222, 156, 56
  Data.b 239, 210, 147, 251, 235, 185, 244, 205, 110, 244, 208, 113, 219, 149, 53, 229, 181, 119, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 247, 240, 216, 145, 49, 242
  Data.b 218, 185, 255, 255, 255, 255, 255, 255, 255, 255, 255, 215, 140, 44, 236, 189, 90, 245, 212, 121, 245, 209, 119, 244, 211, 117, 220, 153, 55, 229, 179, 114, 214, 138, 39, 240, 213, 149, 251, 235
  Data.b 185, 245, 208, 115, 244, 211, 117, 220, 153, 55, 230, 183, 121, 255, 255, 255, 255, 255, 255, 255, 255, 255, 242, 218, 185, 216, 145, 49, 224, 163, 69, 221, 155, 56, 244, 220, 187, 255, 255, 255
  Data.b 219, 144, 47, 238, 194, 97, 245, 214, 126, 245, 211, 124, 245, 212, 124, 223, 159, 59, 231, 185, 122, 255, 255, 255, 255, 255, 255, 219, 143, 42, 241, 214, 152, 251, 235, 185, 246, 211, 120, 247
  Data.b 214, 123, 223, 159, 58, 233, 185, 122, 255, 255, 255, 244, 220, 187, 221, 151, 54, 223, 158, 59, 229, 179, 86, 246, 220, 144, 221, 152, 50, 222, 149, 52, 238, 198, 101, 246, 217, 131, 246, 214
  Data.b 129, 245, 215, 128, 225, 163, 61, 233, 188, 124, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 221, 147, 45, 242, 215, 155, 251, 235, 185, 245, 213, 125, 245, 216, 129, 225, 163, 62
  Data.b 230, 178, 103, 221, 152, 52, 246, 213, 122, 227, 169, 69, 231, 178, 85, 249, 226, 157, 244, 209, 118, 240, 202, 107, 247, 217, 135, 247, 216, 133, 247, 217, 134, 227, 167, 65, 235, 190, 125, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 223, 151, 47, 243, 219, 156, 251, 235, 185, 247, 215, 129, 247, 216, 132, 236, 188, 89, 244, 210, 120, 248, 220
  Data.b 138, 230, 171, 69, 232, 182, 86, 251, 235, 185, 248, 219, 134, 248, 220, 136, 247, 219, 136, 246, 220, 137, 230, 171, 64, 237, 193, 126, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 225, 154, 48, 244, 221, 160, 251, 235, 185, 247, 220, 134, 248, 220, 137, 248, 220, 136, 248, 223, 140, 231, 173, 71, 234, 186, 90, 251
  Data.b 235, 185, 248, 218, 139, 248, 219, 140, 249, 220, 143, 238, 195, 95, 235, 185, 106, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 228, 161, 52, 244, 215, 142, 249, 220, 140, 248, 219, 140, 248, 219, 140, 249, 223, 145, 233, 178, 74, 236, 189, 93, 251, 235, 185, 248, 220, 141, 248, 221, 142
  Data.b 248, 223, 143, 246, 216, 129, 231, 171, 61, 248, 228, 191, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 228, 191, 231
  Data.b 171, 60, 246, 215, 127, 248, 221, 142, 248, 221, 142, 248, 221, 142, 249, 225, 147, 235, 183, 77, 238, 195, 98, 251, 235, 185, 251, 235, 185, 251, 235, 185, 251, 235, 185, 252, 231, 170, 249, 227
  Data.b 159, 234, 178, 70, 248, 228, 191, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 228, 191, 234, 178, 70, 249, 227, 159, 252, 231, 170, 252, 232, 172
  Data.b 252, 232, 172, 252, 232, 172, 252, 232, 172, 236, 188, 85, 236, 183, 71, 239, 197, 102, 239, 196, 99, 239, 196, 99, 239, 196, 99, 239, 196, 99, 239, 197, 102, 237, 190, 86, 236, 179, 67, 254
  Data.b 250, 242, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 254, 250, 242, 236, 179, 67, 237, 190, 86, 239, 197, 102, 239, 196, 99, 239, 196, 99, 239, 196, 99, 239, 196, 99, 239, 197
  Data.b 102, 237, 182, 72
Expandend:

Globe:
  Data.b 66, 77, 246, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0, 192, 6
  Data.b 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 233
  Data.b 209, 188, 203, 149, 105, 185, 110, 41, 190, 114, 28, 188, 97, 0, 188, 97, 0, 190, 111, 27, 189, 113, 41, 203, 150, 105, 233, 209, 188, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 239, 221, 206, 182, 100, 20, 211, 156, 79, 218, 138, 4, 235, 193, 82
  Data.b 235, 186, 67, 220, 139, 0, 219, 138, 0, 234, 183, 62, 235, 189, 73, 213, 130, 0, 210, 152, 75, 182, 99, 19, 239, 221, 206, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 209, 159, 114, 190, 101, 0, 237, 194, 81, 228, 168, 25, 222, 142, 0, 239, 215, 171, 219, 139, 0, 221, 142, 2, 220, 141
  Data.b 1, 218, 133, 0, 241, 213, 165, 217, 132, 0, 226, 157, 14, 233, 182, 54, 187, 93, 0, 209, 159, 115, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 205, 147, 96, 206, 122, 10, 237, 194, 81, 235, 201, 114, 224, 146, 0, 223, 144, 0, 239, 210, 147, 222, 141, 0, 222, 142, 0, 221, 141, 0, 219, 137, 0, 238, 208, 140, 219
  Data.b 132, 0, 218, 132, 0, 234, 191, 94, 233, 182, 54, 199, 113, 1, 205, 149, 98, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 213, 166, 118, 220, 160, 50, 230, 161
  Data.b 8, 241, 212, 162, 234, 185, 75, 239, 209, 151, 242, 225, 206, 242, 223, 201, 242, 220, 190, 242, 221, 192, 242, 221, 190, 242, 219, 188, 241, 221, 198, 242, 222, 201, 239, 209, 151, 231, 178, 51
  Data.b 237, 207, 136, 220, 137, 0, 203, 116, 6, 213, 163, 118, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 224, 207, 216, 157, 61, 234, 177, 45, 241, 212, 162, 242, 224, 204, 242, 224, 204, 233
  Data.b 180, 62, 244, 221, 186, 232, 182, 56, 225, 152, 6, 226, 154, 6, 226, 153, 3, 224, 148, 0, 230, 174, 40, 244, 221, 186, 229, 170, 35, 239, 209, 151, 242, 224, 204, 237, 207, 136, 226, 156
  Data.b 4, 196, 109, 5, 241, 224, 208, 255, 255, 255, 255, 255, 255, 201, 132, 43, 240, 213, 159, 243, 225, 215, 242, 223, 199, 234, 183, 64, 230, 165, 29, 230, 164, 25, 244, 221, 186, 229, 162, 20
  Data.b 229, 165, 27, 229, 162, 26, 228, 161, 23, 227, 158, 20, 226, 153, 8, 244, 221, 186, 225, 150, 4, 223, 148, 0, 226, 165, 19, 242, 224, 204, 242, 224, 204, 233, 188, 85, 191, 107, 25, 255
  Data.b 255, 255, 238, 215, 192, 228, 196, 150, 242, 216, 173, 233, 174, 36, 245, 229, 214, 232, 172, 40, 233, 173, 49, 231, 169, 37, 244, 231, 219, 230, 164, 28, 231, 166, 34, 229, 165, 32, 230, 163
  Data.b 28, 230, 164, 26, 228, 159, 13, 245, 228, 208, 227, 157, 10, 227, 156, 19, 226, 151, 3, 242, 220, 190, 224, 142, 0, 239, 207, 134, 219, 172, 112, 238, 215, 193, 219, 173, 120, 241, 210, 142
  Data.b 236, 182, 59, 236, 181, 52, 246, 231, 216, 235, 177, 46, 234, 177, 52, 235, 179, 55, 244, 221, 186, 236, 192, 93, 236, 193, 95, 236, 192, 92, 235, 190, 88, 235, 189, 84, 235, 186, 74, 240
  Data.b 216, 170, 230, 164, 24, 228, 161, 17, 227, 155, 5, 242, 224, 204, 225, 151, 1, 226, 152, 5, 228, 174, 60, 218, 167, 117, 215, 157, 81, 243, 205, 103, 239, 201, 118, 244, 223, 193, 245, 227
  Data.b 206, 245, 224, 195, 244, 220, 185, 242, 215, 167, 244, 226, 201, 239, 209, 147, 242, 221, 190, 242, 221, 190, 242, 221, 190, 242, 221, 190, 239, 209, 147, 244, 223, 191, 239, 209, 147, 241, 215, 165
  Data.b 241, 216, 173, 241, 221, 192, 240, 212, 163, 233, 182, 62, 229, 159, 10, 204, 132, 56, 218, 165, 86, 247, 233, 219, 243, 211, 152, 243, 211, 150, 244, 221, 176, 238, 188, 69, 237, 186, 70, 238
  Data.b 184, 61, 248, 237, 226, 236, 181, 58, 235, 181, 64, 235, 182, 62, 234, 179, 57, 235, 177, 56, 233, 172, 44, 245, 231, 218, 230, 168, 34, 231, 169, 38, 231, 165, 28, 239, 207, 141, 237, 195
  Data.b 103, 237, 196, 105, 243, 223, 195, 211, 144, 57, 227, 183, 101, 244, 207, 117, 241, 199, 95, 244, 212, 141, 243, 217, 164, 240, 194, 88, 240, 194, 89, 238, 190, 77, 248, 239, 230, 237, 188, 71
  Data.b 238, 189, 77, 238, 188, 73, 237, 186, 71, 236, 185, 68, 235, 180, 55, 246, 233, 220, 234, 177, 50, 234, 178, 58, 233, 174, 47, 239, 206, 139, 236, 191, 88, 231, 168, 36, 231, 170, 33, 213
  Data.b 138, 33, 229, 186, 107, 246, 213, 128, 245, 204, 106, 245, 216, 149, 245, 221, 169, 242, 201, 98, 242, 200, 101, 240, 195, 89, 249, 240, 234, 239, 192, 81, 239, 193, 86, 239, 192, 83, 239, 191
  Data.b 81, 238, 189, 77, 237, 186, 64, 247, 235, 225, 236, 183, 58, 236, 184, 66, 235, 179, 57, 240, 209, 146, 238, 194, 100, 233, 174, 46, 233, 173, 44, 215, 143, 37, 222, 172, 95, 250, 239, 229
  Data.b 246, 221, 172, 247, 224, 173, 247, 228, 196, 245, 204, 103, 244, 203, 106, 242, 200, 94, 251, 243, 235, 241, 197, 92, 242, 198, 95, 241, 195, 91, 240, 194, 88, 238, 193, 84, 238, 188, 73, 248
  Data.b 236, 226, 237, 184, 64, 236, 186, 69, 237, 183, 59, 241, 213, 162, 240, 204, 130, 239, 205, 131, 246, 228, 207, 216, 155, 68, 227, 177, 100, 251, 230, 172, 248, 225, 174, 248, 233, 215, 249, 236
  Data.b 224, 248, 233, 215, 247, 233, 208, 247, 228, 196, 249, 237, 222, 244, 215, 150, 245, 217, 152, 244, 216, 149, 244, 214, 146, 244, 213, 144, 242, 209, 135, 246, 231, 212, 244, 222, 181, 246, 225, 193
  Data.b 244, 227, 200, 245, 229, 211, 244, 224, 194, 241, 204, 129, 238, 186, 61, 219, 153, 67, 231, 189, 128, 247, 233, 205, 248, 218, 133, 248, 216, 128, 250, 243, 236, 247, 214, 123, 247, 213, 125, 247
  Data.b 213, 131, 250, 238, 221, 247, 231, 208, 251, 248, 244, 251, 248, 244, 251, 248, 244, 251, 248, 244, 247, 231, 208, 247, 231, 208, 241, 200, 100, 240, 196, 91, 240, 191, 78, 245, 231, 218, 238, 188
  Data.b 71, 238, 189, 72, 237, 198, 119, 229, 183, 125, 245, 225, 197, 238, 215, 179, 251, 239, 219, 247, 215, 124, 251, 244, 237, 248, 217, 132, 248, 219, 139, 248, 217, 132, 251, 248, 244, 246, 213, 124
  Data.b 247, 213, 127, 246, 212, 124, 245, 210, 120, 245, 209, 117, 243, 205, 107, 249, 239, 232, 243, 203, 102, 243, 204, 106, 241, 199, 96, 246, 231, 220, 240, 194, 80, 247, 225, 195, 231, 195, 137, 245
  Data.b 225, 198, 255, 255, 255, 225, 169, 72, 250, 240, 227, 250, 242, 238, 250, 242, 231, 248, 223, 159, 248, 217, 133, 248, 217, 131, 251, 241, 225, 248, 217, 132, 248, 219, 138, 248, 218, 135, 247, 216
  Data.b 133, 247, 215, 130, 246, 211, 120, 248, 233, 209, 245, 208, 113, 244, 207, 110, 245, 212, 136, 247, 232, 216, 248, 236, 231, 243, 219, 170, 221, 154, 51, 255, 255, 255, 255, 255, 255, 248, 234, 213
  Data.b 236, 199, 119, 250, 233, 194, 250, 237, 219, 251, 245, 244, 250, 237, 216, 247, 223, 159, 250, 235, 202, 249, 228, 176, 248, 217, 131, 248, 217, 133, 248, 217, 133, 248, 217, 132, 248, 224, 168, 248
  Data.b 229, 192, 247, 221, 161, 248, 232, 206, 249, 239, 237, 247, 231, 209, 247, 215, 132, 229, 169, 59, 248, 234, 214, 255, 255, 255, 255, 255, 255, 255, 255, 255, 238, 198, 137, 241, 215, 156, 250, 227
  Data.b 163, 251, 247, 243, 249, 229, 185, 250, 236, 209, 251, 249, 245, 252, 248, 243, 251, 247, 241, 251, 247, 243, 251, 246, 241, 251, 245, 239, 251, 245, 238, 250, 242, 240, 249, 233, 205, 249, 228, 180
  Data.b 248, 237, 229, 248, 215, 122, 239, 205, 128, 237, 197, 135, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 238, 199, 132, 242, 215, 156, 252, 241, 223, 250, 235, 208, 248
  Data.b 216, 127, 249, 219, 139, 251, 241, 227, 248, 216, 127, 248, 217, 132, 248, 217, 132, 248, 216, 128, 250, 236, 219, 248, 216, 128, 248, 217, 129, 247, 229, 198, 249, 229, 188, 241, 210, 138, 238, 200
  Data.b 134, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 203, 141, 239, 204, 126, 243, 225, 190, 249, 230, 182, 249, 219, 135, 251, 246, 241
  Data.b 248, 216, 129, 248, 218, 137, 248, 218, 137, 248, 217, 131, 250, 239, 229, 248, 217, 131, 248, 223, 162, 247, 229, 198, 239, 202, 124, 241, 203, 141, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 250, 237, 215, 236, 188, 95, 243, 225, 190, 249, 231, 189, 251, 241, 224, 251, 237, 208, 249, 222, 154, 249, 223
  Data.b 152, 249, 234, 201, 251, 237, 215, 248, 225, 172, 242, 219, 181, 236, 188, 95, 250, 237, 215, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 232, 202, 242, 208, 144, 240, 202, 127, 239, 203, 127, 242, 209, 134, 242, 209, 137, 239, 201, 124, 240, 203, 128, 242
  Data.b 208, 144, 249, 233, 202, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
Globeend:

Blue_key:
  Data.b 66, 77, 246, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0
  Data.b 40, 0, 0, 0, 24, 0, 0, 0, 24, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0, 192, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  Data.b 255, 255, 255, 195, 193, 191, 136, 131, 127, 150, 145, 142, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 196, 195, 194, 203, 201
  Data.b 200, 164, 159, 156, 164, 161, 158, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 196, 195, 194, 246, 246, 246, 189, 186, 185, 161, 157, 154, 152
  Data.b 147, 145, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 196, 195, 194, 76, 69, 69, 216, 216, 217, 190, 186, 183, 158, 152, 148, 140, 134, 133, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 196, 195, 194, 176, 173, 173, 76, 69, 69, 216, 216, 217, 184, 178, 177, 158, 151, 149, 134, 128, 127, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 195, 194, 193, 216, 216, 217, 176, 173, 173, 71, 66, 65, 209, 207, 206, 177, 172, 170, 153, 147, 144, 135, 129, 129, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 176, 175
  Data.b 174, 216, 216, 217, 176, 173, 173, 94, 91, 90, 209, 207, 206, 172, 168, 165, 143, 138, 134, 138, 136, 131, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 183, 182, 180, 255, 255, 255, 176
  Data.b 173, 173, 94, 91, 90, 209, 207, 206, 168, 161, 161, 140, 134, 132, 141, 135, 131, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 185, 184, 183, 255, 255, 255, 176, 173, 173, 94, 91, 90
  Data.b 209, 207, 206, 165, 159, 155, 141, 135, 133, 134, 128, 125, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 193, 192, 191, 235, 234, 234, 176, 173, 173, 94, 91, 90, 209, 207, 206, 160, 154
  Data.b 151, 130, 127, 124, 136, 131, 128, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 219, 218, 218, 235, 234, 234, 176, 173, 173, 94, 91, 90, 209, 207, 206, 153, 144, 137, 144, 79, 24, 168
  Data.b 89, 20, 168, 85, 0, 165, 83, 0, 162, 79, 0, 176, 118, 70, 232, 216, 204, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 206, 204, 204, 235, 234, 234, 142, 144, 148, 94, 91, 90, 181, 85, 0, 216, 125, 0, 215, 126, 0, 214, 126, 0, 214, 125, 0
  Data.b 213, 125, 0, 213, 128, 0, 191, 101, 0, 195, 145, 107, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 179, 175, 176, 103, 73, 48, 220, 153, 67, 220, 136, 10, 219, 136, 15, 220, 137, 14, 217, 132, 14, 218, 134, 12, 218, 133, 10, 219, 131, 10, 220, 133
  Data.b 9, 209, 124, 8, 200, 147, 107, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 203, 201, 201, 202, 130, 54, 235, 172, 64, 226, 143, 28, 223, 145, 30, 223, 143, 28, 223, 143, 27, 223, 143, 27, 223, 143, 27, 222, 142, 26, 222, 142, 25, 225, 144, 25, 202, 115, 15, 234
  Data.b 216, 205, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 228, 196, 174, 246, 215, 162, 229, 151
  Data.b 34, 228, 156, 42, 228, 157, 43, 228, 152, 41, 227, 154, 41, 227, 153, 40, 227, 152, 40, 227, 152, 40, 227, 154, 39, 226, 150, 40, 228, 150, 37, 184, 93, 24, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 208, 149, 90, 248, 211, 142, 232, 162, 48, 233, 165, 55, 232, 163, 54, 232
  Data.b 163, 54, 233, 165, 53, 234, 166, 54, 233, 164, 54, 231, 163, 52, 231, 162, 50, 231, 160, 48, 231, 157, 43, 216, 151, 78, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 219, 165, 101, 247, 209, 139, 237, 171, 61, 237, 173, 66, 237, 172, 66, 239, 175, 68, 226, 150, 47, 210, 125, 29
  Data.b 222, 140, 33, 234, 161, 45, 239, 174, 68, 239, 181, 80, 242, 190, 103, 216, 151, 78, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 223, 171, 110, 252, 218, 161, 242, 188, 88, 243, 190, 92, 243, 191, 93, 244, 188, 92, 183, 104, 27, 249, 241, 233, 255, 255, 255, 240, 201, 137, 246, 208
  Data.b 145, 249, 212, 148, 249, 209, 140, 217, 154, 84, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 234, 201, 153, 255, 245, 227, 250, 218, 154, 251, 220, 159, 251, 222, 161, 241, 204, 143, 233, 211, 190, 255, 255, 255, 255, 255, 255, 250, 239, 224, 238, 195, 123, 250, 216, 154, 249, 212, 146, 217
  Data.b 155, 79, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 241, 216, 183, 255, 244, 222, 253, 225
  Data.b 175, 253, 221, 160, 254, 223, 163, 248, 217, 155, 194, 135, 78, 255, 255, 255, 255, 255, 255, 225, 183, 134, 242, 203, 138, 253, 220, 160, 254, 217, 154, 223, 171, 109, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 233, 192, 132, 255, 250, 231, 254, 223, 163, 254, 225, 165, 255
  Data.b 227, 171, 235, 197, 132, 190, 127, 64, 200, 141, 84, 222, 176, 114, 254, 224, 164, 255, 224, 162, 241, 195, 120, 244, 229, 217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 248, 231, 209, 233, 192, 132, 255, 247, 223, 255, 227, 178, 255, 227, 165, 255, 230, 172, 255, 235, 176
  Data.b 255, 235, 175, 255, 232, 171, 255, 223, 159, 241, 194, 120, 230, 192, 155, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 249, 234, 214, 233, 192, 132, 255, 247, 223, 255, 240, 210, 255, 232, 185, 255, 233, 182, 255, 233, 178, 255, 217, 148, 240, 187
  Data.b 111, 229, 184, 138, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255, 255, 253, 248, 240, 248, 223, 185, 235, 196, 141, 240, 190, 114, 231, 167, 95, 231, 167, 95, 235, 181, 119, 249, 231, 212, 255, 255, 255, 255, 255, 255, 255
  Data.b 255, 255, 255, 255, 255, 255, 255, 255
Blue_keyend:
EndDataSection

Egypt my love
User avatar
DoubleDutch
Addict
Addict
Posts: 3185
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: New Update :Windows Hand Made TitleBar (Windows)

Post by DoubleDutch »

Not a crazy idea... looks great apart from when you move the cursor over the icons - they seem to mask badly? (win7 x64)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
electrochrisso
Addict
Addict
Posts: 979
Joined: Mon May 14, 2007 2:13 am
Location: Darling River

Re: New Update :Windows Hand Made TitleBar (Windows)

Post by electrochrisso »

Works good on XP now and your latest addition is really 8) man.
Keep up the good work, I am learning a lot.
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 3994
Joined: Sun Apr 12, 2009 6:27 am

Re: New Update :Windows Hand Made TitleBar (Windows)

Post by RASHAD »

@DoubleDutch & @electrochrisso
Thank you for your kind comments
I think that next code will fit the requirements
Fast ,Stable and Good looking

Code: Select all

Global x,y,cap,bor,run,oldl,oldt,oldr,oldb,maxflag,r.RECT,r2.RECT,im1.RECT,im2.RECT,im3.RECT,im4.RECT


Procedure WTButton(Posx)
  StartDrawing(WindowOutput(2))
      DrawingMode(#PB_2DDrawing_XOr)
      Box(Posx,2,22,22)
      ;DrawImage(ImageID(0),Posx+3,5) 
  StopDrawing()
EndProcedure

Procedure WndProc(hwnd, uMsg, wParam, lParam)
      GetWindowRect_(WindowID(1),r.RECT)
      x = r\right - 125
      y = r\top + 2
      result = #PB_ProcessPureBasicEvents 
      result = #PB_ProcessPureBasicEvents 

 Select uMsg
 
        Case #WM_WINDOWPOSCHANGED
            If maxflag = 1 And run = 0
                SystemParametersInfo_(#SPI_GETWORKAREA, 0,r2.RECT, 0)
                ResizeWindow(1,r2\left,r2\top,r2\right-r2\left-bor,r2\bottom-r2\top-cap-bor)
            ElseIf maxflag = 0 And run = 1
                ResizeWindow(1,oldl,oldt,oldr-oldl,oldb-oldt)
            EndIf
        
        
        Case #WM_SETTINGCHANGE
            If maxflag = 1 And run = 1
                SystemParametersInfo_(#SPI_GETWORKAREA, 0,r2.RECT, 0)
                ResizeWindow(1,r2\left,r2\top,r2\right-r2\left-bor,r2\bottom-r2\top-cap-bor)
            ElseIf maxflag = 0 And run = 0
                ResizeWindow(1,oldl,oldt,oldr-oldl,oldb-oldt)
            EndIf
        
        Case #WM_GETMINMAXINFO     
            *pMinMax.MINMAXINFO = lParam
            *pMinMax\ptMinTrackSize\x=230
        
      
        Case #WM_SIZE,#WM_MOVE,#WM_PAINT
        
             GetWindowRect_(WindowID(2),r2.RECT)         
             im1\top = r2\top + 3
             im1\left = r2\left - 2
             im1\right = im1\left + 24
             im1\bottom = im1\top + 20
             
             im2\top = r2\top + 3
             im2\left = r2\left + 30
             im2\right = im2\left + 25
             im2\bottom = im2\top + 20
             
             im3\top = r2\top + 3
             im3\left = r2\left + 60
             im3\right = im3\left + 25
             im3\bottom = im3\top + 20
             
             im4\top = r2\top + 3
             im4\left = r2\left + 90
             im4\right = im4\left + 25
             im4\bottom = im4\top + 20           
       
             ResizeWindow(2,x,y,125,24)
             ResizeGadget(2,10,(r\bottom-r\top-cap-bor-35),80,25)
             ResizeGadget(3,100,(r\bottom-r\top-cap-bor-35),80,25)
             
            
   EndSelect
   
  ProcedureReturn result 
EndProcedure
 
 
 CatchImage(0, ?Exit)
 CatchImage(1, ?Expand)
 CatchImage(2, ?Globe)
 CatchImage(3, ?Blue_key)

 ResizeImage(0, 16,16)
 ResizeImage(1, 16,16)
 ResizeImage(2, 16,16)
 ResizeImage(3, 16,16)

OpenWindow(1,0,0,450,170,Chr(174)+"  Hand Made",#PB_Window_SizeGadget|#PB_Window_ScreenCentered)
cap = GetSystemMetrics_(#SM_CYCAPTION)
bor = 2*GetSystemMetrics_(#SM_CYFRAME)
ButtonGadget(2,10,135,80,25,"TEST")
ButtonGadget(3,90,135,80,25,"QUIT")
OpenWindow(2,0,0,125,24,"",#WS_POPUP|#PB_Window_BorderLess,WindowID(1))

  tbHnd = CreateToolBar(0, WindowID(2))
  SetWindowTheme_(tbHnd, @null.w, @null.w)  
  ToolBarImageButton(3,ImageID(3))
  ToolBarSeparator()
  ToolBarImageButton(2,ImageID(2))
  ToolBarSeparator()
  ToolBarImageButton(1,ImageID(1))
  ToolBarSeparator()
  ToolBarImageButton(0,ImageID(0))
  
  SetWindowColor(2,#White)
  SetWindowLong_(WindowID(2),#GWL_EXSTYLE,GetWindowLong_(WindowID(2),#GWL_EXSTYLE)|#WS_EX_LAYERED)
  SetLayeredWindowAttributes_(WindowID(2),#White,0,#LWA_COLORKEY)

SetWindowCallback(@WndProc())
InvalidateRect_(WindowID(1),0,1)
SetActiveWindow(1)


Repeat
  SetActiveWindow(1)
  Select WaitWindowEvent()
           
      Case #PB_Event_Gadget
          Select EventGadget()
            Case 2
            
            Case 3
               Q = 1
               
                             
          EndSelect          
         
        
      Case #WM_MOUSEMOVE,#WM_NCMOUSEMOVE    
            GetCursorPos_(@p.POINT)
            If GetKeyState_(#VK_LBUTTON) = 1
                mouse_event_(#MOUSEEVENTF_LEFTDOWN,0,0,0,0)
                mouse_event_(#MOUSEEVENTF_LEFTUP,0,0,0,0)
            EndIf
            If PtInRect_(@im1,PeekQ(@p))              
              RedrawWindow_(tbHnd,#Null,#Null,#RDW_INVALIDATE|#RDW_UPDATENOW)
              WTButton(0)
              If GetKeyState_(#VK_LBUTTON) = 1
                Debug "Fourth Button Pressed"
              EndIf                  
            ElseIf PtInRect_(@im2,PeekQ(@p))
              RedrawWindow_(tbHnd,#Null,#Null,#RDW_INVALIDATE|#RDW_UPDATENOW)
              WTButton(31)
              If GetKeyState_(#VK_LBUTTON) = 1
                Debug "Third Button Pressed"
              EndIf  
            ElseIf PtInRect_(@im3,PeekQ(@p))
              RedrawWindow_(tbHnd,#Null,#Null,#RDW_INVALIDATE|#RDW_UPDATENOW)
              WTButton(62)
              If GetKeyState_(#VK_LBUTTON) = 1 And maxflag = 0
                GetWindowRect_(WindowID(1),r.RECT)
                SystemParametersInfo_(#SPI_GETWORKAREA, 0,r2.RECT, 0)
                oldt = r\top
                oldl = r\left
                oldr = r\right
                oldb = r\bottom
                ResizeWindow(1,r2\left,r2\top,r2\right-r2\left-bor,r2\bottom-r2\top-cap-bor)
                maxflag = 1
                run = 1
              ElseIf GetKeyState_(#VK_LBUTTON) = 1
                maxflag =0
                run = 0
                ResizeWindow(1,oldl,oldt,oldr-oldl,oldb-oldt)                
              EndIf
            ElseIf PtInRect_(@im4,PeekQ(@p))
              RedrawWindow_(tbHnd,#Null,#Null,#RDW_INVALIDATE|#RDW_UPDATENOW)
              WTButton(93)
              If GetKeyState_(#VK_LBUTTON)
                Q =1
              EndIf
            Else
              RedrawWindow_(tbHnd,#Null,#Null,#RDW_INVALIDATE|#RDW_UPDATENOW)               
            EndIf
    
        
    EndSelect

  Until Q = 1

;Copy DataSection from previous post in here

Do not forget the DataSection

Edit :
Update to take into consideration Windows TaskBar size and position
Last edited by RASHAD on Wed Nov 17, 2010 11:39 am, edited 1 time in total.
Egypt my love
User avatar
DoubleDutch
Addict
Addict
Posts: 3185
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: New Update :Windows Hand Made TitleBar (Windows)

Post by DoubleDutch »

Much, much better. :) But having it display an alternative image on rollover would be best.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 3994
Joined: Sun Apr 12, 2009 6:27 am

Re: New Update :Windows Hand Made TitleBar (Windows)

Post by RASHAD »

@DoubleDutch
Thank you man
You give me the motive to enhance the code more and more
Previous post updated to take into consideration Windows TaskBar size and position
Well,the program interface as a whole

And yes we can use different images to indicate when the cursor is over
But let us think to get some novel idea to do that
Keep tuned

RASHAD
Egypt my love
Post Reply