Page 1 of 1

How can I convert Borland buttons in rc-files to ButtonBMP

Posted: Mon Dec 10, 2007 12:52 pm
by Otto
CONTROL "Schalter", 1, "BorBtn", 1 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 125, 82, 32, 20


How can I convert Borland buttons in rc-files to ButtonBMP equivalent to if it would have been designed from source like for example:

@ 100, 200 BUTTONBMP oBtnBmp OF oDlg ACTION msginfo(1) ;
BITMAP ".\bitmaps\garrow.bmp" PROMPT "Test" TEXTRIGHT SIZE 80, 25 PIXEL;
MESSAGE "From source code"

Posted: Mon Dec 10, 2007 1:17 pm
by Antonio Linares
Otto,

Save the related bitmap as an external BMP file and then replace "BorBtn" with "Button" in the resource file

Posted: Mon Dec 10, 2007 2:12 pm
by Otto
Thank you Antonio,
what I don’t know is how tell the control which bitmap to use.

CONTROL "Schalter", 1, "Button", 1 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 125, 82, 32, 20

Regards,
Otto

Posted: Mon Dec 10, 2007 2:52 pm
by Antonio Linares
Otto,

> how tell the control which bitmap to use

You specify it from the PRG, not from the RC

Please review samples\TestBuBm.prg

Posted: Mon Dec 10, 2007 3:34 pm
by Otto
Thank you.
If you have some extratime have a look at: www.fwcodesnips.com