Inf0Byt3 wrote:Thanks for the file, Coolman. I've restored the download link on the first page.
InfoSkin1.0 - OpenSource Theme Engine for PB4
- Rook Zimbabwe
 - Addict

 - Posts: 4322
 - Joined: Tue Jan 02, 2007 8:16 pm
 - Location: Cypress TX
 - Contact:
 
Hi,
I'm trying Inf0Byt3 - InfoSkin with PureBasic 4.30 beta 5, by the way, InfoSkin nicely done!
Using it on the x86 version, it works perfectly, but using it on the x64 version, it fails to show everything and has no mouseover and mousedown support.
From the InfoSkin Example.pb, 'My Gadget 1' and 'I like InfoSkin' and the working Progressbar appears and with the transparent window but that's all.
Hopefully it's not much troubles to be adjusted for x64.
Regards,
			
			
									
									
						I'm trying Inf0Byt3 - InfoSkin with PureBasic 4.30 beta 5, by the way, InfoSkin nicely done!
Using it on the x86 version, it works perfectly, but using it on the x64 version, it fails to show everything and has no mouseover and mousedown support.
From the InfoSkin Example.pb, 'My Gadget 1' and 'I like InfoSkin' and the working Progressbar appears and with the transparent window but that's all.
Hopefully it's not much troubles to be adjusted for x64.
Regards,
I hope Inf0Byt3 doesn't mind, I made some adjustments to make it x64 compatible..
InfoSkin.pbi changes;
and
			
			
									
									
						InfoSkin.pbi changes;
Code: Select all
Procedure InfoSkinOpenWindow(WindowID,x,y,ImgID,Title.s,Flags,Parent)
 w = ImageWidth(ImgID)
 h = ImageHeight(ImgID)
 If Parent <> -1
  hWnd = OpenWindow(0, x, y, w, h, title,#PB_Window_BorderLess|#PB_Window_Invisible|Flags,Parent)
 Else
  hWnd = OpenWindow(0, x, y, w, h, title,#PB_Window_BorderLess|#PB_Window_Invisible|Flags)
 EndIf
 
 hBrush = CreatePatternBrush_(ImageID(ImgID))
 SetClassLongPtr_(WindowID(WindowID), #GCL_HBRBACKGROUND, hBrush)
;SetClassLong_(WindowID(WindowID), #GCL_HBRBACKGROUND, hBrush)
 InvalidateRect_(WindowID(WindowID), 0, #True)
 
 HideWindow(WindowID,0)
 ProcedureReturn hWnd
EndProcedureCode: Select all
Structure myPOINT
  x.i
  y.i
EndStructure
Procedure InfoSkinEvent()
 Shared OnTop,Checked,Selected,Clicked
 
 GetCursorPos_(mousepos.myPOINT)
;GetCursorPos_(mousepos.POINT)
 
 ForEach InfoSkinGadgets() 
  
  GetWindowRect_(InfoSkinGadgets()\handle,position.RECT)
   If PtInRect_(position,mousepos\x,mousepos\y) And GetForegroundWindow_()=InfoSkinGadgets()\hwnd
    If Clicked = 0
     If InfoSkinGadgets()\type = 0 ;Button
      SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[1])
      OnTop = 1
     ElseIf InfoSkinGadgets()\type = 1
      If Checked = 0
       SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[1])
      ElseIf Checked = 1
       SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[3])
      EndIf
      OnTop = 1
     EndIf
    EndIf
  
    If GetAsyncKeyState_(#VK_LBUTTON) & $8000
;If GetAsyncKeyState_(#VK_LBUTTON) = -32767
     If OnTop = 1
      If InfoSkinGadgets()\type = 0 ;Button
       SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[2])
      ElseIf InfoSkinGadgets()\type = 1 ;CheckBox
       If Checked = 0
        SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[5])
       ElseIf Checked = 1
        SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[5])
       EndIf
      EndIf
      If Selected = 0
       If InfoSkinGadgets()\type = 0 ;Button
        SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[2])
       ElseIf InfoSkinGadgets()\type = 1 ;CheckBox
        If Checked = 0
         SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[5])
         Checked = 1
        ElseIf Checked = 1
         SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[5])
         Checked = 0
        EndIf
       EndIf
      Else
       Selected = 0
      EndIf
      Clicked = 1
     EndIf
    Else
     Clicked = 0
    EndIf
    
   Else
    If InfoSkinGadgets()\type = 0 ;Button
     SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[0])
    ElseIf InfoSkinGadgets()\type = 1 ;CheckBox
     If Checked = 1
      SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[4])
     Else
      SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[0])
     EndIf
    EndIf
   EndIf
 Next   
 
