Page 1 sur 1

#SB_SETBKCOLOR ???

Publié : mar. 05/nov./2013 12:03
par Backup
c'est quoi la valeur de #SB_SETBKCOLOR ?

et pourquoi Purebasic ne l'a pas par defaut ?

Re: #SB_SETBKCOLOR ???

Publié : mar. 05/nov./2013 12:34
par falsam
Bonjour Dobro. #SB_SETBKCOLOR correspond à #CCM_SETBKCOLOR dans ce code :)

Code : Tout sélectionner

#SB_SETBKCOLOR = #CCM_SETBKCOLOR 
If OpenWindow(0, 0, 0, 355, 180, "Statusbar Color", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) 
  SetWindowColor(0, RGB(100, 100, 255)) 
  hStatus = CreateStatusBar(0, WindowID(0)) 
  SendMessage_(hStatus, #SB_SETBKCOLOR, 0, GetWindowColor(0)) 
  ;...Any XP theme will need to removed from StatusBar 
  If OSVersion() >= #PB_OS_Windows_XP
    If GetWindowTheme_(hStatus) 
      SetWindowTheme_(hStatus, @null.w, @null.w) 
    EndIf
  EndIf 
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow 
EndIf

Re: #SB_SETBKCOLOR ???

Publié : mar. 05/nov./2013 12:36
par G-Rom
en fouillant dans un header :
72 #define CCM_FIRST 0x2000
73
74 #define CCM_SETBKCOLOR (CCM_FIRST+0x1) /* lParam = bkColor */
75 #define CCM_SETCOLORSCHEME (CCM_FIRST+0x2) /* lParam = COLORSCHEME struct ptr */
76 #define CCM_GETCOLORSCHEME (CCM_FIRST+0x3) /* lParam = COLORSCHEME struct ptr */
77 #define CCM_GETDROPTARGET (CCM_FIRST+0x4)
78 #define CCM_SETUNICODEFORMAT (CCM_FIRST+0x5)
79 #define CCM_GETUNICODEFORMAT (CCM_FIRST+0x6)
80 #define CCM_SETVERSION (CCM_FIRST+0x7)
81 #define CCM_GETVERSION (CCM_FIRST+0x8)
82 #define CCM_SETNOTIFYWINDOW (CCM_FIRST+0x9) /* wParam = hwndParent */
83 #define CCM_SETWINDOWTHEME (CCM_FIRST+0xb)
84 #define CCM_DPISCALE (CCM_FIRST+0xc)
315 #define SB_SETBKCOLOR CCM_SETBKCOLOR /* lParam = bkColor */
je dirais $2001

Re: #SB_SETBKCOLOR ???

Publié : mar. 05/nov./2013 14:11
par Backup
merci :)