FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Error "Cannot create dialog box" after migrating t
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Error "Cannot create dialog box" after migrating t
Posted: Mon Feb 12, 2007 11:03 AM

Hello,

I am migrating my FW-Clipper applications to xHarbour.

I was able to replace all the necessary functions. I also compiled my RC-files by using the Borland BRC32-compiler.

I changed "BWCC.DLL" into "BWCC32.DLL" in LoadLibrary(). But what about CTL3D.DLL ? I put CTLD3D32.DLL into the map.

For compiling and linking my application I use the xBuilder. If I understand well, I don't need to add all the xHarbour LIB-files since they are added automatically.

So far so good.

When I start my FW-xHarbour application, I normally show a little dialog box while the necessary files are loaded.

And that's where my problem occurs : "Error FiveWin/3 Cannot create dialog box".

What did I change in my RC-files ? (Antonio told me so)

  1. I replaced "TFolder" with "SysTabControl32"
  2. I added these lines to my RC-files :

ifdef FLAT

1 24 "WindowsXP.Manifest"

endif

I put "WindowxXP.Manifest" in the map with my RC-files.

Is that all that needs to be done to the RC-files ?

Why does this error occurs ?

Thank you very much in advance for any help.

Michel Driessen
Genk (Belgium)
M&A Consult bvba

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Error "Cannot create dialog box" after migrating t
Posted: Mon Feb 12, 2007 11:50 AM
Michel,

CTL3D.DLL is no longer needed in 32 bits.

Please search "bor" instead your RC file. You may be using a Borland control in your resources, if so then you need to add these lines to your application:
   ... 
   local hBorland := LoadLibrary( "BWCC32.DLL" ) 
    
   BWCCRegister( GetResources() ) 

   ... (your application code) 

   FreeLibrary( hBorland ) 

return nil 

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

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Error "Cannot create dialog box" after migrating t
Posted: Mon Feb 12, 2007 01:58 PM

Antonio,

Thanks for you answer.

My application starts up now. My first dialog box appears as it should be and then the buttonbar is shown.

But if I select one of the buttons, or I make a choice in one of the menus, I still got the error : "Error FiveWin/3 Cannot create dialog box Resource K_INDEX".

I have a total of 6 res-files in my application. That is no problem, is it ?

Does the fact that I use "LISTBOX" having to do something with it ?

Thanks.

Michel

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Error "Cannot create dialog box" after migrating t
Posted: Mon Feb 12, 2007 02:02 PM

Michel,

Please copy the RC portion for K_INDEX dialog here, thanks

There should be no problem for using several RES files. The listbox is not a problem

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Error "Cannot create dialog box" after migrating t
Posted: Mon Feb 12, 2007 02:38 PM
Antonio,

Here is K_INDEX.

K_INDEX DIALOG 112, 59, 170, 208
STYLE WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
CLASS "BorDlg_Gray"
CAPTION "Bestanden voor reorganisatie selecteren"
FONT 8, "MS Sans Serif"
{
CHECKBOX "Algemene bestanden", 101, 33, 26, 120, 12, BS_AUTOCHECKBOX | NOT WS_TABSTOP
CHECKBOX "Basisgegevens partijen", 102, 33, 38, 120, 12, BS_AUTOCHECKBOX | NOT WS_TABSTOP
CHECKBOX "Basisgegevens betrokkenen", 103, 33, 50, 120, 12, BS_AUTOCHECKBOX | NOT WS_TABSTOP
CHECKBOX "Basisgegevens rechtbanken", 104, 33, 62, 120, 12, BS_AUTOCHECKBOX | NOT WS_TABSTOP
CHECKBOX "Dossiergegevens", 105, 33, 74, 120, 12, BS_AUTOCHECKBOX | NOT WS_TABSTOP
CHECKBOX "Agenda", 106, 33, 86, 120, 12, BS_AUTOCHECKBOX | NOT WS_TABSTOP
CHECKBOX "Prestaties", 107, 33, 98, 120, 12, BS_AUTOCHECKBOX | NOT WS_TABSTOP
CHECKBOX "Tekstverwerking", 108, 33, 110, 120, 12, BS_AUTOCHECKBOX | NOT WS_TABSTOP
CHECKBOX "Boekhouding", 109, 33, 122, 120, 12, BS_AUTOCHECKBOX | NOT WS_TABSTOP
CHECKBOX "Alle bestanden", 110, 33, 150, 120, 12, BS_AUTOCHECKBOX | NOT WS_TABSTOP
CONTROL "", -1, "BorShade", 2 | WS_CHILD | WS_VISIBLE, -7, 175, 185, 3
DEFPUSHBUTTON "&Reorganisatie starten", 901, 17, 185, 80, 14
PUSHBUTTON "&Onderbreken", 902, 103, 185, 50, 14
CTEXT "Kies de bestanden welke U wilt reorganiseren", -1, 2, 7, 166, 8
CONTROL "", -1, "BorShade", 32769 | WS_CHILD | WS_VISIBLE, 14, 20, 141, 120
CONTROL "", -1, "BorShade", 32769 | WS_CHILD | WS_VISIBLE, 14, 144, 142, 24
}


