Page 1 of 1

Como se meter un RC en un EXE

Posted: Sat Jan 13, 2007 2:23 am
by AIDA
Hola soy novata :oops: y como ya vi que recomiendan ya no usar DLL y solo los RC no entiendo :?: como meterlos en un exe sin usar el Resource Workshop de Borlan :shock:

Espero me puedan ayudar :D

Gracias y Feliz Año :wink:

Aida

Posted: Sat Jan 13, 2007 6:19 am
by Antonio Linares
Aida,

Puedes ver como se hace en FWH\samples\buildh.bat:

c:\bcc55\bin\brc32 -r tu_aplicacion.rc

Posted: Sat Jan 13, 2007 6:24 am
by AIDA
Gracias!!! Antonio lo checare ya tengo horas sin que me funcione nada de mis programitas :cry:

Gracias y gusto en conocerte :D

Aida

NO FUNCIONA?

Posted: Sat Jan 13, 2007 7:47 am
by AIDA
HOL otra vez

cheque lo que me dijiste, ya queda dentro del exe el rc pero al ejecutarlo me marca el error siguiente

Application
===========
Path and name: C:\FWH\promotoria\ata.exe (32 bits)
Size: 1,843,712 bytes
Time from start: 0 hours 0 mins 0 secs
Error occurred at: 13/01/2007, 01:34:20
Error description: Error FiveWin/3 Cannot create Dialog Box:
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿResource: CUADRO

Stack Calls
===========
Called from CREATEDLGERROR(0)
Called from TDIALOG:ACTIVATE(0)
Called from MAIN(338)

System
======
CPU type: GetCPU() failed! 2883 Mhz
Hardware memory: 1024 megs

Free System resources: 90 %
GDI resources: 90 %
User resources: 90 %

Compiler version: Harbour Alpha build 44.0 Intl. (Flex)
Windows version: 5.1, Build 2600 Service Pack 2

Windows total applications running: 0

Variables in use
================
Procedure Type Value
==========================
CREATEDLGERROR
Param 1: O Class: TDIALOG
Local 1: C "CUADRO"
Local 2: C "ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ"
TDIALOG:ACTIVATE
Param 1: U
Param 2: U
Param 3: U
Param 4: L .T.
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 250
Local 2: O Class: TSAY
Local 3: N 14599344
Local 4: U
Local 5: U
Local 6: C "modulo de autos"
Local 7: U
Local 8: U
Local 9: L .T.
Local 10: U
Local 11: O Class: TFONT
Local 12: U
Local 13: U
Local 14: U
Local 15: U
Local 16: U
Local 17: O Class: TSAY
Local 18: N 0
Local 19: O Class: TSAY
Local 20: N 0
Local 21: A Len: 10
Local 22: U
Local 23: U

Linked RDDs
===========
DBF
DBFDBT
DBFNTX

DataBases in use
================

1: COMPA RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
6 5 .F. .T.

Indexes in use TagName

Relations in use

2: MARCAS RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
10 9 .F. .T.

Indexes in use TagName

Relations in use

3: => AUTOS RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
1 0 .T. .T.

Indexes in use TagName
=> FIELD->ficha FICHA

Relations in use

4: PERSONAL RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
10156 10417 .F. .F.

Indexes in use TagName
=> FIELD->ficha FICHAZ

Relations in use

5: CODIGO RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
1 42963 .F. .F.

Indexes in use TagName
=> FIELD->codigo CODIGO

Relations in use

6: CIUDAD RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
2261 2426 .F. .F.

Indexes in use TagName
=> NOMBRE CIUDAD

Relations in use

7: ESTADO RddName: DBFNTX
==============================
RecNo RecCount BOF EOF
33 33 .F. .F.

Indexes in use TagName
=> FIELD->clave ESTADO

Relations in use

Classes in use:
===============
1 HBCLASS
2 HBOBJECT
3 TWINDOW
4 TDIALOG
5 TBRUSH
6 TFONT
7 TCONTROL
8 TWBROWSE
9 TSAY
10 ERROR

Memory Analysis
===============
236 Static variables

Dynamic memory consume:
Actual Value: 0 bytes
Highest Value: 0 bytes


