Page 1 of 1

Combo Sample 5

Posted: Mon Apr 27, 2009 1:20 pm
by esgici
Hi

We have a problem on C:\hmg\SAMPLES\COMBO_5\test1.prg :(

When choosing "Get Item" from menu it has been crashed and caused too crashing of drwatson32.exe of Windows :?

Win XP SP2; HMG 2.8.8.

Regards

--

Esgici

Re: Combo Sample 5

Posted: Mon Apr 27, 2009 2:06 pm
by Roberto Lopez
esgici wrote:Hi

We have a problem on C:\hmg\SAMPLES\COMBO_5\test1.prg :(

When choosing "Get Item" from menu it has been crashed and caused too crashing of drwatson32.exe of Windows :?

Win XP SP2; HMG 2.8.8.

Regards

--

Esgici
I've verified.

Thanks for the report.

Regards,

Roberto.

Re: Combo Sample 5

Posted: Mon Apr 27, 2009 9:12 pm
by Roberto Lopez
esgici wrote:Hi

We have a problem on C:\hmg\SAMPLES\COMBO_5\test1.prg :(
I've found a very interesting thing.

The image combo was introduced in 2.5.5 and item property read worked ONLY in that version.

From 2.5.6 to now it generates a GPF.

The 2.5.5 is bundled with Harbour 1.0 RC2.

The 2.5.6 is bundled with Harbour 1.0 Final (newer versions with 1.01).

If you install any newer HMG version and replaces Harbour compiler with 1.0 RC2 it will work fine (yet 2.8.8).

So, I must find another way to do the same (read image combo item) without 'obfuscate' Harbour (it will not be easy).

Regards,

Roberto.

Re: Combo Sample 5

Posted: Tue Apr 28, 2009 12:38 am
by Roberto Lopez
esgici wrote:Hi

We have a problem on C:\hmg\SAMPLES\COMBO_5\test1.prg :(

When choosing "Get Item" from menu it has been crashed and caused too crashing of drwatson32.exe of Windows :?

Win XP SP2; HMG 2.8.8.

Regards

--

Esgici
I've fixed.

Please, replace the function 'ImageComboGetItem' in 'c_combo.c' with this:

Code: Select all

HB_FUNC( IMAGECOMBOGETITEM )
{

	char text [1024] ;

	COMBOBOXEXITEM cbei;

	cbei.mask = CBEIF_TEXT | CBEIF_SELECTEDIMAGE | CBEIF_IMAGE;

        cbei.iItem          = hb_parni(2)-1;
        cbei.pszText        = text;
        cbei.cchTextMax     = 255;
	cbei.iImage         = 0;
	cbei.iSelectedImage = 0;

	SendMessage( (HWND) hb_parnl(1) , CBEM_GETITEM , 0 , &cbei ) ;

	hb_reta (2) ;
	hb_storni ( cbei.iImage , -1 , 1 ) ;
	hb_storc ( cbei.pszText  , -1 , 2 ) ; 

}
Regards,

Roberto.

Re: Combo Sample 5

Posted: Tue Apr 28, 2009 10:33 am
by esgici
Hi

Applied and tested.

After replacing Harbour 1.0.0 with 1.0 RC2 under HMG 2.8.8 worked fine :)

After rollbacked Harbour and replacing IMAGECOMBOGETITEM function in 'c_combo.c' also worked fine :D

Thanks a lot Le Roy :D

I want to kiss your hands :!:

Best Regards

--

Esgici