FiveWin and .Dll 
Author Message
 FiveWin and .Dll

Does anyone know why this snippet does not work?

FUNCTION Main()

local oDlg, oBmp
SET 3D LOOK ON
SET RESOURCES TO "Abcd.Dll"
DEFINE DIALOG oDlg RESOURCE "ANNOUNCE"   <<<<<< PROBLEM STRIKES

I am using Cl5.2E, Blinker 3.2, FiveWin 1.9, and Borland Resource
Workshop 1.02.  ABCD.DLL is in the same directory as the executable.

If I try to run it as soon as I enter Windows, I get the FiveWin Error
Message -Cannot create dialog box-.  HOWEVER, if I run the Resource
Workshop, open the DLL, do nothing other than close the Resource
Workshop, THEN the program works fine.

It appears the I have to give the ABCD.DLL a -wake-up call-.  But none
of the samples do that.  Any suggestions?
--
Pete Clark



Mon, 20 Jul 1998 03:00:00 GMT  
 FiveWin and .Dll

says...

Quote:

>SET 3D LOOK ON
>SET RESOURCES TO "Abcd.Dll"
>DEFINE DIALOG oDlg RESOURCE "ANNOUNCE"   <<<<<< PROBLEM STRIKES

Make sure that you LoadLib() BWCC.dll (See hst.prg for a sample). The reason
that your app works while RW is loaded is that IT loads BWCC itself.  INIT
PROC/EXIT PROCs are usefull for loading/unloading DLLs

HTH
CW/Hummingbird Systems



Mon, 20 Jul 1998 03:00:00 GMT  
 FiveWin and .Dll

Let's assume, that FiveWin supports WS 1.02, and assume that
ANNOUNCE is not some sort of reserved word; then the obvious question is

Do you have a dialog resource named ANNOUNCE in the DLL, because
by default when you create a dialog, Borland names it Dialog_1, so
you have to use RESOURCE...Rename to change it, or edit resouce as
text and change it;

The third and perhaps less than obvious reason is that you are
using a Borland-Style control, in which case you will need to
create a local variable hBorland

and

hBorland:=LoadLibrary("BWCC.DLL") to refer to Borland-specific
functions

I tried to stay away from Borland controls at early stages of development,
because often if the program crashed, the library resources were not released
which would either force cold boot or cause other headaches

stan littlefield
BTI

Quote:
> Does anyone know why this snippet does not work?

> FUNCTION Main()

> local oDlg, oBmp
> SET 3D LOOK ON
> SET RESOURCES TO "Abcd.Dll"
> DEFINE DIALOG oDlg RESOURCE "ANNOUNCE"   <<<<<< PROBLEM STRIKES

> I am using Cl5.2E, Blinker 3.2, FiveWin 1.9, and Borland Resource
> Workshop 1.02.  ABCD.DLL is in the same directory as the executable.

> If I try to run it as soon as I enter Windows, I get the FiveWin Error
> Message -Cannot create dialog box-.  HOWEVER, if I run the Resource
> Workshop, open the DLL, do nothing other than close the Resource
> Workshop, THEN the program works fine.

> It appears the I have to give the ABCD.DLL a -wake-up call-.  But none
> of the samples do that.  Any suggestions?
> --
> Pete Clark



Mon, 20 Jul 1998 03:00:00 GMT  
 FiveWin and .Dll

Quote:

>says...

>>SET 3D LOOK ON
>>SET RESOURCES TO "Abcd.Dll"
>>DEFINE DIALOG oDlg RESOURCE "ANNOUNCE"   <<<<<< PROBLEM STRIKES

>Make sure that you LoadLib() BWCC.dll (See hst.prg for a sample). The reason
>that your app works while RW is loaded is that IT loads BWCC itself.  INIT
>PROC/EXIT PROCs are usefull for loading/unloading DLLs

>HTH
>CW/Hummingbird Systems

Oh, wow - I want to have your e-Babies!

I have never quite understood where Borland fit into the Clipper/FiveWin
scheme of things, but you are correct.

hBorland := LoadLibrary( "BWCC.DLL" )   // Load Borlands Custom Control
DLL

SET RESOURCES TO "ABCD.Dll"
SET 3DLOOK ON

DEFINE DIALOG oDlg RESOURCE "ANNOUNCE"
ACTIVATE DIALOG oDlg CENTERED NOWAIT ON CLICK oDlg:End() ;
        ON INIT ( WndCenter( oDlg:hWnd ), LogoTimer( oDlg, 10 ) )

UpdateWindow( oDlg:hWnd )

...and we have a nice sign-on Logo type scheme, ala MS Word, etc...

--
Pete Clark



Mon, 20 Jul 1998 03:00:00 GMT  
 FiveWin and .Dll


Quote:

>Let's assume, that FiveWin supports WS 1.02, and assume that
>ANNOUNCE is not some sort of reserved word; then the obvious question is

Yes, and No, ...

Quote:
>Do you have a dialog resource named ANNOUNCE in the DLL, because
>by default when you create a dialog, Borland names it Dialog_1, so
>you have to use RESOURCE...Rename to change it, or edit resouce as
>text and change it;
Yes...

>The third and perhaps less than obvious reason is that you are
>using a Borland-Style control, in which case you will need to
>create a local variable hBorland

YES!!
Quote:

>and

>hBorland:=LoadLibrary("BWCC.DLL") to refer to Borland-specific
>functions

YES!! YES!! YES!!

Sorry, am I getting too e{*filter*}d?

