MDICLIENT Border (Form Designer(10+))
At 30 DEC 2019 12:37:10PM Donald Bakke wrote:
In OI 9, we could put a nice 3D border around the MDICLIENT area using the Raw Style Bits dialog (specifically, the WS_EX_CLIENTEDGE style). In OI 10 I can't find any properties that exposes this bit and the Raw Style Bits dialog no long exists (AFAIK). Is there a way to restore this style via the UI?
At 04 JAN 2020 01:18PM Carl Pates wrote:
Hi Don,
Not at present I'm afraid.
Thanks,
At 04 JAN 2020 01:33PM Donald Bakke wrote:
Hi Carl,
I appreciate the official response. No worries. I had assumed as much and coded it myself. For others who want to accomplish the same:
Equ WS_EX_CLIENTEDGE$ To 512 Style = Get_Property( @Window:".MDICLIENT", "STYLE_EX" ) If Style[1, 2] _EQC "0x" Then Convert @Lower_Case To @Upper_Case In Style Style = Iconv( Style[3, 99], "MX" ) End Style = BitOr( Style, WS_EX_CLIENTEDGE$ ) Set_Property( Window:".MDICLIENT", "STYLE_EX", Style )
At 06 JAN 2020 05:04AM Carl Pates wrote:
Hi Don,
FYI - you can make that snippet a little more concise in v10 if you use the STYLEEXN (numeric STYLEEX) property: like so:
Equ WS_EX_CLIENTEDGE$ To 512 Style = Get_Property( @Window:".MDICLIENT", "STYLEEXN" ) Style = BitOr( Style, WS_EX_CLIENTEDGE$ ) Set_Property( Window:".MDICLIENT", "STYLEEXN", Style )Similarly there's numeric versions of the other style properties too:
STYLEN
PSSTYLEN
PSSTYLEXN
(I got fed up of writing code to chop off the hex notation prefix…)
Regards
At 06 JAN 2020 04:13PM Donald Bakke wrote:
Hi Carl,
Good stuff to know. Unfortunately, I have to write my code to be compatible with OI 9 and OI 10. I do have some places where I'm branching based on the OI version but wherever possible I'm writing version independent code.