I tried to create small program that has a resource dialog as main window. Till Now I do not know the steps of creating the resource and I am asking if there are any include lines inside the program *.ch?
Thanks
I tried to create small program that has a resource dialog as main window. Till Now I do not know the steps of creating the resource and I am asking if there are any include lines inside the program *.ch?
Thanks
Ehab Samir Aziz wrote:I tried to create small program that has a resource dialog as main window. Till Now I do not know the steps of creating the resource and I am asking if there are any include lines inside the program *.ch?
Thanks
The idea I got the error message that main resource is not found. What my program should be edited by to make the resource visible to it ?
Ehab,
Are you storing your resources into the EXE or into an external DLL ?
If they are inside the EXE, open the EXE with the resources workshop and double check that the resources are there.
That is my code below : I created a resource called 1_2_02 that contained 1 Dialog also called 1_2_02 and my program also called 1_2_02.prg
Function Main()
Local oDlg
DEFINE DIALOG oDlg RESOURCE "1_2_02"
ACTIVATE DIALOG oDlg CENTERED
Return NIL
Path and name: E:\PROGRAMS\CLIPPER\FWEVAL\SITEX\1_2_02.EXE
Size: 632,000 bytes
Max files handles permited: ( SetHandleCount() ) 69
Error ocurred at: 01/01/05, 12:40:41
Error description: Error FiveWin/3 Cannot create Dialog Box:
Resource: 1_2_02
Try to use another name different from "1_2_02"
Ok I renamed the dialog from 1_2_02 to main inside the resource 1_2_02.rc .Also I got an Error :
1_2_02.rc(13) error RW2001 : undefined keyword or key name :
WS_POPUP
Path and name: E:\PROGRAMS\CLIPPER\FWEVAL\SITEX\1_2_02.EXE
Size: 632,000 bytes
Max files handles permited: ( SetHandleCount() ) 69
Error ocurred at: 01/07/06, 00:52:57
Error description: Error FiveWin/3 Cannot create Dialog Box:
Resource: main
Ehab,
You have to #include "WinApi.ch" into your RC file.
Not all Tools works well in workshop , eg . the BorlandRadioButton doesn't work and the program gave me :
Can not find main resource.
Ehab,
If you use Borland own controls, then you have to load the Borland DLL from your application before using the resources:
local hDLL := LoadLibrary( "bwcc.dll" )
... your code...
FreeLibrary( hDLL )
Is there a special library for every resource editor ?