DLL Call Question

Discuss anything else that does not suite other forums.

Moderator: Rathinagiri

User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: DLL Call Question

Post by AUGE_OHR »

mol wrote: Mon Oct 28, 2019 2:21 pm can you post working sample?
here it is
DEMO1.ZIP
(576 Bytes) Downloaded 169 times
open Notepad and type some Text and leave it open

start with

Code: Select all

c:\hmg.3.4.4\build.bat demo1
now you can see how Color of Notepad is change
Notepad_Color.jpg
Notepad_Color.jpg (28.19 KiB) Viewed 2626 times
! Note : Color are for ALL Apps. it will stay until re-Login
have fun
Jimmy
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: DLL Call Question

Post 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.
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: DLL Call Question

Post 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.
have fun
Jimmy
User avatar
mol
Posts: 3825
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: DLL Call Question

Post by mol »

Do you have working sample in hmg?
KDJ
Posts: 243
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland

Re: DLL Call Question

Post 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?
KDJ
Posts: 243
Joined: Mon Sep 05, 2016 3:04 am
Location: Poland

Re: DLL Call Question

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