Page 1 of 1

DrawScrollArrow

Posted: Tue Nov 07, 2006 10:50 pm
by Konne
PB didn't define this Function: (DrawScrollArrow)
http://msdn.microsoft.com/library/defau ... larrow.asp
How can I use it anyway?

Posted: Wed Nov 08, 2006 12:24 am
by Flype
this function is for Vista only - so i can't test it but this should work :

Code: Select all

Import "User32.lib"
  DrawScrollArrow(hdc.l, lprc.l, wControlState.l, rgbOveride.l)
EndImport

Posted: Wed Nov 08, 2006 1:38 pm
by Konne
THx but If I'M trying to run this Code I get two POLINK Errors.

Code: Select all

Import "User32.lib"
  DrawScrollArrow(hdc.l, lprc.l, wControlState.l, rgbOveride.l)
EndImport

DrawScrollArrow(0,0,0,0)

Posted: Wed Nov 08, 2006 3:21 pm
by Hroudtwolf
DrawFrameControl is another option.

Code: Select all

; Hroudtwolf
; 2006. PB 4.00
If OpenWindow(0, 0,0, 300, 300, "DrawFrameControl", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
  hdc.l=GetDC_(WindowID(0))
  ;>---Button--->
  For x=0 To 2
    framerect.RECT
    framerect\left=10+(x*40)
    framerect\top=10
    framerect\right=25+(x*40)
    framerect\bottom=25 
    DrawFrameControl_(hdc.l,@framerect,#DFC_BUTTON,x)
  Next x
  ;<---Button---<
  ;>---Titlebar Buttons--->
  For x=0 To 4
    framerect.RECT
    framerect\left=10+(x*40)
    framerect\top=50
    framerect\right=40+(x*40)
    framerect\bottom=80 
    DrawFrameControl_(hdc.l,@framerect,#DFC_CAPTION,x)
  Next x
  ;<---Titlebar Buttons---<
  ;>---Scroll Buttons--->
  For x=0 To 3
    framerect.RECT
    framerect\left=10+(x*40)
    framerect\top=90
    framerect\right=40+(x*40)
    framerect\bottom=120 
    DrawFrameControl_(hdc.l,@framerect,#DFC_SCROLL,x)
  Next x
  ;<--Scroll Buttons---<
  ;>---MenĂ¼--->
  For x=0 To 2
    framerect.RECT
    framerect\left=10+(x*40)
    framerect\top=130
    framerect\right=40+(x*40)
    framerect\bottom=150 
    DrawFrameControl_(hdc.l,@framerect,#DFC_MENU,x)
  Next x
  ;<--MenĂ¼---<
 
  ReleaseDC_(WindowID(0),hdc.l)
  Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow 
EndIf
End 

Posted: Wed Nov 08, 2006 4:29 pm
by Konne
Thx but this Function ignores the XP Skin Support.

Posted: Wed Nov 08, 2006 8:06 pm
by Flype
Konne wrote:THx but If I'M trying to run this Code I get two POLINK Errors.

Code: Select all

Import "User32.lib"
  DrawScrollArrow(hdc.l, lprc.l, wControlState.l, rgbOveride.l)
EndImport

DrawScrollArrow(0,0,0,0)
you can try to use the file 'User32.lib' provided with the Microsoft Vista PSDK. it should be inside, and if you are luckily it could work...