solo estoy compilando un pedasito de codigo del programa que tengo funcionando con fivewin aqui te pongo el codigo disculpa si esta algo desordenado


//*************************************
#include "FiveWin.ch"
//#include "SSay.ch"
//#include "fileio.ch"
//#include "Odometer.ch"
//#include "tooltips.ch"

//#include "c5grid.ch"
//#include "clock.ch"

//#include "Folder.ch"

//#include "MesDbf.ch"

//#include "DSay.ch"

//#include "InKey.ch"

//#include "Report.ch"

#define SRCPAINT 15597702 // 0xEE0086 // Para Mensajes
#define SRCAND 8913094

STATIC oDlg,nNivel,xNivel,NREGISTRO,noREG,oOdomet1,oOdomet2,CANCELAA,oBtn,oSoh
STATIC rx:=.F.
STATIC oSoC,oSoCc,xxx,osTA,nOption,cOption,Ntpago,oSay,cNpa
STATIC cFICHA,cR_ficha
STATIC cNombre,nom
STATIC cPaterno,pat
STATIC cMaterno,mat
STATIC cDireccion
STATIC cCp
STATIC cCOLONIA,cOlonis,cCiudad,cEstado,cTelefona,cTelefonb,cCENTRO,AAA , BBB , CCC
static uno :=.f.
static dos :=.f.
STATIC cVigencia1
STATIC cVigencia2
STATIC cMe
STATIC cAN
STATIC cOverM
STATIC cOverT
STATIC cOverS
STATIC cOverA
STATIC cCompa
STATIC cAuto
STATIC cCamion
STATIC cClamt
STATIC cMarc
STATIC cCtipo
STATIC cmodelo
STATIC cAire :=.f.
STATIC cEqf :=.f.
STATIC cAutero :=.f.
STATIC cAutomatico :=.f.
STATIC cSina :=.f.
STATIC cTipico :=.f.
STATIC cStd :=.f.
STATIC xcPoliza,cPoliza,CDessc,cMes,cMesde,CDessm,cOcupa,cNum_serie,cNum_motor,cPlacas,cMesd
STATIC cR_poliza
STATIC cEndoso := .F.
STATIC rReno :=.F.
STATIC cSUM_ASEGU
STATIC cAMPLIA := .F.
STATIC cLIMITADA := .F.
STATIC cRC :=.F.
STATIC stat
STATIC cSUM_ASEG
STATIC cSUMA_ASEG_
STATIC cSUME_ASEGU
STATIC cRCV_CATAST
STATIC cAgente,cPromo
STATIC cCompanyId,hBorland
STATIC mComments,cOcupacion,cDeparta,cDepaclave
STATIC cUnidad,cUniclave,cUbicadep
STATIC cImporte_to
STATIC cPrima_neta,cDescuentos,cMensual,rRecibo1,rReciVo1,rRecibo2,rReciVo2
STATIC cCat,cMen,oSov
STATIC ZXC:=.F.
STATIC nItema := {}
STATIC cPoitem := {}
STATIC Caitem := {}
STATIC Cpitem := {}
STATIC Cmess := {}
STATIC aItem := {}
STATIC aMarca := {}
STATIC nItem := {"2014","2013","2012","2011","2010","2009","2008","2007","2006","2005","2004","2003","2002","2001","2000","99","98","97","96","95","94","93","92","91","90","89","88","87",;
"86","85","84","83","82","81","80","79","78","77","76",;
"75","74","79","78","77","76","75","74","73","72","71","70"}

STATIC CItem :={"24","23","22","21","20" ,"19", "18","17","16","15","14","13","12",;
"11","10","9","8","7","6","5","4","3","2","1"}


STATIC CmesX :={"20","19","18","17","16","15","14","13","12","11","10","9","8","7","6","5","4","3","2","1"}

static oDSay,nReg,cCan,nregis,cPend,pendi
STATIC cxc:=.t.
//__________________________________________


FUNCTION Main()

