Fixed and enhanced SAMPLES
Moderator: Rathinagiri
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Fixed and enhanced SAMPLES
Pablo, when I have time I make it.
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Fixed and enhanced SAMPLES
Ok Claudio. I understand.
Sorry to ak to you do...
The strange is accept to be BS_OWNERDRAW by initbutton and by changing style function but the button is not displaying. Exists, you can click where supose to be and works but not appears any button image.
I think need redraw button and to implement at event to keep its properties...
Searching at this msdn link https://msdn.microsoft.com/en-us/librar ... S.85).aspx
(most probably it's the same way of Grigory done in ODT_TAB)
The DRAWITEMSTUCT is what we will be using to color our buttons:
I suppose that we need to make our own WM_DRAWITEM. So, after this, we have converted the lParam into our DRAWITEMSTRUCT, now all you have to do is color it.
This is C++, but it could give an idea. In HMG Extended it's using OwnButtonPaint function (which I also included as comment).
Sorry to ak to you do...
The strange is accept to be BS_OWNERDRAW by initbutton and by changing style function but the button is not displaying. Exists, you can click where supose to be and works but not appears any button image.
I think need redraw button and to implement at event to keep its properties...
Searching at this msdn link https://msdn.microsoft.com/en-us/librar ... S.85).aspx
(most probably it's the same way of Grigory done in ODT_TAB)
The DRAWITEMSTUCT is what we will be using to color our buttons:
Code: Select all
typedef struct tagDRAWITEMSTRUCT {
UINT CtlType;
UINT CtlID;
UINT itemID;
UINT itemAction;
UINT itemState;
HWND hwndItem;
HDC hDC;
RECT rcItem;
ULONG_PTR itemData;
} DRAWITEMSTRUCT;
Code: Select all
case WM_DRAWITEM:
{
DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT*)lParam;
return TRUE;
}
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Fixed and enhanced SAMPLES
Hi All,
Regarding USER_COMPONENTS in both examples, note we are not defining at demo prgs, this is doing by HMG calling i_UsrSOOP.ch file automactically.
Very nice, doesn't It ?
Roberto left us a flexible way that allows the user to add components. I've never understood this availability as well as now. It's hard to understand a genius.
Thanks again, Roberto.
Regarding USER_COMPONENTS in both examples, note we are not defining at demo prgs, this is doing by HMG calling i_UsrSOOP.ch file automactically.
Very nice, doesn't It ?
Roberto left us a flexible way that allows the user to add components. I've never understood this availability as well as now. It's hard to understand a genius.
Thanks again, Roberto.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Fixed and enhanced SAMPLES
Button and Tab are examples of controls that have to be redrawn whole. That's why I do not like to implement them because it's like re-creating the UI.Pablo César wrote:Ok Claudio. I understand.
Sorry to ak to you do...
The strange is accept to be BS_OWNERDRAW by initbutton and by changing style function but the button is not displaying. Exists, you can click where supose to be and works but not appears any button image.
I think need redraw button and to implement at event to keep its properties...
Searching at this msdn link https://msdn.microsoft.com/en-us/librar ... S.85).aspx
(most probably it's the same way of Grigory done in ODT_TAB)
The DRAWITEMSTUCT is what we will be using to color our buttons:
I suppose that we need to make our own WM_DRAWITEM. So, after this, we have converted the lParam into our DRAWITEMSTRUCT, now all you have to do is color it.Code: Select all
typedef struct tagDRAWITEMSTRUCT { UINT CtlType; UINT CtlID; UINT itemID; UINT itemAction; UINT itemState; HWND hwndItem; HDC hDC; RECT rcItem; ULONG_PTR itemData; } DRAWITEMSTRUCT;
This is C++, but it could give an idea. In HMG Extended it's using OwnButtonPaint function (which I also included as comment).Code: Select all
case WM_DRAWITEM: { DRAWITEMSTRUCT *dis = (DRAWITEMSTRUCT*)lParam; return TRUE; }
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Fixed and enhanced SAMPLES
Yes, I'm understanding Claudio.
But we can do it for USER_COMPONENTS proposes and with this we can encourage the user to create their own new controls instead.
As first example, the coloured TAB which many user liked.
We can show the way and users have to do their part...
Rgds
USER_COMPONENTS was updated:
viewtopic.php?p=47854#p47854
But we can do it for USER_COMPONENTS proposes and with this we can encourage the user to create their own new controls instead.
As first example, the coloured TAB which many user liked.
We can show the way and users have to do their part...
Rgds
USER_COMPONENTS was updated:
viewtopic.php?p=47854#p47854
Last edited by Pablo César on Wed Nov 23, 2016 2:01 am, edited 2 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Fixed and enhanced SAMPLES
Returning back "Print" which it were without any objective, now it can print the for thry internal HMG function PRINTWINDOW with PREVIEW optional.
So please be reconsidered as updated <HMG_Root_Folder>\include\i_UsrSOOP.ch file and updated USER_COMPONENTS pack for download it again with new options a main menu of Demo1.
See again previous mensage at:
viewtopic.php?p=47854#p47854
So please be reconsidered as updated <HMG_Root_Folder>\include\i_UsrSOOP.ch file and updated USER_COMPONENTS pack for download it again with new options a main menu of Demo1.
See again previous mensage at:
viewtopic.php?p=47854#p47854
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Fixed and enhanced SAMPLES
Hi Rathi and all,
I would like to add more one example for C:\hmg.3.4.3\SAMPLES\Advanced\USER_COMPONENTS.
This time some USER definition for HYPERLINKs and LABELs simulating hyperlink. This example contemplates chnging visual link color when be clicked (as normal browsers does) and address links now it could be for https, www, ErrorLog file (which is in html format), Word files by explorer association or any other document. Of course this example uses a differentiated i_UsrInit.ch file.
I've attached all files for your appreciation.
Hope everyone enjoys
I would like to add more one example for C:\hmg.3.4.3\SAMPLES\Advanced\USER_COMPONENTS.
This time some USER definition for HYPERLINKs and LABELs simulating hyperlink. This example contemplates chnging visual link color when be clicked (as normal browsers does) and address links now it could be for https, www, ErrorLog file (which is in html format), Word files by explorer association or any other document. Of course this example uses a differentiated i_UsrInit.ch file.
I've attached all files for your appreciation.
Hope everyone enjoys
- Attachments
-
- HyperLink.rar
- Source files
- (15.42 KiB) Downloaded 307 times
-
- demo3_exe.rar
- Executable file
- (1.24 MiB) Downloaded 346 times
Last edited by Pablo César on Wed Mar 01, 2017 3:49 pm, edited 1 time in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Fixed and enhanced SAMPLES
Dear Rathi,
There is this folder C:\hmg.3.4.3\SAMPLES\Miscellaneous\PEDIDOS that it could be moved to inside of C:\hmg.3.4.3\SAMPLES\Applications.
Do you agree ?
There is this folder C:\hmg.3.4.3\SAMPLES\Miscellaneous\PEDIDOS that it could be moved to inside of C:\hmg.3.4.3\SAMPLES\Applications.
Do you agree ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Fixed and enhanced SAMPLES
Hi Rathinagiri,
At D:\hmg.3.4.3\SAMPLES\HFCL\ComboSearchBox\DEMO_1\main.hbc and D:\hmg.3.4.3\SAMPLES\HFCL\ComboSearchBox\DEMO_2\main.hbc contain:
At D:\hmg.3.4.3\SAMPLES\HFCL\ComboSearchBox\DEMO_1\main.hbc and D:\hmg.3.4.3\SAMPLES\HFCL\ComboSearchBox\DEMO_2\main.hbc contain:
Which is not necessary any more and not path is not available in this version, correct ? The HBC file would be deleted.incpaths=c:\hmg.3.0.45\hfcl\include
libpaths=
libs=hfcl
gt=
mt=no
instpaths=
No answer to me about it ?Pablo César wrote: ↑Tue Nov 29, 2016 2:59 pm Dear Rathi,
There is this folder C:\hmg.3.4.3\SAMPLES\Miscellaneous\PEDIDOS that it could be moved to inside of C:\hmg.3.4.3\SAMPLES\Applications.
Do you agree ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein