FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Uwe we need your help :-)
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Uwe we need your help :-)
Posted: Mon Jan 05, 2015 05:01 AM
Dear Mr.Rao,

Your example is working fine. ie it is showing alphabmp's on a Button, unfortunately the same AlphaBMP available in the exe is not displayed on a BITMAP control.
The problem is only when I use Borland Resource compiler. It is working fine with PellesC Resource compiler.

I made a very minor modification in the sample prg which you already posted.
Code (fw): Select all Collapse
// I Included an action for the first button in the ButtonBar
DEFINE BUTTON OF oBar RESOURCE "EXPLORER" PROMPT "Explorer AlphaBmp" GROUP ACTION Test()

//-----------------------//
Function Test()
    Local oDlg,oBmp
    
    DEFINE DIALOG oDlg FROM 10,20 to 27,70 TITLE "Login"
    
        // Here I have used the same Resource AplhaBmp 'Explorer', unfortunately the image is not displayed
        @ 1.5, 7.5 BITMAP oBmp RESOURCE "EXPLORER" NOBORDER OF oDlg
        
    ACTIVATE DIALOG oDlg CENTERED
Return NIL


If I use PellesC Resource Compiler, then in the RC file Instead of
Code (fw): Select all Collapse
#define ALPHABMP 10
EXPLORER    ALPHABMP "\fwh\bitmaps\alphabmp\explorer.bmp"


I will have to use the following line.
Code (fw): Select all Collapse
EXPLORER    BITMAP "/fwh/bitmaps/alphabmp/explorer.bmp"


With the above said changes in the .RC file, PellesC displays the AlphaBMP's perfectly on the Button as well as the Bitmap control.
Borland Resource compiler displays the BMP only on the Button and not on the Bitmap control

Can you please test it at your end.

Regards
Anser
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Uwe we need your help :-)
Posted: Mon Jan 05, 2015 05:29 AM

Dear Mr Anser

I know this. This is because of the extended logic used in btnbmp.prg to read image data from resources, which is not extended to other controls. In the next release, we shall adopt uniform logic for all controls.

In any case we may continue to use Pelles C. There is no problem for those who use Microsoft compiler.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: Uwe we need your help :-)
Posted: Mon Jan 05, 2015 05:32 AM

Dear Rao,

Thank you. :)

Regards
Anser

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: Uwe we need your help :-)
Posted: Mon Jan 05, 2015 02:11 PM
To All

Interesting thread .... what is the conclusion we feel is the best answer answer ?. I too ( mostly ) use alpha bitmaps for BtnBmp's. I have an exclusive .rc for all my bitmaps ..

1) Continue using Borland inserting this code into my .Rc ?
Code (fw): Select all Collapse
Icons.rc

#define ALPHABMP 10

EXPLORER    ALPHABMP "c:\fwh\bitmaps\alphabmp\explorer.bmp"


or

2) Download Pelles C ? .. I use a modified rc2dll32.bat file, what changes need to be made to take the .rc to .res with Pelles C ?

Thanks
Rick Lipkin

Continue the discussion