local oBrush, oBar
local nClr1,cStat
local nClr2
local CLR_1,CLR_2
local cTitle := "modulo de autos"
local cSay,AUTOS
local nfl:=.t.
local oBmp,oFont,oMenu
local oLbx,bRo,hFile
Local oClock,cCom,cComi:=0,cPnet,cPne:=0
local aHBitMaps:= { ReadBitmap( 0, "ima\Level1.bmp" ), ; // BitMaps de 14 x 32
ReadBitmap( 0, "ima\Level2.bmp" ), ;
ReadBitmap( 0, "ima\Level3.bmp" ), ;
ReadBitmap( 0, "ima\Level4.bmp" ), ;
ReadBitmap( 0, "ima\Level5.bmp" ), ;
ReadBitmap( 0, "ima\Level6.bmp" ), ;
ReadBitmap( 0, "ima\Level7.bmp" ), ;
ReadBitmap( 0, "ima\Level8.bmp" ), ;
ReadBitmap( 0, "ima\Level9.bmp" ), ;
ReadBitmap( 0, "ima\Level10.bmp" )}


// OL_AutoYield( .T. )


// Request dbfcdx
// rddsetdefault("dbfcdx")
//hFile :=



//#ifdef __CLIPPER__
// SET RESOURCES TO "ALTAS.DLL", "BWCC.DLL"
//#else
// local hDLL := LoadLibrary( "bwcc32.dll" )
//SET RESOURCES TO "ALTAS.DLL"
// BWCCRegister( GetResources() )
// #endif




USE COMPA NEW

USE MARCAS NEW

USE AUTOS INDEX FICHA NEW

USE PERSONAL INDEX FICHAZ NEW

USE CODIGO INDEX CODIGO NEW

USE CIUDAD INDEX CIUDAD NEW

USE ESTADO INDEX ESTADO NEW




dbselectarea("COMPA")

COMPA->(dbGoTop())
//cARQ := {}
While(COMPA->( ! Eof()))
aadd(aItem,AllTrim(COMPA->COMPA))
COMPA->(dbSkip(1))
EndDo
//------------
dbselectarea("marcas")

marcas->(dbGoTop())
//cARQ := {}
While(marcas->( ! Eof()))
aadd(aMarca,AllTrim(marcas->marca))
marcas->(dbSkip(1))
EndDo


SET CENTURY ON
SET DATE TO FRENCH
SET EPOCH TO 1998
SET 3DLOOK ON

//OL_AutoYield( .T. )
DEFINE DIALOG oSov RESOURCE "CUADRO"


//REDEFINE BITMAP oBmp FILENAME "CONTADOR.BMP" ID 999 OF oSov
// SIZE 94, 110

cVigencia1:=CTOD(" / / ")
cVigencia2:=CTOD(" / / ")


dbselectarea( "AUTOS" )

DEFINE FONT oFont NAME "Ms Serif" SIZE 4,14
REDEFINE LISTBOX oSoC FIELDS aHBitmaps[ Max( 1, AUTOS->NIVEL ) ] ,;
ALLTRIM(AUTOS->NOMBRE) +" "+ ALLTRIM(AUTOS->APELLIDO_P) +" "+ ALLTRIM(AUTOS->APELLIDO_M),;
ALLTRIM(AUTOS->A_POLIZA) ,;
ALLTRIM(AUTOS->R_POLIZA) ,;
ALLTRIM(AUTOS->POLIZA) ,;
ALLTRIM(AUTOS->comp) ;
HEADERS "", " Nombre ","Poliza Anterior", "Poliza", "Inciso","Compañia";
COLOR RGB(176,196,222 ), RGB(70,130,180 );
FIELDSIZES 150 , 100 , 50 , 50 ;
ON CLICK(oSoCc:Refresh(),cComi:=(autos->prima_neta*10/100),cCom:Refresh(),;
cPne:=autos->prima_neta,cPnet:Refresh(),IIF(autos->nivel=10,stat:="CANCELADA",stat:="VIGENTE"),cStat:Refresh());
FONT oFont ID 1001 OF oSov
//oSoC:cTooltip := "(C)Copyright 2007 - Por Bensadeta S.A."
// oSoC:bRClicked = { || CONSULTA(oSoC) }


nClr1:=Rgb(250,0,0) //EL SELECCIONADO
nClr2:=RGB(176,196,222 )





