FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper till Now steps of creating Dialogs as main window
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
till Now steps of creating Dialogs as main window
Posted: Thu Jan 05, 2006 11:43 PM

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

Posts: 219
Joined: Fri Nov 04, 2005 02:34 PM
Re: till Now steps of creating Dialogs as main window
Posted: Fri Jan 06, 2006 02:44 PM
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


Maybe i didnt understand exactly what you wanna do, because
its very simple to create an app with a main dialog from resource.

#Include "FiveWin.ch"

Function Main()

Local oDlg
DEFINE DIALOG oDlg RESOURCE "MAIN"
....
....
....
ACTIVATE DIALOG oDlg CENTERED

Return NIL


Regards
Juan Carlos Salinas Ojeda

México. D.F.

-------------------------------------------------
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
till Now steps of creating Dialogs as main window
Posted: Fri Jan 06, 2006 04:04 PM

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 ?

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
till Now steps of creating Dialogs as main window
Posted: Fri Jan 06, 2006 09:13 PM

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.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
till Now steps of creating Dialogs as main window
Posted: Sat Jan 07, 2006 10:40 AM

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

Include "FiveWin.ch"

Function Main()

Local oDlg
DEFINE DIALOG oDlg RESOURCE "1_2_02"
ACTIVATE DIALOG oDlg CENTERED

Return NIL

Application

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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
till Now steps of creating Dialogs as main window
Posted: Sat Jan 07, 2006 01:56 PM

Try to use another name different from "1_2_02"

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
till Now steps of creating Dialogs as main window
Posted: Sat Jan 07, 2006 10:55 PM

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

Application

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

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
till Now steps of creating Dialogs as main window
Posted: Sun Jan 08, 2006 11:20 AM

Ehab,

You have to #include "WinApi.ch" into your RC file.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
till Now steps of creating Dialogs as main window
Posted: Tue Jan 10, 2006 08:53 AM

Not all Tools works well in workshop , eg . the BorlandRadioButton doesn't work and the program gave me :
Can not find main resource.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
till Now steps of creating Dialogs as main window
Posted: Tue Jan 10, 2006 02:48 PM

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 )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
till Now steps of creating Dialogs as main window
Posted: Tue Jan 10, 2006 10:15 PM

Is there a special library for every resource editor ?

Continue the discussion