HMG 2.5.5

HMG announcements; Latest HMG-related news, releases, fixes and updates.

Moderator: Rathinagiri

User avatar
gfilatov
Posts: 511
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 7 times
Been thanked: 52 times
Contact:

Re: HMG 2.5.5

Post by gfilatov » Wed Aug 13, 2008 7:50 am

Roberto Lopez wrote:
gfilatov wrote: Excuse me but a new Image ComboBox is not work at Win98 (a such control is not displayed). :(
The ComboBox control without an Image clause still works OK.
:roll:
Please try removing comment slashes '//' in the lines 195 and 196 of c_combo.c file.
Roberto,

Thanks for prompt reply!
The Imaged ComboBox works now at Win98 :)
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein

User avatar
Roberto Lopez
HMG Founder
Posts: 3899
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 135 times

Post by Roberto Lopez » Wed Aug 13, 2008 4:50 pm

gfilatov wrote:
Roberto Lopez wrote:
gfilatov wrote: Excuse me but a new Image ComboBox is not work at Win98 (a such control is not displayed). :(
The ComboBox control without an Image clause still works OK.
:roll:
Please try removing comment slashes '//' in the lines 195 and 196 of c_combo.c file.
Roberto,

Thanks for prompt reply!
The Imaged ComboBox works now at Win98 :)
Thanks!

I've forgot to uncomment that lines :)

I'll publish the fix in the next build.

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
gfilatov
Posts: 511
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 7 times
Been thanked: 52 times
Contact:

Post by gfilatov » Thu Aug 14, 2008 7:26 am

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:

Code: Select all

...
	If IsWinXPorLater()
...
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...
:oops:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein

User avatar
Roberto Lopez
HMG Founder
Posts: 3899
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 135 times

Post by Roberto Lopez » Thu Aug 14, 2008 11:56 am

gfilatov wrote:
There are a more library code's improvements:
<...>Just my two cents...
:oops:
Well... I've only took a brief look at your suggestions, but I'm afraid that you are right :)

When I'm 'fighting' against Windows API, usually I write some 'silly' code, beacuse I'm focused on make that **** 'thing' working right.

When that 'thing' finally works I do some 'clean and sweep', but sometimes I've forgot and sometimes I'm simply 'lazy' :)

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Roberto Lopez
HMG Founder
Posts: 3899
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 135 times

Post by Roberto Lopez » Thu Aug 14, 2008 12:43 pm

Roberto Lopez wrote:
gfilatov wrote:
There are a more library code's improvements:
<...>Just my two cents...
:oops:
Well... I've only took a brief look at your suggestions, but I'm afraid that you are right :)
Anyway... Had you heard about "It's working fine, don't touch it" :) ?

:) :) :)

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
gfilatov
Posts: 511
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 7 times
Been thanked: 52 times
Contact:

Post by gfilatov » Thu Aug 14, 2008 1:23 pm

Roberto Lopez wrote:Anyway... Had you heard about "It's working fine, don't touch it" :) ?
Roberto,

Yes, of course!

:P
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein

User avatar
Rathinagiri
Posts: 5161
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 127 times
Been thanked: 129 times
Contact:

Post by Rathinagiri » Sun Aug 17, 2008 4:06 am

It is nice to see two giants talking about simplified programming. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
Roberto Lopez
HMG Founder
Posts: 3899
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 135 times

Post by Roberto Lopez » Sun Aug 17, 2008 10:16 am

rathinagiri wrote:It is nice to see two giants talking about simplified programming. :)
My weight has augmented lately... It's winter here... and... you know... one tends to eat more... but 'giant' may be a little exaggerated :)

Regards,

Roberto.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)

User avatar
Rathinagiri
Posts: 5161
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 127 times
Been thanked: 129 times
Contact:

Post by Rathinagiri » Sun Aug 17, 2008 3:44 pm

:)

In that case, I would recall the giants philosophy. :)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

Post Reply