oSoC:aJustify:={(.F.),(.F.),(.F.),(.F.)}
oSoC:nClrBackFocus:=RGB(0,0,255)
oSoC:nClrForeFocus:=RGB(255,255,255)
oSoC:NCLRPANE:={||IIF((ORDKEYNO())%2==0,RGB(176,196,222 ), RGB(70,130,180 ))}
oSoC:nClrBackHead:=RGB(0,0,255)
oSoC:nClrForeHead:=RGB(255,255,255)

oSoC:nClrPane:={ || iif(AUTOS->nivel=10,nClr1,nClr2)}
// oSoC:nClrPane:={ || iif(AUTOS->nivel=1,nClr1,RGB(176,196,222 ))}

oSoC:nClrText = { || SelColor( AUTOS->A_POLIZA,AUTOS->nivel ) }
// oSoC:nClrForeFocus = { || SelColor( AUTOS->A_POLIZA,AUTOS->nivel ) }





oSoC:bRClicked := { | nRow, nCol, nFlags | ;
( oMenu := MenuBegin( .T. ),;
MenuAddItem( OemToAnsi("Consulta del Registro"),, .F.,,{|oMenuItem| MsgInfo ("No Disponible") } ,,,,,,, .F., ),;
MenuAddItem(),;
MenuAddItem( "Localizar Por Nombre",, .F.,,{|oMenuItem| MsgInfo ("No Disponible") },,,,,,, .F., ),;
MenuEnd(),;
oMenu:Activate( nRow, nCol, oSov )) }
// oSoC:aJustify := { .F., .T., .T., .T., .F., .F., .T., .T. }

//MSGALERT("FIN")









DEFINE FONT oFont NAME "Ms Serif" SIZE 15,15

//cComi:=autos->prima_neta/10%,cCom:Refresh()


//cSay := DATE()

//REDEFINE DYNAMIC SAY VAR cSay ID 101 FONT oFont OF oSov;
//VERTICAL SCROLL SPEED 30 WRAP;
// CENTER SHADED;
//COLOR RGB(176,196,222 ), RGB(70,130,180 )





//COUNT TO CANCELAA FOR autos->nivel=10
//NREGISTRO := NREGISTRO - CANCELAA
//------------------------------------------------------------------------
DEFINE FONT oFont NAME "Ms Serif" SIZE 4,14
REDEFINE LISTBOX oSoCc FIELDS aHBitmaps[ Max( 1, AUTOS->NIVEL ) ] ,;
STR(AUTOS->NUMERO) ,;
AUTOS->FICHA ,;
AUTOS->R_POLIZA ,;
AUTOS->POLIZA ,;
str(AUTOS->pagado) ;
HEADERS "","Nr", "Ficha", "Poliza", "Inciso","Pagado";
COLOR RGB(46,139,87), RGB(106,90,205);
FIELDSIZES 20, 30 , 64 , 130 , 130 , 130 ;
ON CLICK (oSoC:Refresh(),cComi:=( autos->prima_neta*10/100),cCom:Refresh(),;
cPne:=autos->prima_neta,cPnet:Refresh(),IIF(autos->nivel=10,stat:="CANCELADA",stat:="VIGENTE"),cStat:Refresh());
ON DBLCLICK ( MsgInfo ("No Disponible"));
FONT oFont ID 1002 OF oSov
//oSoCc:cTooltip := "(C)Copyright 2007 - Por Bensadeta S.A."
nClr1:=Rgb(250,0,0) //EL SELECCIONADO
nClr2:=RGB(176,196,222 )

oSoCc:aJustify:={(.F.),(.F.),(.F.),(.F.)}
oSoCc:nClrBackFocus:=RGB(0,0,255)
oSoCc:nClrForeFocus:=RGB(255,255,255)
oSoCc:NCLRPANE:={||IIF((ORDKEYNO())%2==0,RGB(176,196,222 ), RGB(70,130,180 ))}
oSoCc:nClrBackHead:=RGB(0,0,255)
oSoCc:nClrForeHead:=RGB(255,255,255)

oSoCc:nClrPane:={ || iif(AUTOS->nivel=10,nClr1,nClr2)}
// oSoC:nClrPane:={ || iif(AUTOS->nivel=1,nClr1,RGB(176,196,222 ))}

oSoCc:nClrText = { || SelColor( AUTOS->A_POLIZA,AUTOS->nivel ) }
// oSoC:nClrForeFocus = { || SelColor( AUTOS->A_POLIZA,AUTOS->nivel ) }


//oSoCc:bRClicked := { | nRow, nCol, nFlags | ;
// ( oMenu := MenuBegin( .T. ),;
// MenuAddItem( OemToAnsi("Consulta del Registro"),, .F.,,{|oMenuItem| CONSULTA(oSoCc) } ,,,,,,, .F., ),;
// MenuAddItem(),;
// MenuAddItem( "Localizar Por Nombre",, .F.,,{|oMenuItem| MsgInfo ("No Disponible") },,,,,,, .F., ),;
// MenuEnd(),;
// oMenu:Activate( nRow, nCol, oSov )) }


//-------------------------------------------------------------------------
//stat:=space(10)
NREGISTRO:=lastrec()
COUNT TO nregis FOR autos->nivel=7
//NREGISTRO := NREGISTRO - CANCELAA
REDEFINE SAY nREG prompt nregis ID 13 OF oSov COLOR RGB(0,0,0), RGB(248,248,255)
COUNT TO CANCELAA FOR autos->nivel=10
REDEFINE SAY cCan prompt CANCELAA ID 15 OF oSov COLOR RGB(0,0,0), RGB(248,248,255)
COUNT TO pendi FOR autos->nivel=1
REDEFINE SAY cPend prompt pendi ID 16 OF oSov COLOR RGB(0,0,0), RGB(248,248,255)
REDEFINE SAY cPnet prompt cPne ID 17 OF oSov Picture"$99,999.99" COLOR RGB(0,0,0), RGB(248,248,255)
REDEFINE SAY cCom prompt cComi ID 18 OF oSov Picture"$99,999.99" COLOR RGB(0,0,0), RGB(248,248,255)
DEFINE FONT oFont NAME "Ms Serif" SIZE 6,11
REDEFINE SAY cStat prompt stat ID 19 FONT oFont OF oSov COLOR RGB(255, 165, 0 ), RGB(0, 0, 205 )




//MsgInfo(NREGISTRO)

dbgotop()
ACTIVATE DIALOG oSov CENTERED
//ON PAINT oSov:SayBitmap( 0, 0, "ima\azul1.bmp", oSov:nWidth, oSov:nHeight )

// ON INIT SndPlayRes( "ENTRA" );





RETURN Nil




static function SelColor( nNivel,xNivel )

local nColor := RGB( 0, 0,0 )


IF xnivel == 10
nColor = RGB(255,255,255)
ENDIF

return nColor

//***********************

Espero me puedas ayudar pase mi DLL a RC CON Resource Workshop

DEPUES brc32 -r ATA.RC
Y
DESPUES buildh ATA

SE COMPILA BIEN PERO DESPUES SALE UNA LINEA QUE DICE

NO SE ENCUENTRA ATA.IL?

AL FINAL ME DEJA ATA.EXE CON TODO Y SU ICONITO PERO COMO TE COMENTE AL EJECUTARLO ME SALE ESE HERROR DEL PRINCIPIO DE MI MENSAGE

QUE ESTARE HACIENDO MAL??


GRACIAS POR TU AYUDA


AIDA

Posted: Sat Jan 13, 2007 8:05 am
by Antonio Linares
Posiblemente estas usando controles de Borland. Añade este código a tu aplicación:

Code: Select all

   ... 
   local hBorland := LoadLibrary( "BWCC32.DLL" ) 
    
   BWCCRegister( GetResources() ) 

   ... (código de tu aplicación) 

   FreeLibrary( hBorland ) 

return nil 

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

Ya funciona!!!!!!! bueno ya casi :)

Posted: Sat Jan 13, 2007 9:09 am
by AIDA
ya por fin salio la ventanita :D pinto los listbox pero me salio un herror :roll: de algo pero ya mañana veo que es

me imagino que encontrare _ y tendre que quitar cosas por otras :shock: etc...

Tea agradesco tu ayuda que tengas un lindo fin de semana :wink:

aqui ya es de madrugada ya me muero de sueño gracias por todo.

hasta la proxima :)


Aida:mrgreen: