link between PRG and RC
link between PRG and RC
dear all,
I would greatly appreciate if someone could help a fw-beginner like me out.
Here's the structure of my project:
Main folder containing:
configs folder
rc folder
release folder
source folder
*.prj file
my first question: is this a conventional way of organizing a fivewin project?
my second question: i noticed that prg files seem to interact with files located in rc/*.rc. but I am unable to find an explicit link in the prg file that would confirm to me this connection.
please would someone be so kind as to explain the syntax used for this purpose to me.
I suspect that RESOURCE "..." has something to do with it...maybe... does the compiler automatically take the *.rc file into consideration if it has the same name as the *.prg
thank you very much in advance and kind regards
ruth
I would greatly appreciate if someone could help a fw-beginner like me out.
Here's the structure of my project:
Main folder containing:
configs folder
rc folder
release folder
source folder
*.prj file
my first question: is this a conventional way of organizing a fivewin project?
my second question: i noticed that prg files seem to interact with files located in rc/*.rc. but I am unable to find an explicit link in the prg file that would confirm to me this connection.
please would someone be so kind as to explain the syntax used for this purpose to me.
I suspect that RESOURCE "..." has something to do with it...maybe... does the compiler automatically take the *.rc file into consideration if it has the same name as the *.prg
thank you very much in advance and kind regards
ruth
Re: link between PRG and RC
Good afternoon Ruth, sorry for the question, can you tell me what your level of knowledge of FiveWin The Best is?
Buenas tardes Ruth, perdón por la pregunta, ¿puedes decirme cuál es tu nivel de conocimiento de FiveWin The Best?
Gracias, thanks.
Regards, saludos.
Buenas tardes Ruth, perdón por la pregunta, ¿puedes decirme cuál es tu nivel de conocimiento de FiveWin The Best?
Gracias, thanks.
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Re: link between PRG and RC
Thank you for your answer
my level in fivewin is beginner...
i am used to working with html, javascript, bootstrap and also modharbour and would like to learn and understand fivewin and everything that comes with it better.
thanks again and kind regards
ruth
my level in fivewin is beginner...
i am used to working with html, javascript, bootstrap and also modharbour and would like to learn and understand fivewin and everything that comes with it better.
thanks again and kind regards
ruth
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: link between PRG and RC
Dear Ruth,
FiveWin provides a high level of freedom to developers so it is quite usual to find FiveWin developers organizing their work in different ways.
As a general rule, the better you organize and structure your project, the easier it will be to mantain it. This can be easily achieved using child folders from a parent folder.
This is a good structure to use:
FiveWin provides a high level of freedom to developers so it is quite usual to find FiveWin developers organizing their work in different ways.
As a general rule, the better you organize and structure your project, the easier it will be to mantain it. This can be easily achieved using child folders from a parent folder.
This is a good structure to use:
Hope this helps you. If you have any doubts, please feel free to askFolder MyApp
+ Folder source
+ Folder include
+ Folder lib (if you are using third party libs)
+ Folder obj (to place the resulting C and OBJs)
+ Folder resources
... + rc file (one or more)
... + bitmaps
... + icons
... + cursors
go.bat (a batch file to run the project building)
MyApp.hbp (hbmk2 Harbour project file)
- carlos vargas
- Posts: 1721
- Joined: Tue Oct 11, 2005 5:01 pm
- Location: Nicaragua
Re: link between PRG and RC
i use xmate or hbmk2 in harbour.
for the msvc version of my app i use xmate.
for example, this is the .hbp project HBMK2 for fwh+mingw+harbour
c.bat-hbexe
-oprestamos32g
-workdir=obj\
-compr
-info
-inc
-trace
-static
-fullstatic
-strip
-jobs=%NUMBER_OF_PROCESSORS%
-beep
-run
#-cflag=-DNTDDI_VERSION=NTDDI_WIN7 -D_WIN32_WINNT=_WIN32_WINNT_WIN7
-ldflag+=-Wl,--allow-multiple-definition
-prgflag=/n /gc2 /w0 /es2 /v /q0 /kmo /d__DEV__;__EDITAR_REPORTE2__
-resflag=-D__FLAT__
#-nodefgt
-gtgui
-id:\fwh\include
-id:\fwh\include2
-iinclude
-Ld:\fwh\lib
-lpatch
-lfiveh
-lfivehc
-llibmysql
-lhbtmysql
-lgdiplus -lversion
-lodbc32 -lsetupapi -lpsapi
-lopengl32 -loledlg -lmfcuia32 -lwin32k -lvfw32 -lstdc++ -lwsock32 -lurlmon
source\prestamos.prg
source\prestamos_acercade.prg
source\prestamos_conectar.prg
source\prestamos_acceso.prg
source\prestamos_menu.prg
source\prestamos_contadores.prg
source\prestamos_feriados.prg
source\prestamos_rutas.prg
source\prestamos_usuarios.prg
source\prestamos_clientes.prg
source\prestamos_cobradores.prg
source\prestamos_cat.prg
source\prestamos_nuevo.prg
source\prestamos_pagos.prg
source\prestamos_ajustes.prg
source\prestamos_ver.prg
source\prestamos_mora.prg
source\prestamos_cobranza.prg
source\prestamos_cierrecobro.prg
source\prestamos_respaldo.prg
source\prestamos_reportes.prg
source\fun_extenciones.prg
source\fun_msgget.prg
source\fun_showerror.prg
source\fun_visor.prg
source\fun_varias.prg
source\fwsrc\tmytitle.prg
source\fwsrc\rpreview.prg
source\fwsrc\msgrun.prg
source\fwsrc\msglist.prg
resource\prestamos.rc
#hbxpp.hbc
xhb.hbc
hbwin.hbc
hbct.hbc
hbmzip.hbc
hbziparc.hbc
#hbfoxpro.hbc
hbmisc.hbc
@echo off
set olpath=%path%
set path=%path%;d:\compiler\mingw\bin;d:\compiler\harbour\bin
hbmk2 prestamos32.hbp
set path=%olpath%
pause
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
Carlos Vargas
Desde Managua, Nicaragua (CA)
Re: link between PRG and RC
good morning
this helps me very much. thank you
please can you help me once more here ...
in my code in the *.prg i see
and i assume this is the code for my modal-window to pop up.
where/how does the *.prg get told to look for more also in the *.rc?
I experience that it probably does because this gets processed
but i don´t see something written in the *.prg code ... how are the prg and the rc linked? or is it enough for them to sit in the same project.
again THANK YOU for your patience and kindness
ruth
this helps me very much. thank you
please can you help me once more here ...
in my code in the *.prg i see
Code: Select all | Expand
DEFINE DIALOG oDlg ;
RESOURCE "NACHFASSEN" ;
TITLE Setup():PrgPath + "CRM-Mail in 4 Schritten" ;
BRUSH Setup():oBrushBlau ;
FONT Setup():oFntMedium ;
ICON oIco ;
TRANSPARENT
where/how does the *.prg get told to look for more also in the *.rc?
I experience that it probably does because this gets processed
Code: Select all | Expand
NACHFASSEN DIALOG DISCARDABLE 17, 36, 703, 348
STYLE WS_POPUP|DS_MODALFRAME|WS_CAPTION|WS_SYSMENU|WS_VISIBLE
CAPTION "Betreuungsemail in 4 Schritten"
FONT 10, "Segoe UI"
{
CONTROL "1. Abfrage ausw�hlen ", 30, "Button", BS_GROUPBOX, 8, 4, 384, 124
CONTROL "", 101, "TXBrowse", WS_TABSTOP|0x00300000, 4, 164, 444, 174
CONTROL "heute", 4001, "Static", WS_GROUP, 36, 44, 100, 8
CONTROL "", 4002, "ComboBox", WS_BORDER|CBS_DROPDOWN|CBS_SORT|WS_VSCROLL|WS_TABSTOP, 36, 20, 288, 40
CONTROL " 2. Anreise in:", 4003, "Static", WS_GROUP, 36, 76, 56, 8
CONTROL "", 4004, "ComboBox", WS_BORDER|CBS_DROPDOWN|CBS_SORT|WS_VSCROLL|WS_TABSTOP, 124, 76, 24, 40
CONTROL "Tagen", 4005, "Static", WS_GROUP, 152, 80, 24, 8
CONTROL "3. Abfrage starten", 4006, "Button", WS_TABSTOP, 204, 76, 108, 12
CONTROL " 4. Email abschicken", 4007, "Button", WS_TABSTOP, 540, 144, 108, 12
CONTROL "Treffer gesammelt nach Emailvorlagen", 4008, "Static", WS_GROUP, 432, 8, 144, 8
CONTROL "", 4009, "TXBrowse", WS_TABSTOP|0x00300000, 432, 20, 176, 104
CONTROL "Empf�ngerliste", 4010, "Static", WS_GROUP, 8, 152, 56, 8
CONTROL "Beenden", IDCANCEL, "Button", WS_TABSTOP, 540, 320, 108, 12
CONTROL "This is a label:", 4011, "Static", WS_GROUP, 32, 100, 104, 8
CONTROL "Anreisen insgesamt: davon mit dem ausgew�hlten Kennzeichen", 4012, "Static", WS_GROUP, 8, 140, 300, 8
CONTROL "2. Tage ausw�hlen", 4013, "Static", WS_GROUP, 16, 60, 164, 8
CONTROL "", 4014, "ComboBox", WS_BORDER|CBS_DROPDOWN|CBS_SORT|WS_VSCROLL|WS_TABSTOP, 204, 40, 180, 40
}
but i don´t see something written in the *.prg code ... how are the prg and the rc linked? or is it enough for them to sit in the same project.
again THANK YOU for your patience and kindness
ruth
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: link between PRG and RC
Dear Ruth,
good morning
In your code:
DEFINE DIALOG oDlg RESOURCE "NACHFASSEN" ... // Notice that you are using "NACHFASSEN"
and in the resource file, here you have the same name:
NACHFASSEN DIALOG DISCARDABLE ... // NACHFASSEN is here again
Next is to REDEFINE the controls from the RC file that you want to manage from your PRG. You may find several REDEFINE commands in your PRG code
Hope this helps. Please feel free to ask any doubt about it
good morning
In your code:
DEFINE DIALOG oDlg RESOURCE "NACHFASSEN" ... // Notice that you are using "NACHFASSEN"
and in the resource file, here you have the same name:
NACHFASSEN DIALOG DISCARDABLE ... // NACHFASSEN is here again
Next is to REDEFINE the controls from the RC file that you want to manage from your PRG. You may find several REDEFINE commands in your PRG code
Hope this helps. Please feel free to ask any doubt about it
Re: link between PRG and RC
dear antonio,
thank you very much. i also see the REDEFINE. Great
so i understand it is enough to have
I don´t have to tell the *.prg where to go looking - a hint to *.rc?
like in css where you first link the file before you can use its styling opportunities?
i am looking forward to starting ... i will "just" change the font first.
it says FONT 10, "Segoe UI"
please, where can i find all the usable fonts for my project? do i have to install them?
if i then distributed the exe to another computer how could i make sure he has the font available too?
thank you very much, dear antonio and dear fivewinners.
have a nice day
ruth
thank you very much. i also see the REDEFINE. Great
so i understand it is enough to have
Code: Select all | Expand
DEFINE DIALOG oDlg ;
RESOURCE "NACHFASSEN" ;
like in css where you first link the file before you can use its styling opportunities?
i am looking forward to starting ... i will "just" change the font first.
it says FONT 10, "Segoe UI"
please, where can i find all the usable fonts for my project? do i have to install them?
if i then distributed the exe to another computer how could i make sure he has the font available too?
thank you very much, dear antonio and dear fivewinners.
have a nice day
ruth
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: link between PRG and RC
Dear Ruth,
> I don´t have to tell the *.prg where to go looking - a hint to *.rc?
It is not needed as FiveWin automatically look for it inside the EXE
> it says FONT 10, "Segoe UI"
Simply change "Segoe UI" into othe font name as "Verdana", "Arial", etc.
> please, where can i find all the usable fonts for my project? do i have to install them?
Here you have a small FWH (FiveWin for Harbour) example to see all the fonts that you have available:
> if i then distributed the exe to another computer how could i make sure he has the font available too?
Good question. Let me think about it...
> I don´t have to tell the *.prg where to go looking - a hint to *.rc?
It is not needed as FiveWin automatically look for it inside the EXE
> it says FONT 10, "Segoe UI"
Simply change "Segoe UI" into othe font name as "Verdana", "Arial", etc.
> please, where can i find all the usable fonts for my project? do i have to install them?
Here you have a small FWH (FiveWin for Harbour) example to see all the fonts that you have available:
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
XBrowser( ChooseFont() )
return nil
> if i then distributed the exe to another computer how could i make sure he has the font available too?
Good question. Let me think about it...
- Enrico Maria Giordano
- Posts: 8728
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: link between PRG and RC
From MS docs:Antonio Linares wrote:NACHFASSEN DIALOG DISCARDABLE ...
DISCARDABLE Ignored. In 16-bit Windows, the resource can be discarded if no longer needed.
Re: link between PRG and RC
thank you very much ...
so i just write
and make everything slimmer -> less words for less memory usage...
just kidding ... but less words for cleanliness and readability is very useful for me...
learning a new language is exciting and also challenging...
thank you very much again and kind regards
ruth
so i just write
Code: Select all | Expand
NACHFASSEN DIALOG
just kidding ... but less words for cleanliness and readability is very useful for me...
learning a new language is exciting and also challenging...
thank you very much again and kind regards
ruth
- Enrico Maria Giordano
- Posts: 8728
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: link between PRG and RC
I agree!Ruth wrote:but less words for cleanliness and readability is very useful for me...
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: link between PRG and RC
Dear Ruth,
We have implemented a new FWH function FW_CheckFont( cFontName ) --> lFound
This is an example of use:
You need updated FWH libs. Please let me know if you use Borland or Microsoft Visual Studio, and I will email them to you
We have implemented a new FWH function FW_CheckFont( cFontName ) --> lFound
This is an example of use:
Code: Select all | Expand
#include "FiveWin.ch"
function Main()
local cFontName := "MyFontName"
if ! FW_CheckFont( cFontName )
MsgAlert( "Font not found: " + cFontName )
endif
return nil
Re: link between PRG and RC
Dear Antonio,
this is wonderful. I am really looking forward to using FW_CheckFont( cFontName ) Thank you very much
and also we use UESTUDIO in our company ... i hope this was your question and i thank you for your patience
i was so eager to start so i just copied all the folders that seemed necessary to me from my sister´s computer.
now i have for example
- FWH folder
- HB30 folder
and some more
and i also installed xmate and googled hbmk2 as mr. vargas kindly mentioned...now i am trying to connect the dots
maybe there is a installation guide somewhere? i would highly appreciate someone telling me all the ingredients i need for making a program with fivewin - a list of necessary tools and resources? i see the source code and begin to understand slowly and gradually but compiling is still a mystery to me. i suppose there is a button that does it for me if i set up everything correctly?
any guidance would be very appreciated.
kind regards and thanks again
ruth
this is wonderful. I am really looking forward to using FW_CheckFont( cFontName ) Thank you very much
regarding the development tools, i use VISUAL STUDIO CODE for almost everything i do so far ... since i have not yet compiled anything i am really looking forward to it.Please let me know if you use Borland or Microsoft Visual Studio
and also we use UESTUDIO in our company ... i hope this was your question and i thank you for your patience
i was so eager to start so i just copied all the folders that seemed necessary to me from my sister´s computer.
now i have for example
- FWH folder
- HB30 folder
and some more
and i also installed xmate and googled hbmk2 as mr. vargas kindly mentioned...now i am trying to connect the dots
maybe there is a installation guide somewhere? i would highly appreciate someone telling me all the ingredients i need for making a program with fivewin - a list of necessary tools and resources? i see the source code and begin to understand slowly and gradually but compiling is still a mystery to me. i suppose there is a button that does it for me if i set up everything correctly?
any guidance would be very appreciated.
kind regards and thanks again
ruth
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: link between PRG and RC
Dear Ruth,
I meant what C compiler do you plan to use with Harbour: Borland C or Microsoft C ?
My advise is to use Microsoft C for both 32 & 64 bits apps. You can freely download it from here:
https://visualstudio.microsoft.com/
When you install it, please select this option:
https://github.com/FiveTechSoft/screens ... g?raw=true
I meant what C compiler do you plan to use with Harbour: Borland C or Microsoft C ?
My advise is to use Microsoft C for both 32 & 64 bits apps. You can freely download it from here:
https://visualstudio.microsoft.com/
When you install it, please select this option:
https://github.com/FiveTechSoft/screens ... g?raw=true