FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Concept of REDEFINE for Dummy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Concept of REDEFINE for Dummy
Posted: Sun Feb 26, 2023 07:05 AM
hi,

i do not know Technique of using *.RC and REDEFINE
"where" can i learn more about it how to use with Fivewin :?:
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Concept of REDEFINE for Dummy
Posted: Sun Feb 26, 2023 08:34 AM

Dear Jimmy,

Please make a search for REDEFINE in FWH\samples*.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Concept of REDEFINE for Dummy
Posted: Sun Feb 26, 2023 10:09 AM
hi Antonio,
Antonio Linares wrote:Please make a search for REDEFINE in FWH\samples\*.prg
that is exact my "Problem"

i do "see" them but not "understand" what they are for and "how" it work e.g. ID
what is the benefit use use *.RC :?:
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Concept of REDEFINE for Dummy
Posted: Sun Feb 26, 2023 10:23 AM

You create a RC file using a visual RC designer and then use it from your FWH app

You can use the one provided in Visual Studio Community, ResEdit, PellesC, etc there are many availables

You visually "draw" your screens instead of calculating coors by try and error...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Concept of REDEFINE for Dummy
Posted: Sun Feb 26, 2023 10:31 AM
hi Antonio,

WOW, i did not know that Technique.

i did know 2-Way "Form-Designer" but they "generate Full Source" CODE but never think of *.RC

but how is *.PRG Part
will it "generate" too :?:
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Concept of REDEFINE for Dummy
Posted: Sun Apr 02, 2023 04:02 AM
hi,

Question :
how does REDEFINE a "say" ("Static") when ID are 0xFFFF or -1 :?:
greeting,

Jimmy
Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: Concept of REDEFINE for Dummy
Posted: Sun Apr 02, 2023 01:50 PM

Jimmy:

It has to have an id other than -1 to be able to assign redefines

Change RC with an ID.

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Concept of REDEFINE for Dummy
Posted: Sun Apr 02, 2023 02:42 PM

The only problem we found in the use of this technique (dialog design in .RC) is the adaptation of these designs to screens of different resolutions.

But everything can be solved, with Fivewin, everything is possible.

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Concept of REDEFINE for Dummy
Posted: Sun Apr 02, 2023 03:27 PM
hi,
cmsoft wrote:It has to have an id other than -1 to be able to assign redefines
Change RC with an ID.
i can´t change ID while it is from Windows ;)
i use that "search/replace" Dialog which e.g. Notepad.EXE have

based on c:\fwh\source\classes\dlgfind.prg i found out that i can REDEFINE "Windows standard Common Dialog"
it have to do with (undocumented) Function RegDialog()

as i want to use "Dark-Mode" those "Common Control" are still "white" which i try to change
as you can "see" i can change some Color but those "Say" (wC_STATIC) have ID 0xFFFF or -1 ... :(

---

Question :

instead of
Code (fw): Select all Collapse
   REDEFINE BUTTON
i have try
Code (fw): Select all Collapse
   REDEFIBE BTNBMP
this seems to work but "Parent Window" seem not to get "Userdef Event" ...

i have try oWnd:SendMsg() or oWnd:PostMsg() but i got no Result

Question :
can i can change BUTTON to "something" else ? ( or is there a limitation IsKinof("BUTTON) in RegDialog() ... )
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Concept of REDEFINE for Dummy
Posted: Sun Apr 02, 2023 03:46 PM
hi,
cnavarro wrote:The only problem we found in the use of this technique (dialog design in .RC) is the adaptation of these designs to screens of different resolutions.
i agree that these "old" Windows "Common Control" are made for Screen like VGA but much to small for FULL-HD

but i never know that i can REDEFINE Controls of those "Common Control"
my 1th Idea was to change Color for "Dark-Mode" ...

---

when REDEFINE i got hWnd in ::aControl so i can "paint it black"
but i need ID of Control for REDEFINE and each ID must be "unique" so i get only 1st "say"

Question
how to get hWnd of each Control in Dialog :?:
greeting,

Jimmy
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Concept of REDEFINE for Dummy
Posted: Sun Apr 02, 2023 03:47 PM

Dear Jimmy,

Try with TPanel as it is a very simple control

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: Concept of REDEFINE for Dummy
Posted: Sun Apr 02, 2023 05:46 PM
Marc Venken

Using: FWH 23.08 with Harbour
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Concept of REDEFINE for Dummy
Posted: Mon Apr 03, 2023 06:21 AM
hi Antonio,
Antonio Linares wrote:Try with TPanel as it is a very simple control
thx for Answer

i don´t want to create "new" Control.
i want to "modify" existing Windows "Common Control"

i´m testing REDEFINE and found out that i can get hWnd of existing "Common Control" when have Resource ID
but for "Say" i got only 0xFFF or IDC_STATIC (-1) so i can´t get hWnd

that´s why i ask
how to get hWnd of each Control in Dialog :?:
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Concept of REDEFINE for Dummy
Posted: Mon Apr 03, 2023 01:27 PM
hi,

it seem that REDEFINE does only work with FINDTEXT() as it return a Handle
Code (fw): Select all Collapse
   hdlg = FindText(&fr);
https://learn.microsoft.com/de-de/windows/win32/dlgbox/using-common-dialog-boxes?redirectedfrom=MSDN

other like
Code (fw): Select all Collapse
   if (ChooseColor(&cc)==TRUE) 
   if (ChooseFont(&cf)==TRUE)
   if (GetOpenFileName(&ofn)==TRUE) 
   if (PrintDlg(&pd)==TRUE) 
   if (PageSetupDlg(&psd)==TRUE)
seems not return Handle

so that Way is a "dead end" trying "Dark-Mode"
greeting,

Jimmy

Continue the discussion