Board index » delphi » TPW1.5 and Resource Workshop

TPW1.5 and Resource Workshop

I've written a program in TPW1.5 which is linked with a .RES file
created with Resource Workshop. The .RES file includes a menu bar and
several dialog boxes.

When the program is run, there is a window with the menu bar at the top.
On the menu bar there are two options, Begin and Exit. When Begin is
clicked, a diolog box appears.

Unfortunately, this will only work if Resource Workshop is actually
running. If RW is not running, when I click begin I get a messagebox
saying "Error Code = -1. Continue?"

How can I stop this happening and get the program to work properly
without having to load RW first?

 

Re:TPW1.5 and Resource Workshop


Hi

Have you made sure that the menu id numbers are the same in RW as in your
program? I.e. you would declare Begin something like this:

const
  cm_Begin = 101;

Then you would declare a response method in your TWindows object for
cm_Begin:

type
  TMyWindow = object(TWindow)
  ...
  procedure CMBegin(var Msg : TMessage); virtual cm_First + cm_Begin;
  end;

You will want to make sure that cm_Begin is declared as 101 in both RW and
TPW. Whenever I get Error Code -1, it usually has to do with a mixup of
constants.

Hope this helps,

/HM
-----------
Flash Gordon skrev i meddelandet <34F2E48E.3A54E...@rocketship.com>...

Quote
>I've written a program in TPW1.5 which is linked with a .RES file
>created with Resource Workshop. The .RES file includes a menu bar and
>several dialog boxes.

>When the program is run, there is a window with the menu bar at the top.
>On the menu bar there are two options, Begin and Exit. When Begin is
>clicked, a diolog box appears.

>Unfortunately, this will only work if Resource Workshop is actually
>running. If RW is not running, when I click begin I get a messagebox
>saying "Error Code = -1. Continue?"

>How can I stop this happening and get the program to work properly
>without having to load RW first?

Re:TPW1.5 and Resource Workshop


In article <34F2E48E.3A54E...@rocketship.com>

Quote
Flash Gordon <flashgor...@rocketship.com> wrote:
> I've written a program in TPW1.5 which is linked with a .RES file
> created with Resource Workshop. The .RES file includes a menu bar and
> several dialog boxes.

> When the program is run, there is a window with the menu bar at the top.
> On the menu bar there are two options, Begin and Exit. When Begin is
> clicked, a diolog box appears.

> Unfortunately, this will only work if Resource Workshop is actually
> running. If RW is not running, when I click begin I get a messagebox
> saying "Error Code = -1. Continue?"

> How can I stop this happening and get the program to work properly
> without having to load RW first?

This looks like the age-old "BWCC" problem. Add "BWCC" to your
USES clause, and the problem will probably disappear.

Best regards, The Chief
--------
Dr. A{*word*73}la A. Olowofoyeku (The African Chief)
Email: la...@keele.ac.uk
Homepage: http://ourworld.compuserve.com/homepages/African_Chief/
Author of: Chief's Installer Pro 4.12 for Win16 and Win32:
ftp://ftp.simtel.net/pub/simtelnet/win3/install/chief412.zip            

Re:TPW1.5 and Resource Workshop


On Tue, 24 Feb 1998 15:17:34 +0000, Flash Gordon

Quote
<flashgor...@rocketship.com> wrote:
>I've written a program in TPW1.5 which is linked with a .RES file
>created with Resource Workshop. The .RES file includes a menu bar and
>several dialog boxes.

>When the program is run, there is a window with the menu bar at the top.
>On the menu bar there are two options, Begin and Exit. When Begin is
>clicked, a diolog box appears.

>Unfortunately, this will only work if Resource Workshop is actually
>running. If RW is not running, when I click begin I get a messagebox
>saying "Error Code = -1. Continue?"

>How can I stop this happening and get the program to work properly
>without having to load RW first?

Sounds like you're probably using Borland Custom Controls in your app,
you need to add "BWCC" to your uses clause.

Regards,

Stephen Posey
slpo...@concentric.net

Re:TPW1.5 and Resource Workshop


Quote
Flash Gordon <flashgor...@rocketship.com> wrote:

->I've written a program in TPW1.5 which is linked with a .RES file
->created with Resource Workshop. The .RES file includes a menu bar and
->several dialog boxes.
->
->When the program is run, there is a window with the menu bar at the top.
->On the menu bar there are two options, Begin and Exit. When Begin is
->clicked, a diolog box appears.
->
->Unfortunately, this will only work if Resource Workshop is actually
->running. If RW is not running, when I click begin I get a messagebox
->saying "Error Code = -1. Continue?"
->
->How can I stop this happening and get the program to work properly
->without having to load RW first?

Flashy..
Copy bwcc.dll to your Windows system directory.
(this happends automaticaly when you install TPW, not?)

Bjork.
(Remove _Nospam_ if you wanna...)

Other Threads