Combo Sample 5

Moderator: Rathinagiri

Post Reply
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Combo Sample 5

Post 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
Attachments
Problem in Combo Sample 5
Problem in Combo Sample 5
AppExcp.jpg (24.19 KiB) Viewed 8985 times
Viva INTERNATIONAL HMG :D
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Combo Sample 5

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Combo Sample 5

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: Combo Sample 5

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Combo Sample 5

Post 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
Viva INTERNATIONAL HMG :D
Post Reply