Roberto Lopez wrote:
I've forgot to uncomment that lines
I'll publish the fix in the next build.
Hello Roberto,
There are a more library code's improvements:
1) look at h_button.prg for the following condition:
Code: Select all
...
if (.Not. IsAppThemed())
aRet := InitImageButton ( ParentForm, Caption, 0, x, y, w, h, image , flat , notrans, invisible, notabstop , .F. )
else
aRet := InitImageButton ( ParentForm, Caption, 0, x, y, w, h, image , flat , notrans, invisible, notabstop , .T. )
endif
Why not to replace it with
one code's string:
Code: Select all
aRet := InitImageButton ( ParentForm, Caption, 0, x, y, w, h, image , flat , notrans, invisible, notabstop , IsAppThemed() )
2) look at h_windows.prg for function IsAppThemed():
Code: Select all
*------------------------------------------------------------------------------*
Function IsAppThemed()
*------------------------------------------------------------------------------*
local uResult
Local nVersion
nVersion := WINMAJORVERSIONNUMBER() + ( WINMINORVERSIONNUMBER() / 10 )
If nVersion >= 5.1
...
Why not to replace it with
one code's string:
where
Code: Select all
*------------------------------------------------------------------------------*
Function IsWinXPorLater()
*------------------------------------------------------------------------------*
Local nVersion
nVersion := WINMAJORVERSIONNUMBER() + ( WINMINORVERSIONNUMBER() / 10 )
Return ( nVersion >= 5.1 )
Or is better as C-level function
Code: Select all
HB_FUNC( ISWINXPORLATER )
{
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof( OSVERSIONINFO );
GetVersionEx ( ( OSVERSIONINFO * ) &osvi );
hb_retl( osvi.dwPlatformId == VER_PLATFORM_WIN32_NT
&& ((osvi.dwMajorVersion == 5 && osvi.dwMinorVersion > 0) ||
(osvi.dwMajorVersion > 5)) );
}
Just my two cents...
