Error "Cannot create dialog box" after migrating t
Error "Cannot create dialog box" after migrating t
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
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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
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:
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:
Code: Select all
...
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"
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
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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
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.
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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
-
- Posts: 142
- Joined: Sun Oct 09, 2005 10:59 am
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Michel,
Please use these lines and check the shown value:
Please let us know what value MsgInfo() shows
Please use these lines and check the shown value:
Code: Select all
...
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"
Antonio,
The value, shown by MsgInfo(hBorland), is 13762560.
Michel
The value, shown by MsgInfo(hBorland), is 13762560.
Michel
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
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
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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
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
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. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
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
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
Hello guys,
Thank you all for your help.
My problem is solved now.
Michel
Thank you all for your help.
My problem is solved now.
Michel
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7