Create Dialog Error

Create Dialog Error

Postby Jeff Barnes » Mon Oct 04, 2010 11:28 pm

Hi,

I think I am starting to go crazy ... I am starting a new application and for whatever reason I cannot get my app to create a dialog.

I created a very simple test program and it too will not create the dialog.

Can someone please tell me what I'm missing here.

Test.prg
Code: Select all  Expand view

#include "Fivewin.ch"

Function Main()
   LOCAL hBorland := LoadLibrary( "BWCC32.dll" )
   LOCAL oDlg

   SET RESOURCES TO "\Test2\test.dll"
   BWCCRegister( GetResources() )

   DEFINE DIALOG oDlg RESOURCE "test"
   Activate Dialog oDlg
 
RETURN NIL

DLL32 FUNCTION BWCCRegister( hInst AS LONG ) AS WORD PASCAL LIB "BWCC32.DLL"        
 


The dll saved as an RC file:
Code: Select all  Expand view

// Generated by ResEdit 1.5.4
// Copyright (C) 2006-2010
// http://www.resedit.net

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




//
// Dialog resources
//
test DIALOG 0, 0, 186, 95
STYLE DS_3DLOOK | DS_CENTER | DS_MODALFRAME | DS_SHELLFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "Ms Shell Dlg"
{
}


The Error.log:
Code: Select all  Expand view

Application
===========
   Path and name: C:\test2\test.exe (32 bits)
   Size: 1,544,704 bytes
   Time from start: 0 hours 0 mins 0 secs
   Error occurred at: 10/04/10, 19:19:34
   Error description: Error FiveWin/3  Cannot create Dialog Box:
                      Resource: test

Stack Calls
===========
   Called from: .\source\classes\DIALOG.PRG => CREATEDLGERROR(559)
   Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(290)
   Called from: test.prg => MAIN(11)

System
======
   CPU type:                 Intel(R) Celeron(R) CPU 2.93GHz 2933 Mhz
   Hardware memory: 2048 megs

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

   Compiler version: xHarbour build 1.2.1 Intl. (SimpLex) (Rev. 6715)
   Windows version: 5.1, Build 2600 Service Pack 3

   Windows total applications running: 0

Variables in use
================
   Procedure     Type   Value
   ==========================
   CREATEDLGERROR
     Param   1:    O    Class: TDIALOG
     Local   1:    C    "test"
     Local   2:    C    "                      "
   TDIALOG:ACTIVATE
     Param   1:    U    
     Param   2:    U    
     Param   3:    U    
     Param   4:    L    .F.
     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    0
     Local   3:    U    
     Local   4:    U    
   MAIN
     Local   1:    N    24903680
     Local   2:    O    Class: TDIALOG

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

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

Classes in use:
===============
     1 ERROR
     2 HASHENTRY
     3 HBCLASS
     4 HBOBJECT
     5 TWINDOW
     6 TDIALOG
     7 TBRUSH
     8 TREG32

Memory Analysis
===============
      114 Static variables

   Dynamic memory consume:
      Actual  Value:          0 bytes
      Highest Value:          0 bytes
 


FWH 10.9
BCC582
xHarb 1.2.1 (rev 6717)
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Create Dialog Error

Postby James Bott » Tue Oct 05, 2010 2:24 pm

Jeff,

First I would eliminate the Borland library. This will tell you if that is the source of the problem--it is not needed to display the dialog.

Then I would generate a resource file using Borland and compare it to the one you have created using ResEdit, looking for differences.

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

Re: Create Dialog Error

Postby Antonio Linares » Tue Oct 05, 2010 3:51 pm

Jeff,

Besides James recomendations, please check that the DLL file is there:

MsgInfo( File( "\Test2\test.dll" ) )
SET RESOURCES TO "\Test2\test.dll"
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42082
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Create Dialog Error

Postby Jeff Barnes » Tue Oct 05, 2010 5:53 pm

If I create the dll in Resource Workshop it works as expected.

Too bad ... I kinda liked ResEdit.

Are there any other Resource Editor programs out there that will work?
Thanks,
Jeff Barnes

(FWH 16.11, xHarbour 1.2.3, Bcc730)
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Re: Create Dialog Error

Postby Enrico Maria Giordano » Tue Oct 05, 2010 8:02 pm

Jeff Barnes wrote:If I create the dll in Resource Workshop it works as expected.

Too bad ... I kinda liked ResEdit.


You can use it. Try to remove DS_SHELLFONT. It works here without it.

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

Re: Create Dialog Error

Postby kok joek hoa » Fri Oct 08, 2010 9:49 am

Dear Jeff,

please check "test.res" ,you need this file to link into your exe file.

regards,

Kok
kok joek hoa
 
Posts: 117
Joined: Tue Jan 03, 2006 6:18 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Enrico Maria Giordano, Google [Bot] and 97 guests