Concept of REDEFINE for Dummy

Post Reply
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Concept of REDEFINE for Dummy

Post by Jimmy »

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
User avatar
Antonio Linares
Site Admin
Posts: 42512
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Concept of REDEFINE for Dummy

Post by Antonio Linares »

Dear Jimmy,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Concept of REDEFINE for Dummy

Post by Jimmy »

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
User avatar
Antonio Linares
Site Admin
Posts: 42512
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Concept of REDEFINE for Dummy

Post by Antonio Linares »

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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Concept of REDEFINE for Dummy

Post by Jimmy »

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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Concept of REDEFINE for Dummy

Post by Jimmy »

hi,

Question :
how does REDEFINE a "say" ("Static") when ID are 0xFFFF or -1 :?:
Image
greeting,
Jimmy
User avatar
cmsoft
Posts: 1297
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina
Been thanked: 2 times

Re: Concept of REDEFINE for Dummy

Post by cmsoft »

Jimmy:
It has to have an id other than -1 to be able to assign redefines
Change RC with an ID.
User avatar
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Concept of REDEFINE for Dummy

Post by cnavarro »

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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Concept of REDEFINE for Dummy

Post by Jimmy »

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: Select all | Expand

   REDEFINE BUTTON
i have try

Code: Select all | Expand

   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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Concept of REDEFINE for Dummy

Post by Jimmy »

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
User avatar
Antonio Linares
Site Admin
Posts: 42512
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Concept of REDEFINE for Dummy

Post by Antonio Linares »

Dear Jimmy,

Try with TPanel as it is a very simple control
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Marc Venken
Posts: 1485
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Concept of REDEFINE for Dummy

Post by Marc Venken »

Marc Venken
Using: FWH 23.08 with Harbour
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Concept of REDEFINE for Dummy

Post by Jimmy »

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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Concept of REDEFINE for Dummy

Post by Jimmy »

hi,

it seem that REDEFINE does only work with FINDTEXT() as it return a Handle

Code: Select all | Expand

   hdlg = FindText(&fr);
https://learn.microsoft.com/de-de/windo ... dfrom=MSDN

other like

Code: Select all | Expand

   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
Post Reply