Cannot create dialog box...

Cannot create dialog box...

Postby DonDrew » Fri Aug 20, 2010 3:57 pm

Converting my first FW project to FWH.

My dialogs were originally created with Borland Workshop 4.5. I’ve converted them using both the Pelles C and Microsoft Visual Studio tools, first into an RES file which I linked directly to the EXE. When that didn’t work I created a DLL in the same manner I used with the original FW version of the program. No matter what tools or techniques I use, the dialog resources will not load, “cannot create dialog…” All other resources, bitmaps and string tables, seem to have converted just fine. Only dialog boxes are giving me trouble.

Below is the RC text of one of the non-loading dialogs.

DLG_REINDEX DIALOG LOADONCALL MOVEABLE DISCARDABLE 52, 75, 205, 129
STYLE DS_SYSMODAL | DS_MODALFRAME | WS_POPUP | WS_CAPTION
CLASS "BorDlg"
CAPTION "Reindex Data Files"
FONT 6, "MS Sans Serif"
{
CONTROL "", 101, "BorShade", 1 | WS_CHILD | WS_VISIBLE, 10, 5, 180, 47
CTEXT "Process...", 2051, 16, 40, 168, 8
CONTROL "Text", 2052, "STATIC", SS_WHITERECT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_GROUP, 16, 25, 168, 14
CTEXT "Data File", 2050, 17, 12, 164, 8
CONTROL "Remove Records Marked for Deletion", 102, "BorCheck", 3 | WS_CHILD | WS_VISIBLE, 35, 62, 135, 10
CONTROL "Go", 1, "BorBtn", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 58, 96, 37, 25
CONTROL "Cancel", 2, "BorBtn", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 110, 96, 37, 25
CONTROL "Resolve Orphan Claims", 103, "BorCheck", 3 | WS_CHILD | WS_VISIBLE, 35, 79, 95, 10
}

This is a dump from the run-time error log.
<=########################## START #################################=>
Application
===========
Path and name: E:\ABA\ABA_4\abawin.exe (32 bits)
Size: 1,363,968 bytes
Time from start: 0 hours 0 mins 19 secs
Error occurred at: 08/20/2010, 11:34:56
Error description: Error FiveWin/3 Cannot create Dialog Box:
Resource: DLG_Reindex

Stack Calls
===========
Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(0)
Called from: => TDIALOG:ACTIVATE(0)
Called from: ABAIndex.prg => REINDEX(32)
Called from: abawin.prg => (b)BUILDMENU(295)
Called from: => TMENU:COMMAND(0)
Called from: => TWINDOW:COMMAND(0)
Called from: => TMDIFRAME:COMMAND(0)
Called from: => TMDIFRAME:HANDLEEVENT(0)
Called from: .\source\classes\WINDOW.PRG => _FWH(0)
Called from: => WINRUN(0)
Called from: => TMDIFRAME:ACTIVATE(0)
Called from: abawin.prg => START(71)

System
======
CPU type: Intel(R) Pentium(R) 4 CPU 1.60GHz 1600 Mhz
Hardware memory: 1536 megs

Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %

Compiler version: Harbour Alpha build 46.2 Intl. (Flex)
Windows version: 5.1, Build 2600 Service Pack 3

Windows total applications running: 29
1 TF_FloatingLangBar_WndTitle
2 CiceroUIWndFrame
3
4 M
5 Default IME
6 ZoneAlarm Security Alert
7 ZoneAlarm Security Suite
8 AutoVPNAlertDlg
9 Accident Benefit Association (V100330-001)
10 MS-DOS Prompt
11 DDE Server Window
12 WOWExec
13 MCI command handling window
14 ISWHotKeyWindowClass_209b0000
15 Tukan
16 MMTrayNotificationWnd
17 AcrobatTrayIcon
18 MediaCenter
19 HPWU
20 Windows Defender
21 DMXLauncher
22 QTPlayer Tray Icon
23 Connections Tray
24 Power Meter
25 MS_WebcheckMonitor
26 NVSVCPMMWindowClass
27 GDI+ Window
28 Multi-Edit - [ABA.mak]
29 Program Manager

