FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Create Dialog Error
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Create Dialog Error
Posted: 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 (fw): Select all Collapse
#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 (fw): Select all Collapse
// Generated by ResEdit 1.5.4
// Copyright (C) 2006-2010
// <!-- m --><a class="postlink" href="http://www.resedit.net">http://www.resedit.net</a><!-- m -->

#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 (fw): Select all Collapse
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)
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Create Dialog Error
Posted: Tue Oct 05, 2010 02: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Create Dialog Error
Posted: Tue Oct 05, 2010 03: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
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Re: Create Dialog Error
Posted: Tue Oct 05, 2010 05: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)
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Create Dialog Error
Posted: Tue Oct 05, 2010 08: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
Posts: 117
Joined: Tue Jan 03, 2006 06:18 PM
Re: Create Dialog Error
Posted: Fri Oct 08, 2010 09:49 AM

Dear Jeff,

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

regards,

Kok

Continue the discussion