this CODE work with Dark-Mode when have NO Manifest for visual Style
- Code: Select all Expand view
- #include "Fivewin.CH"
PROCEDURE MAIN
LOCAL oPickList
LOCAL oUSERDD
LOCAL oDELONOFF
LOCAL aDelOnOff, lisOnOff
LOCAL nWide, nUSERDD := 1, nDELONOFF := 1, nWidth := 550
LOCAL oCursor, ii, iMax, oObj, hDC, acItems := {}
LOCAL aOptions, nItems
LOCAL oRI01,oRI02,oRI03,oRI04,oRI05,oRI06,oRI10,oRI11
aDelOnOff := { "SET DELETED ON", "SET DELETED OFF" }
IF hb_OSIS64BIT()
aOptions := { "CLIPPER", "COMIX", "VFP", "HB32", "HB64", "NTXOBJ2" }
nItems := 7
ELSE
aOptions := { "CLIPPER", "COMIX", "VFP", "HB32", "NTXOBJ2" }
nItems := 6
ENDIF
nWide := ( nWidth - 2 ) / nItems
DEFINE DIALOG oPickList ;
SIZE nWidth, 420 PIXEL TRUEPIXEL ;
TITLE "Picklist" ;
COLOR CLR_HCYAN, CLR_BLACK
@ 290, 0 RADIO oUSERDD VAR nUSERDD SIZE nWide, 30 PIXEL ;
OF oPickList ;
COLOR CLR_HCYAN, CLR_BLACK ;
ITEMS "DEFAULT" UPDATE ;
ON CHANGE nil
* @ 290, ( 0 * nWide ) RADIOITEM oRI01 PROMPT "DEFAULT" OF oPickList SIZE nWide, 30 PIXEL RADIOMENU oUSERDD COLOR CLR_HCYAN, CLR_BLACK
@ 290, ( 1 * nWide ) RADIOITEM oRI02 PROMPT "CLIPPER" OF oPickList SIZE nWide, 30 PIXEL RADIOMENU oUSERDD COLOR CLR_HCYAN, CLR_BLACK
@ 290, ( 2 * nWide ) RADIOITEM oRI03 PROMPT "COMIX" OF oPickList SIZE nWide, 30 PIXEL RADIOMENU oUSERDD COLOR CLR_HCYAN, CLR_BLACK
@ 290, ( 3 * nWide ) RADIOITEM oRI04 PROMPT "VFP" OF oPickList SIZE nWide, 30 PIXEL RADIOMENU oUSERDD COLOR CLR_HCYAN, CLR_BLACK
@ 290, ( 4 * nWide ) RADIOITEM oRI05 PROMPT "HB32" OF oPickList SIZE nWide, 30 PIXEL RADIOMENU oUSERDD COLOR CLR_HCYAN, CLR_BLACK
IF hb_OSIS64BIT()
@ 290, ( 5 * nWide ) RADIOITEM oRI05 PROMPT "HB64" RADIOMENU oUSERDD OF oPickList SIZE nWide, 30 PIXEL COLOR CLR_HCYAN, CLR_BLACK
@ 290, ( 6 * nWide ) RADIOITEM oRI06 PROMPT "NTXOBJ2" RADIOMENU oUSERDD OF oPickList SIZE nWide, 30 PIXEL COLOR CLR_HCYAN, CLR_BLACK
ELSE
@ 290, ( 5 * nWide ) RADIOITEM oRI05 PROMPT "NTXOBJ2" RADIOMENU oUSERDD OF oPickList SIZE nWide, 30 PIXEL COLOR CLR_HCYAN, CLR_BLACK
ENDIF
@ 350, 0 RADIO oDELONOFF VAR nDELONOFF SIZE nWidth/2, 30 PIXEL ;
OF oPickList ;
COLOR CLR_HCYAN, CLR_BLACK ;
ITEMS aDelOnOff[1] UPDATE ;
ON CHANGE nil
* @ 350, 0 RADIOITEM oRI10 PROMPT aDelOnOff[1] RADIOMENU oDELONOFF OF oPickList SIZE nWidth / 2, 30 PIXEL COLOR CLR_HCYAN, CLR_BLACK
@ 350, ( nWidth / 2 ) RADIOITEM oRI11 PROMPT aDelOnOff[2] RADIOMENU oDELONOFF OF oPickList SIZE nWidth / 2, 30 PIXEL COLOR CLR_HCYAN, CLR_BLACK
lisOnOff := SET( _SET_DELETED )
IF( lisOnOff, nDELONOFF := 1, nDELONOFF := 2 )
/******* switch OFF Theme *******/
* SetWindowTheme( oRI01:hWnd, "", "" )
SetWindowTheme( oRI02:hWnd, "", "" )
SetWindowTheme( oRI03:hWnd, "", "" )
SetWindowTheme( oRI04:hWnd, "", "" )
SetWindowTheme( oRI05:hWnd, "", "" )
* SetWindowTheme( oRI10:hWnd, "", "" )
SetWindowTheme( oRI11:hWnd, "", "" )
iMax := LEN(oUSERDD:aItems)
FOR ii := 1 TO iMax
oObj := oUSERDD:aItems[ii]
SetWindowTheme( oObj:hWnd, "", "" )
hDC := GetDC(oObj:hWnd)
SetTextColor(hDC, CLR_HCYAN)
SetBkColor(hDC, CLR_BLACK)
ReleaseDC(hDC)
INVALIDATERECT( oObj:hWnd )
NEXT
iMax := LEN(oDELONOFF:aItems)
FOR ii := 1 TO iMax
oObj := oDELONOFF:aItems[ii]
SetWindowTheme( oObj:hWnd, "", "" )
hDC := GetDC(oObj:hWnd)
SetTextColor(hDC, CLR_HCYAN)
SetBkColor(hDC, CLR_BLACK)
ReleaseDC(hDC)
INVALIDATERECT( oObj:hWnd )
NEXT
#IFDEF __HMG__
END DIALOG
#ENDIF
ACTIVATE DIALOG oPickList CENTER
RETURN
when using Manifest i got BLACK Font Color on BLACK Background
i also try to "switch" Theme of RADIOITEM but it does not help
who can help me please