i'm searching for Ruler as App using harbour / HMG like this do some one have made it an can share some Code

Moderator: Rathinagiri
Grigory or any master in C can adopt in HMGCarlos Britos wrote: ↑Thu Jan 09, 2020 12:51 pm hope this can help you.
source code.C is in zip
ruler.zip
Refer GridPlus,you will find Function DrawScaleAUGE_OHR wrote: i'm searching for Ruler as App using harbour / HMG like this
have made simple "pure" HMG_Ruler include Source and Icon as Resource.
Code: Select all
/* Toggle window properties
Example:
A. To turn off (disable) the Maximise button:
SetWindowPropertyOff( oDlg, WS_MAXIMIZEBOX )
B. To turn off (disable) the Minimise button:
SetWindowPropertyOff( oDlg, WS_MINIMIZEBOX )
C. To turn off the max and min buttons:
SetWindowPropertyOff( oDlg, WS_MAXIMIZEBOX+WS_MINIMIZEBOX )
Notes:
Sample A only disables the maximise button.
Sample B only disables the minimise button.
Sample C actually removes the minimise and maximise buttons.
The inference here is that one cannot exist without the other.
*/
Function SetWindowPropertyOff( oWin, nProperties, lOnOff )
local nPtr
local i
DEFAULT lOnOff to FALSE // toggle=off
nPtr := GetWindowLongA( oWin:getHWnd(), GWL_STYLE )
for i := 1 to 32
if nProperties[i]
nPtr[i] := lOnOff
endif
next
SetWindowLongA( oWin:getHWnd(), GWL_STYLE, nPtr )
return Nil
DLLFUNCTION GetWindowLongA( nHwnd, nStyle ) USING STDCALL FROM User32.dll
DLLFUNCTION SetWindowLongA( nHwnd, nStyle, nPtr ) USING STDCALL FROM User32.dll