Concept of REDEFINE for Dummy

Concept of REDEFINE for Dummy

Postby Jimmy » Sun Feb 26, 2023 7: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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Concept of REDEFINE for Dummy

Postby Antonio Linares » Sun Feb 26, 2023 8:34 am

Dear Jimmy,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Concept of REDEFINE for Dummy

Postby Jimmy » 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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Concept of REDEFINE for Dummy

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Concept of REDEFINE for Dummy

Postby Jimmy » 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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Concept of REDEFINE for Dummy

Postby Jimmy » Sun Apr 02, 2023 4:02 am

hi,

Question :
how does REDEFINE a "say" ("Static") when ID are 0xFFFF or -1 :?:
Image
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Concept of REDEFINE for Dummy

Postby cmsoft » Sun Apr 02, 2023 1:50 pm

Jimmy:
It has to have an id other than -1 to be able to assign redefines
Change RC with an ID.
User avatar
cmsoft
 
Posts: 1292
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: Concept of REDEFINE for Dummy

Postby cnavarro » Sun Apr 02, 2023 2: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
User avatar
cnavarro
 
Posts: 6549
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Concept of REDEFINE for Dummy

Postby Jimmy » Sun Apr 02, 2023 3: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: Select all  Expand view  RUN
  REDEFINE BUTTON

i have try
Code: Select all  Expand view  RUN
  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: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Concept of REDEFINE for Dummy

Postby Jimmy » Sun Apr 02, 2023 3: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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Concept of REDEFINE for Dummy

Postby Antonio Linares » Sun Apr 02, 2023 3:47 pm

Dear Jimmy,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Concept of REDEFINE for Dummy

Postby Marc Venken » Sun Apr 02, 2023 5:46 pm

Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1446
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: Concept of REDEFINE for Dummy

Postby Jimmy » Mon Apr 03, 2023 6: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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: Concept of REDEFINE for Dummy

Postby Jimmy » Mon Apr 03, 2023 1:27 pm

hi,

it seem that REDEFINE does only work with FINDTEXT() as it return a Handle
Code: Select all  Expand view  RUN
  hdlg = FindText(&fr);

https://learn.microsoft.com/de-de/windows/win32/dlgbox/using-common-dialog-boxes?redirectedfrom=MSDN

other like
Code: Select all  Expand view  RUN
  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
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 46 guests