You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
I was searching for why PBS_SMOOTH did not work and found that the sp thems does that. I want to use themes in the program, but the search showed that you can turn off themes for a control but did not show code.
"just by calling SetWindowTheme with an empty string your control (button/checkbox/combo etc) will not be painted with the XP Theme. That is easy enough! You will find the SetWindowTheme function in UxTheme.dll which ships starting with Windows XP."
...Source: http://raz-soft.com/cc/disable-xp-theme/
DECLARE FUNCTION SetWindowTheme(BYVAL hWnd AS DWORD, pszSubAppName AS ASCIIZ, pszSubIdList AS ASCIIZ) AS LONG
'------------------------------------------------------------------------------
'Purpose: by calling SetWindowTheme with an empty string your control
' (button/checkbox/combo etc) will not be painted with the XP Theme.
'
'Example: LOCAL hButton AS DWORD
' hButton = GetDlgItem( CBHNDL, %IDOK )
' lRes = DisableXPThemeControl ( hbutton )
' InvalidateRect hButton,BYVAL %NULL,%TRUE
'------------------------------------------------------------------------------
FUNCTION DisableXPThemeControl(BYVAL hControl AS DWORD) AS LONG
LOCAL hLib AS DWORD, pProc AS DWORD, lRes AS LONG
hLib = LoadLibrary("UxTheme.dll")
IF hLib THEN
pProc = GetProcAddress(hLib, "SetWindowTheme")
IF pProc THEN
CALL DWORD pProc USING SetWindowTheme(hControl, " ", " ") TO lRes
FUNCTION = lRes
END IF
FreeLibrary hLib
END IF
END FUNCTION
Last edited by Jules Marchildon; 2 Feb 2009, 06:15 PM.
Reason: added
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment