Page 1 of 1

Using Resource Files with Microsoft resource compiler?

Posted: Mon Aug 01, 2016 4:39 pm
by Perry Nichols
I am successfully building FWH64 1605 with Borland. I wish to make a Microsoft exe with the same Fivewin version.
I am attempting to use resource *.RC files from my Borland build with the Microsoft resource compiler to create the *.res to link into my exe.
Receiving the following errors:

error RC2135 : file not found: BITMAP

error RC2135 : file not found: CURSOR

error RC2135 : file not found: 02

Any ideas on how I can use the *.rc files with the Microsoft (rc) resource complier?

Re: Using Resource Files with Microsoft resource compiler?

Posted: Mon Aug 01, 2016 5:34 pm
by TimStone
I have my .rc file working just fine with Microsoft Community 2015. I do not use Borland, or it's resource compiler.

When I did move several years ago, there were some controls in the .rc that were specific to Borland. You will need to identify those and change them.

You may need the following at the top of your .rc file:

Code: Select all

 #include <windows.h>
 #include <commctrl.h>
 #include <richedit.h>

#ifndef WC_TABCONTROL
   #define WC_TABCONTROL "SysTabControl32"
#endif
#ifndef WC_XBROWSE
   #define WC_XBROWSE "TxBrowse"
#endif
 
Icons, bitmaps, etc. are linked in with this format:

Code: Select all

APPT                    BITMAP                  "HRCALNDR.bmp"
CALC                    BITMAP                  "smcalc.bmp"
CHECK                   BITMAP                  "CHECK.bmp"
CLIENT                  BITMAP                  "CLIENT.bmp"
And here is a simple dialog:

Code: Select all

CHKSTB DIALOG 0, 0, 460, 185
STYLE  WS_POPUP | WS_CAPTION
CAPTION "Check Stub Text"
{
    EDITTEXT        302,10,25,440,100,ES_MULTILINE | ES_WANTRETURN | WS_VSCROLL
    PUSHBUTTON      "",300,185,135,40,40
    PUSHBUTTON      "",301,250,135,40,40
    LTEXT           "Enter, or edit, the information to be printed on the check stub:",-1,10,10,300,13
}
 
I believe Borland will use the same format successfully. The main thing is to be sure and remove any Borland specific controls.

Tim

Re: Using Resource Files with Microsoft resource compiler?

Posted: Mon Aug 01, 2016 7:15 pm
by Perry Nichols
Thanks Tim,
You mentioned borland resources - how do you identify borland specific resources?
Since the borland resource workshop is obsolete,
What tool do you use to edit the resources?
I have the Microsoft Community 2015, and have not been able to figure out how to edit the resources *.rc files?

Re: Using Resource Files with Microsoft resource compiler?

Posted: Mon Aug 01, 2016 7:30 pm
by TimStone
I did this over many years in steps. I moved to the xHarbur( .com ) product and tried the Pelles resource program. However, eventually, to keep everything aligned exactly, I just use my regular code editor and do it manually. With the resource tools alignment could be off a few pixels. With a standard coding editor ( Ultra Edit ), you can just make sure all your heights, starting and ending points, and widths are exactly the same. It may seem more difficult, but over the years I've gotten so fast with it that it's easy.

Here is an example of a Borland control:

CONTROL "", -1, "BorShade", BSS_HDIP | BSS_LEFT | WS_CHILD | WS_VISIBLE, 48, 54, 344, 2

Note the BSS_ items. You have to look for controls using values not affiliated with a Microsoft control value.

Re: Using Resource Files with Microsoft resource compiler?

Posted: Mon Aug 01, 2016 7:57 pm
by Enrico Maria Giordano
Perry Nichols wrote:how do you identify borland specific resources?
Search for the string "bor" inside your RC files.

EMG