Combo Sample 5

Moderator: Rathinagiri

Post Reply
User avatar
esgici
Posts: 4345
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 232 times
Been thanked: 80 times
Contact:

Combo Sample 5

Post by esgici » Mon Apr 27, 2009 1:20 pm

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
AppExcp.jpg
Problem in Combo Sample 5
AppExcp.jpg (24.19 KiB) Viewed 1400 times
Viva INTERNATIONAL HMG :D

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

Post by Roberto Lopez » Mon Apr 27, 2009 2:06 pm

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: 3900
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 136 times

Post by Roberto Lopez » Mon Apr 27, 2009 9:12 pm

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: 3900
Joined: Wed Jul 30, 2008 6:43 pm
Has thanked: 13 times
Been thanked: 136 times

Post by Roberto Lopez » Tue Apr 28, 2009 12:38 am

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: 4345
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Has thanked: 232 times
Been thanked: 80 times
Contact:

Post by esgici » Tue Apr 28, 2009 10:33 am

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