Page 2 of 2
Re: DLL Call Question
Posted: Mon Oct 28, 2019 10:54 pm
by AUGE_OHR
mol wrote: ↑Mon Oct 28, 2019 2:21 pm
can you post working sample?
here it is
open Notepad and type some Text and leave it open
start with
now you can see how Color of Notepad is change

- Notepad_Color.jpg (28.19 KiB) Viewed 2625 times
! Note : Color are for ALL Apps. it will stay until re-Login
Re: DLL Call Question
Posted: Tue Oct 29, 2019 6:19 am
by mol
thanks!
Re: DLL Call Question
Posted: Tue Oct 29, 2019 6:21 am
by mol
KDJ wrote: ↑Mon Oct 28, 2019 7:54 pm
mol wrote: ↑Mon Oct 28, 2019 2:22 pm
Do you know the way how to change parametrs of scroolbar? Is it possible to make it wider with bigger arrow buttons?
Hi
Marek
I guess you mean the build-in scrollbars in ListView control.
Theoretically it is possible, but quite difficult to realize.
And it seems to me that in HMG it is even impossible.
I know how to create my own scrollbar, but I don't know, how to attach it to control - in my case to Panel window.
Re: DLL Call Question
Posted: Tue Oct 29, 2019 12:30 pm
by AUGE_OHR
KDJ wrote: ↑Mon Oct 28, 2019 7:54 pm
I guess you mean the build-in scrollbars in ListView control.
Theoretically it is possible, but quite difficult to realize.
i try to get "internal" Scrollbar from WC_Listview for Darkmode but i did not found it ...
so i disable "internal" Scrollbar an wrote my own Schrollbar.
---
my own Scrollbar send a User-Def Event and nPercent of Scrollbar to my own WC_Listview
Code: Select all
PostAppEvent(my_Scroll, ::nPercent,, oListview)
in my Listview i got User-Def Event and calculate Record.
Code: Select all
Case nEvent = my_Scroll
nRec := CalcRec(mp1) // Calc REC from nPercent
GoTo(nRec)
instead of Record you also can calculate Size of Control or somethings else.
---
those "internal" Scrollbar appear when ClientArea > Window Size.
so if you use a WC_Static which is bigger than its parent Windows you will get a Scrollbar.
Re: DLL Call Question
Posted: Tue Oct 29, 2019 2:06 pm
by mol
Do you have working sample in hmg?
Re: DLL Call Question
Posted: Tue Oct 29, 2019 8:31 pm
by KDJ
AUGE_OHR wrote: ↑Tue Oct 29, 2019 12:30 pm
i try to get "internal" Scrollbar from WC_Listview for Darkmode but i did not found it ...
so i disable "internal" Scrollbar an wrote my own Schrollbar.
How do you disable internal ScrollBar in ListView (Grid) control?
Re: DLL Call Question
Posted: Tue Oct 29, 2019 9:00 pm
by KDJ
AUGE_OHR wrote: ↑Mon Oct 28, 2019 3:03 am
show me how HMG SETSYSCOLORS work
Code: Select all
#include "hmg.ch"
#define COLOR_WINDOW 5
FUNCTION Main()
LOCAL nRGB := GetSysColor(COLOR_WINDOW)
//current color RGB
MsgBox(hb_NumToHex(nRGB, 6))
//change color (.T. if success)
MsgBox(SetSysColors(COLOR_WINDOW, 0x0000FF /*red*/))
//new color RGB
MsgBox(hb_NumToHex(GetSysColor(COLOR_WINDOW), 6))
//restore the previous color
MsgBox(SetSysColors(COLOR_WINDOW, nRGB))
RETURN NIL