EndProcedureThat's great, thanks. I don't have a 64 bit OS installed that's why I couldn't update the code.I hope Inf0Byt3 doesn't mind, I made some adjustments to make it x64 compatible..
@Kiki:
Replace this:
Code: Select all
Procedure threaddie() ;Thread to control progressbar!
Code: Select all
Procedure threaddie(Param) ;Thread to control progressbar!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
						Once again .. I couldn't resist! I have modified Inf0Byt3 InfoSkin some more, .. only because InfoSkin has potential. 
I modified it to permit the use of InfoSkinCheckbox multiple times, though small mod but still well needed.
.. If Inf0Byt3 hadn't released InfoSkin, our contributes wouldn't be possible, so thank Inf0Byt3.
Changes only in InfoSkin.pbi file;
			
			
									
									
						I modified it to permit the use of InfoSkinCheckbox multiple times, though small mod but still well needed.
.. If Inf0Byt3 hadn't released InfoSkin, our contributes wouldn't be possible, so thank Inf0Byt3.
Changes only in InfoSkin.pbi file;
Code: Select all
Procedure InfoSkinInit()
 Structure InfoGadget
  id.l
  type.l
  width.l
  height.l
  handle.l
  hwnd.l
  state.l
  progressbar_internal_images.l[3]
  progressbar_internal_values.l[3]
  progressbar_maximum.l
  skin.l[6]
  Checked.l
 EndStructure
 
 Global NewList InfoSkinGadgets.InfoGadget()
 
 Shared OnTop,Selected,Clicked
 
 ProcedureReturn 1 
EndProcedure
Procedure InfoSkinCheckbox(ID,hWnd,X,Y,ImageID,StateImageID,BackImageID)
 w = ImageWidth(ImageID)/3
 h = ImageHeight(ImageID)
 
 
 AddElement(InfoSkinGadgets())
 InfoSkinGadgets()\id = ID
 InfoSkinGadgets()\type = 1 ;Checkbox
 InfoSkinGadgets()\hwnd = hWnd
 
 InfoSkinGadgets()\Checked = 0
 
 InfoSkinGadgets()\Skin[0] = GrabImage(ImageID,#PB_Any,0,0,w,h)
 InfoSkinGadgets()\Skin[1] = GrabImage(ImageID,#PB_Any,w,0,w,h)
 InfoSkinGadgets()\Skin[2] = GrabImage(ImageID,#PB_Any,w*2,0,w,h)
 InfoSkinGadgets()\Skin[3] = GrabImage(StateImageID,#PB_Any,0,0,w,h)
 InfoSkinGadgets()\Skin[4] = GrabImage(StateImageID,#PB_Any,w,0,w,h)
 InfoSkinGadgets()\Skin[5] = GrabImage(StateImageID,#PB_Any,w*2,0,w,h) 
 StartDrawing(ImageOutput(BackImageID))
  oldcol = Point(x,y)
 StopDrawing()
 For draw = 0 To 5
  img = CreateImage(#PB_Any,w,h)
  DC = StartDrawing(ImageOutput(img))
  Box(0,0,w,h, oldcol)
  DrawTransparentImage(DC, ImageID(InfoSkinGadgets()\Skin[draw]), 0, 0, w, h, #Green)
  StopDrawing() 
  InfoSkinGadgets()\Skin[draw] = ImageID(img)
 Next
 
 InfoSkinGadgets()\handle=CreateWindowEx_(0,"STATIC","",1409286158,x,y,100,100,hWnd,0,0,0) 
 SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[0])
EndProcedure
Procedure InfoSkinEvent()
 Shared OnTop,Selected,Clicked 
 GetCursorPos_(mousepos.myPOINT)
 ForEach InfoSkinGadgets()  
  GetWindowRect_(InfoSkinGadgets()\handle,position.RECT)  
   If PtInRect_(position,mousepos\x,mousepos\y) And GetForegroundWindow_()=InfoSkinGadgets()\hwnd
    If Clicked = 0
     If InfoSkinGadgets()\type = 0 ;Button
      SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[1])
      OnTop = 1
     ElseIf InfoSkinGadgets()\type = 1
      If InfoSkinGadgets()\Checked = 0
       SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[1])
      ElseIf InfoSkinGadgets()\Checked = 1
       SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[3])
      EndIf
      OnTop = 1
     EndIf
    EndIf
    
    If GetAsyncKeyState_(#VK_LBUTTON) & $8000
    ;If GetAsyncKeyState_(#VK_LBUTTON) = -32767
     If OnTop = 1
      If InfoSkinGadgets()\type = 0 ;Button
       SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[2])
      ElseIf InfoSkinGadgets()\type = 1 ;CheckBox
          
       If InfoSkinGadgets()\Checked = 0       
        SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[5])
       ElseIf InfoSkinGadgets()\Checked = 1
        SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[5])
       EndIf     
      EndIf
      
      If Selected = 0
       If InfoSkinGadgets()\type = 0 ;Button
        SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[2])
       ElseIf InfoSkinGadgets()\type = 1 ;CheckBox
        If InfoSkinGadgets()\Checked = 0
         SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[5])
         InfoSkinGadgets()\Checked = 1:
        ElseIf InfoSkinGadgets()\Checked = 1
         SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[5])
         InfoSkinGadgets()\Checked = 0:
        EndIf        
       EndIf
      Else
       Selected = 0
      EndIf
      Clicked = 1
     EndIf
    Else
     Clicked = 0
    EndIf
    
   Else
    If InfoSkinGadgets()\type = 0 ;Button
     SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[0])
    ElseIf InfoSkinGadgets()\type = 1 ;CheckBox
     If InfoSkinGadgets()\Checked = 1
      SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[4])
     Else
      SendMessage_(InfoSkinGadgets()\handle,370,0,InfoSkinGadgets()\Skin[0])
     EndIf
    EndIf
   EndIf
   
 Next   
 
EndProcedureHas anyone corrected the unusual behavior with InfoSkin InfoSkinCheckbox? When using simply the InfoSkin Example.pbi, you either need to click it several times to have a checkmark placed, or clicking it once to have the checkmark, .. just as fast as the checkmark appeared, it disappears.
Regards,
Thunder93
			
			
									
									
						Regards,
Thunder93
- Rook Zimbabwe
 - Addict

 - Posts: 4322
 - Joined: Tue Jan 02, 2007 8:16 pm
 - Location: Cypress TX
 - Contact:
 
Re: InfoSkin1.0 - OpenSource Theme Engine for PB4
The link for your Infoskin doesn't work.
			
			
									
									
						- Kwai chang caine
 - Always Here

 - Posts: 5502
 - Joined: Sun Nov 05, 2006 11:42 pm
 - Location: Lyon - France
 
That's right another timeKIKI wrote:The link for your Infoskin doesn't work.
But thank to COOLMAN, you can rebuild the ZIP if you copy/paste this in your IDE
http://www.purebasic.fr/english/viewtop ... 584#257584
The happiness is a road...Not a destination
Hi,
I don't know about you guys/gals but the InfoSkin code only works if I change:
to:
It seems PtInRect takes only two parameters (were the second parameter is a point structure).
bye
fsw
BTW:
PB = Version 4.3 (final)
OS = WinXP MediaCenter Edition 2002 Service Pack 3
			
			
									
									
						I don't know about you guys/gals but the InfoSkin code only works if I change:
Code: Select all
PtInRect_(position, mousepos\x, mousepos\y)Code: Select all
PtInRect_(position, mousepos)bye
fsw
BTW:
PB = Version 4.3 (final)
OS = WinXP MediaCenter Edition 2002 Service Pack 3
Code: Select all
Define mousepos.POINT
PtInRect_(position, mousepos\x | (mousepos\y << 32))PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

						Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.


