HMG 2.5.5

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

Moderator: Rathinagiri

User avatar
gfilatov
Posts: 1057
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: HMG 2.5.5

Post by gfilatov »

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: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.5.5

Post by Roberto Lopez »

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: 1057
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: HMG 2.5.5

Post by gfilatov »

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: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.5.5

Post by Roberto Lopez »

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: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.5.5

Post by Roberto Lopez »

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: 1057
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: HMG 2.5.5

Post by gfilatov »

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: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 2.5.5

Post by Rathinagiri »

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: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HMG 2.5.5

Post by Roberto Lopez »

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: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 2.5.5

Post by Rathinagiri »

:)

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