Quote:

>I tried to stay away from Borland controls at early stages of development,
>because often if the program crashed, the library resources were not released
>which would either force cold boot or cause other headaches

I had noticed that, but I havent been able to grasp what a Borland
control is.  Are you refering to all output from Borlands Resource
Workshop, or just some part of it?  If so, which part?

I think that I eased the problem of lock ups by REMing out SET 3D if I
thought the latest (test) version might be unstable.  But I thought that
was Mircosofts, not Borlands

Its a hairy area, but certainly makes Clipper look cute.  The end-users
seem to appreciate all the sweat.

--
Pete Clark



Tue, 21 Jul 1998 03:00:00 GMT  
 FiveWin and .Dll

Quote:

>Does anyone know why this snippet does not work?

>FUNCTION Main()

>local oDlg, oBmp
>SET 3D LOOK ON
>SET RESOURCES TO "Abcd.Dll"
>DEFINE DIALOG oDlg RESOURCE "ANNOUNCE"   <<<<<< PROBLEM STRIKES

Also, make sure you change the name of "ANNOUNCE". It's a reserved word in some
language or library (I don't remember which), but there's no sense in tempting
fate.

Terry



Thu, 23 Jul 1998 03:00:00 GMT  
 FiveWin and .Dll

Quote:

>Does anyone know why this snippet does not work?

>FUNCTION Main()

>local oDlg, oBmp
>SET 3D LOOK ON
>SET RESOURCES TO "Abcd.Dll"
>DEFINE DIALOG oDlg RESOURCE "ANNOUNCE"   <<<<<< PROBLEM STRIKES

>I am using Cl5.2E, Blinker 3.2, FiveWin 1.9, and Borland Resource
>Workshop 1.02.  ABCD.DLL is in the same directory as the executable.

>If I try to run it as soon as I enter Windows, I get the FiveWin Error
>Message -Cannot create dialog box-.  HOWEVER, if I run the Resource
>Workshop, open the DLL, do nothing other than close the Resource
>Workshop, THEN the program works fine.

>It appears the I have to give the ABCD.DLL a -wake-up call-.  But none
>of the samples do that.  Any suggestions?

If you used any Borland Custom Controls in your dialog, then you need to load
BWCC.DLL, which the Borland Resource Workshop does for you.

I don't see in your code where you're loading it, but if you are and it still
doesn't work, check the return code from LoadLibrary() to make sure the load
actually worked.

Terry



Thu, 23 Jul 1998 03:00:00 GMT  
 FiveWin and .Dll


Quote:

>>Does anyone know why this snippet does not work?

>>FUNCTION Main()

>>local oDlg, oBmp
>>SET 3D LOOK ON
>>SET RESOURCES TO "Abcd.Dll"
>>DEFINE DIALOG oDlg RESOURCE "ANNOUNCE"   <<<<<< PROBLEM STRIKES

>Also, make sure you change the name of "ANNOUNCE". It's a reserved word in some
>language or library (I don't remember which), but there's no sense in tempting
>fate.

>Terry

I think that you will find that the ANNOUNCE is a reserved word, but
"ANNOUNCE" is not.  However, it probably isnt the best choice, consider
it changed.
--
Pete Clark


Fri, 24 Jul 1998 03:00:00 GMT  
 FiveWin and .Dll

<snip>

Quote:
>I had noticed that, but I havent been able to grasp what a Borland
>control is.  Are you refering to all output from Borlands Resource
>Workshop, or just some part of it?  If so, which part?

<snip>

Pete:  When you create a control in the Borland Resource Workshop, you
can create (by default) two different types of controls.  A Standard
Windows Control or a Borland Styl;e Control.

Untill you get comfortable with the BRW, it can be hard to the tell
the difference between the vaious toolbar buttons, but there is always
one way for sure to tell.

Wen you double click on a control and the properties dialog pops up,
if it is a BORLAND CUSTOM CONTROL, it will SAY _BORLAND_ in it.
Example, Borland Style Button  or you may see a BOR <something> listed
in the CLASS edit field if there is one.

If any one or more controls in your dialog are Borland Style Controls,
then you MUST load Bwcc.dll

:=JHS
FiveWin - Clipper for Windows
**************************************************************************
          John H. Stolte, Sr. - Omicron Software Publishing Corp.
     **** Publisher of FiveWin - FiveDB and FiveDLL for Clipper! ****
14 High Street  P.O. Box 87, Cartersville {*filter*}ia 23027 USA
[Voice] (804) 375-9703 - [Fax] (804) 375-9733 - [BBS] (804) 375-9639

WWW: http://www.*-*-*.com/ ;FTP: ftp.wji.com (change dir to /Omicron)
**************************************************************************



Sun, 26 Jul 1998 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Fivewin and .dll (again)

2. CTL3D.DLL, CTL3D32.DLL, CTL3DV2.DLL and Clipper/Fivewin/R&R

3. FiveWin: can't switch from DLL to DLL

4. FiveWin+AXS problem, nwipxspx.dll wanted

5. Fivewin/Clipper/C and DLLs

6. Using .DLL with FiveWin

7. EZTWAIN.DLL and EZTW32.DLL

8. Clarion DLL Wrapper for C DLL

9. declaring DLL variables WININET.DLL

10. DLLs - Newbie on a DLL Downer !!

11. C5EE (Clarion Chain DLL) w/ C5EE (ABC Chain DLL)

 

 
Powered by phpBB® Forum Software