Variables in use
================
Procedure Type Value
==========================
CREATEDLGERROR
Param 1: O Class: TDIALOG
Local 1: C "DLG_Reindex"
Local 2: C " "
TDIALOG:ACTIVATE
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
Param 5: U
Param 6: L .T.
Param 7: U
Param 8: U
Param 9: U
Param 10: L .F.
Local 1: O Class: TDIALOG
Local 2: N 1769690
Local 3: U
Local 4: U
REINDEX
Local 1: O Class: TDIALOG
Local 2: N 0
(b)BUILDMENU
Param 1: O Class: TMENUITEM
TMENU:COMMAND
Param 1: N 20019
Local 1: O Class: TMENU
Local 2: O Class: TMENUITEM
TWINDOW:COMMAND
Param 1: N 20019
Param 2: N 0
Local 1: O Class: TMDIFRAME
Local 2: N 0
Local 3: N 20019
Local 4: N 0
TMDIFRAME:COMMAND
Param 1: N 20019
Param 2: N 0
Local 1: O Class: TMDIFRAME
Local 2: L .F.
TMDIFRAME:HANDLEEVENT
Param 1: N 273
Param 2: N 20019
Param 3: N 0
_FWH
Param 1: N 0
Param 2: N 273
Param 3: N 20019
Param 4: N 0
Param 5: N 1
Local 1: O Class: TMDIFRAME
WINRUN
Param 1: N 1769690
TMDIFRAME:ACTIVATE
Param 1: C "NORMAL"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: U
Param 8: B {|| ... }
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: B {|| ... }
Param 18: U
Param 19: U
Local 1: O Class: TMDIFRAME
Local 2: U
Local 3: U
START
Local 1: C "USER"
Local 2: C ""
Local 3: C ""
Local 4: C ""
Local 5: O Class: TBRUSH
Local 6: O Class: TICON
Local 7: C "BORLAND"

Linked RDDs
===========
DBF
DBFFPT
DBFBLOB
DBFCDX
DBFNTX

DataBases in use
================

Classes in use:
===============
1 HBCLASS
2 HBOBJECT
3 TWINDOW
4 TCONTROL
5 TICON
6 TBRUSH
7 TMDIFRAME
8 TMENU
9 TMENUITEM
10 TMDICLIENT
11 TFONT
12 TMSGBAR
13 TRECT
14 TMSGITEM
15 TTIMER
16 TDIALOG
17 TSAY
18 TGET
19 GET
20 TCLIPGET
21 TBUTTON
22 TCHECKBOX
23 TMETER
24 ERROR
25 TREG32

Memory Analysis
===============
309 Static variables

Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes
<=########################### End ##################################=>
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm

Re: Cannot create dialog box...

Postby Otto » Fri Aug 20, 2010 6:35 pm

Don, I see you use Borland controls.

BorCheck

Do you have

local hBorland := LoadLibrary( "BWCC32.dll" )
BWCCRegister(GetResources())
DLL32 FUNCTION BWCCRegister( hInst AS LONG ) AS WORD PASCAL LIB "BWCC32.DLL" ?

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6330
Joined: Fri Oct 07, 2005 7:07 pm

Re: Cannot create dialog box...

Postby DonDrew » Fri Aug 20, 2010 7:03 pm

Thank you, Otto.

I had only "local hBorland := LoadLibrary( "BWCC32.dll" )" . I've added the other 2 lines as you suggested, but my problem remains.

My BWCC32.dll is version 2.4.0.2 dated 3 April 2002. Does that seem to you to be the correct verson?
Don
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm

Re: Cannot create dialog box...

Postby hag » Fri Aug 20, 2010 7:18 pm

try creating RC files and linking those to the exe. Actually Borland will create the rc files which can be linked. I have many many rc file from borland and functioning well.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Re: Cannot create dialog box...

Postby James Bott » Fri Aug 20, 2010 9:48 pm

Don,

This is just a guess, but the Borland controls in the DLL are 16bit controls. It is possible (perhaps, probable) that you cannot use 16bit controls in a 32bit application.

I had so many problems with Borland controls that I dropped them all long before I even converted to 32bit.

I would make a backup of the DLL and remove all the borland controls from one of the dialogs and see if that solves the problem.

Also, did you convert your 16bit RC's to 32bit? If you don't know how to do this, just ask.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Cannot create dialog box...

Postby Richard Chidiak » Sat Aug 21, 2010 4:18 am

Don

I suggest you use rc files, this is the best reliable solution

I use Pelles c in replacement of Borland work shop and it is working quite well

I guess you certainely need to remove CLASS "BorDlg"

remove it from your rc file it is not needed , you can just edit it with notepad

HTH

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Cannot create dialog box...UPDATE!

Postby DonDrew » Sat Aug 21, 2010 2:44 pm

My problem has been solved!

Thanks to Otto's suggestion, and a little more study I was finally able to get my resources to work.

Thank you to everyone, especially Otto, for your advice.

Don
DonDrew
 
Posts: 63
Joined: Mon Aug 02, 2010 5:38 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests