FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour LoadBitmap() & xBuilder
Posts: 437
Joined: Fri Oct 07, 2005 12:56 PM
LoadBitmap() & xBuilder
Posted: Wed Dec 14, 2005 08:50 AM

Hello !

I'm trying xBuilder and found one problem . I'm using Hernan's browse and in some browses I'm using bitmaps from resources . This function allways return 0 and I can't to see bitmaps in columns . Also I tried with bitmaps from disk and ReadBitmap() function - this works OK . Maybe you know where can be problem of LoadBitmap() function ? Can this be problem of xBuilder resource compiler ?

With best regards ! Rimantas .

Rimantas U.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
LoadBitmap() & xBuilder
Posted: Wed Dec 14, 2005 11:35 AM

Rimantas,

Have you tried the same code with Borland ?

Also, once the EXE is built, open it with the resources workshop and check that the bitmaps are there.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 437
Joined: Fri Oct 07, 2005 12:56 PM
LoadBitmap() & xBuilder
Posted: Wed Dec 14, 2005 12:24 PM
Antonio Linares wrote:Rimantas,

Have you tried the same code with Borland ?

Also, once the EXE is built, open it with the resources workshop and check that the bitmaps are there.


I alreday wrote that with Borland that works fine , so I can't understand this "check with RW that the bitmaps are there" :-)) . It works fine with Borland , and bitmaps exist in my recourse file . I also reviewed that and with PellesC recourse manager . It has only one difference from Borlands - can't understand the main icon with zero in the front : 0MyMainIcon . I did the changes , delete zero from the main icon ( then disseapers icons from mdichilds , but that isn't important ) , it can be viewed in Borlands, PellesC recourses managers .

Regards ! Rimantas .
Rimantas U.
Posts: 437
Joined: Fri Oct 07, 2005 12:56 PM
LoadBitmap() & xBuilder
Posted: Wed Dec 14, 2005 12:27 PM
Rimantas wrote:
Antonio Linares wrote:Rimantas,

Have you tried the same code with Borland ?

Also, once the EXE is built, open it with the resources workshop and check that the bitmaps are there.


I alreday wrote that with Borland that works fine , so I can't understand this "check with RW that the bitmaps are there" :-))


Excuse , I didn't wrote that in earlier , that with Borlands works fine . I want to correct this :-) .

Regards ! Rimantas .
Rimantas U.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
LoadBitmap() & xBuilder
Posted: Wed Dec 14, 2005 12:33 PM

Rimantas,

You may use FindResource() function to check that the resource is available and accesible at runtime.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 437
Joined: Fri Oct 07, 2005 12:56 PM
LoadBitmap() & xBuilder
Posted: Wed Dec 14, 2005 01:54 PM
Antonio Linares wrote:Rimantas,

You may use FindResource() function to check that the resource is available and accesible at runtime.



Thank Antonio , for advice ! I reviewed this function and have one question : FindResource( hResources, cResName, nResType ) . What to include into hResources ? 0 ?

Regards ! Rimantas .
Rimantas U.
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
LoadBitmap() & xBuilder
Posted: Wed Dec 14, 2005 01:55 PM

GetResources()

EMG

Posts: 437
Joined: Fri Oct 07, 2005 12:56 PM
LoadBitmap() & xBuilder
Posted: Wed Dec 14, 2005 05:03 PM
EnricoMaria wrote:GetResources()

EMG


Thanks , Enrico ! I tried the advice of Antonio , sorry , the results are bads - FindResource() return 0 .. :-)( . But ... PROBLEM SOLVED !!! :-)) Advice : DO NOT USE in resources files names with BEGINNING "R_" - R_MyBitmap1 . It come to my brains this idea , that it can be problem of names . I used 5 so named bitmaps and only they wasn't not visibles . So after renaming it all is working OK !

Anyway , thanks for help ! With best regards ! Rimantas .
Rimantas U.
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
LoadBitmap() & xBuilder
Posted: Wed Dec 14, 2005 05:12 PM

Good to know.

EMG

Continue the discussion