IonicWind Software

IWBasic => General Questions => Topic started by: Andy on May 21, 2021, 04:49:06 AM

Title: Getting a static control's styles
Post by: Andy on May 21, 2021, 04:49:06 AM
Hi,

Well I'm wondering if I have a static control with say the italics style how I would get that italic style from the control?

I'm guessing it's something like...

dwStyles = My static control

If dwStyles & ss_italics?
  PRINT "Has itailics"
Endif

Help please.
Andy.
Title: Re: Getting a static control's styles
Post by: LarryMc on May 21, 2021, 10:03:22 AM
CONST GWL_STYLE = (-16)
DEF hwnd as UINT

hwnd = GetDlgItem(win.hwnd,id)
dwStyles = GetWindowLongA(hwnd,GWL_STYLE)

If dwStyles & ss_italics?
  PRINT "Has itailics"
Endif
Title: Re: Getting a static control's styles
Post by: Andy on May 22, 2021, 04:50:52 AM
Thanks Larry!

Andy.
 :)