Using Resource Files with Microsoft resource compiler?

Using Resource Files with Microsoft resource compiler?

Postby Perry Nichols » Mon Aug 01, 2016 4:39 pm

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?
Perry Nichols
 
Posts: 17
Joined: Thu Feb 28, 2008 6:56 pm

Re: Using Resource Files with Microsoft resource compiler?

Postby TimStone » Mon Aug 01, 2016 5:34 pm

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  Expand view

 #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  Expand view
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  Expand view

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
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2905
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Using Resource Files with Microsoft resource compiler?

Postby Perry Nichols » Mon Aug 01, 2016 7:15 pm

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?
Perry Nichols
 
Posts: 17
Joined: Thu Feb 28, 2008 6:56 pm

Re: Using Resource Files with Microsoft resource compiler?

Postby TimStone » Mon Aug 01, 2016 7:30 pm

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.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2905
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Using Resource Files with Microsoft resource compiler?

Postby Enrico Maria Giordano » Mon Aug 01, 2016 7:57 pm

Perry Nichols wrote:how do you identify borland specific resources?


Search for the string "bor" inside your RC files.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8356
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 30 guests