Thanks.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 142
Joined: Sun Oct 09, 2005 10:59 AM
Error "Cannot create dialog box" after migrating t
Posted: Mon Feb 12, 2007 04:45 PM

Michel ,

Try to avoid borland controls , so as 'BORSHADE'

Frank

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Error "Cannot create dialog box" after migrating t
Posted: Mon Feb 12, 2007 07:14 PM
Michel,

Please use these lines and check the shown value:
   ... 
   local hBorland := LoadLibrary( "BWCC32.DLL" ) 
    
   MsgInfo( hBorland )

   BWCCRegister( GetResources() ) 

   ... (your application code) 

   FreeLibrary( hBorland ) 

return nil 

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

Please let us know what value MsgInfo() shows
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Error "Cannot create dialog box" after migrating t
Posted: Mon Feb 12, 2007 11:34 PM

Antonio,

The value, shown by MsgInfo(hBorland), is 13762560.

Michel

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Error "Cannot create dialog box" after migrating t
Posted: Mon Feb 12, 2007 11:53 PM

Michel,

That means that BWCC32.DLL is properly loaded.

Do you still get the error using the above code ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Error "Cannot create dialog box" after migrating t
Posted: Tue Feb 13, 2007 04:19 PM

Antonio,

I have found the reason for my problem.

I have 6 RC-files, which I compiled to RES-files by using BRC32.EXE.

By using these RES-files, I got the error "Cannot create dialog box".

I copied my RC-files to one big RC-file and compiled it using BRC32.EXE, which resulted in one RES-file.

I builded my application with this RES-file, and guess what : no error anymore.

So, it looks to me that using more than one RC-file is a problem.

What is your opinion ?

Thank you.

Michel

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Error "Cannot create dialog box" after migrating t
Posted: Tue Feb 13, 2007 04:22 PM

Antonio,

One more question about RC-files :

How can I make changes to big RC-files as I just mentioned ? Resource Workshop doesn't open such big RC-files, so I need to repeat this whole procedure to get one RES-file.

Thanks,

Michel

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Error "Cannot create dialog box" after migrating t
Posted: Tue Feb 13, 2007 07:41 PM

Michel

Having several RC files is not a problem.

There is a very easy way to do it.

Suppose your rc files are file1.rc, file2.rc and file3.rc...etc

Create a NEW rc file that you name myrc.rc

in this file just add the following

include "FILE1.rc"

include "FILE2.rc"

include "FILE3.rc"

.... AND SO ON

You just link myrc.rc and automatically all rc files included in it will be linked.

There are no real limits.

Hth

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Error "Cannot create dialog box" after migrating t
Posted: Thu Feb 15, 2007 04:11 PM

Hello guys,

Thank you all for your help.

My problem is solved now.

Michel

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Continue the discussion