Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #3598
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Karl Wochele <kw@e﹐s-system.de> |
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Themed RTF Control |
| Date | Tue, 12 Jun 2012 16:29:22 +0200 |
| Lines | 76 |
| Message-ID | <a3p222FpsjU1@mid.individual.net> (permalink) |
| References | <jr7j9n$75p$1@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net yLlNSb7NTz+6WgAd9j9Xjg6q/ggafKyrjlw9wu6MN17wW3a4CLHLtKKx9500gWH3Dh |
| Cancel-Lock | sha1:hziTAOWO8KM5sDStpkcEO8wHTJk= |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 |
| In-Reply-To | <jr7j9n$75p$1@dont-email.me> |
| Xref | csiph.com comp.lang.clipper.visual-objects:3598 |
Show key headers only | View raw
Hi Arne,
you can try
CLASS MyRichEdit INHERIT RichEdit
METHOD Dispatch(oEvent) CLASS MyRichEdit
LOCAL liRt AS LONGINT
LOCAL hDC AS PTR
LOCAL rc IS _WINRECT
LOCAL hTheme AS PTR
LOCAL rcm AS _WinRect
DO CASE
CASE oEvent:message == WM_NCCALCSIZE
IF IsThemed()
hTheme := OpenThemeData(SELF:handle(),"EDIT")
IF hTheme <> NULL_PTR
hDC := GetDC(SELF:Owner:handle())
rcm := PTR(_CAST,oEvent:lParam)
SetRect(@rc,rcm.Left,rcm.TOp,rcm.right,rcm.bottom)
rcm.Left := rc.Left+1
rcm.TOp := rc.TOp+1
rcm.right := rc.right-GetSystemMetrics(SM_CXVSCROLL)-1
rcm.bottom := rc.bottom-1
IF _AND(SELF:dwStyle,WS_HSCROLL) = WS_HSCROLL
rcm.bottom := rc.bottom-GetSystemMetrics(SM_CYHSCROLL)
ENDIF
ReleaseDC(SELF:Owner:handle(), hDC)
CloseThemeData(hTheme)
liRt := 1
SELF:EventReturnValue := 0
ENDIF
ENDIF
IF liRt = 0
liRt := SUPER:Dispatch(oEvent)
ENDIF
CASE oEvent:message = WM_NCPAINT
IF IsThemed()
hTheme := OpenThemeData(SELF:handle(),"EDIT")
IF hTheme <> NULL_PTR
hDC := GetWindowDC(SELF:handle())
GetWindowRect(SELF:handle(),@rc)
rc.right -= rc.Left
rc.bottom -= rc.TOp
rc.Left := 0
rc.TOp := 0
ExcludeClipRect(hDC, rc.Left+1, rc.TOp+1, rc.right-1, rc.bottom-1)
DrawThemeBackground(hTheme,hDC,EP_EDITTEXT,ETS_NORMAL,@rc,0)
ReleaseDC(SELF:handle(),hDC)
CloseThemeData(hTheme)
liRt := 1
SELF:EventReturnValue := 0
ENDIF
ENDIF
IF liRt = 0
liRt := SUPER:Dispatch(oEvent)
ENDIF
OTHERWISE
liRt := SUPER:Dispatch(oEvent)
ENDCASE
RETURN liRt
HTH
Karl
Am 12.06.2012 16:21, schrieb Arne Ortlinghaus:
> Until now the rtf controls in my apps are displayed in the old way
> (sunken threedimensional border). Changing ws_border, ... does not
> influence the control. Has someone made changes that the border is
> rendered according to the XP themes?
>
> Arne Ortlinghaus
> ACS Data Systems
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Themed RTF Control "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2012-06-12 16:21 +0200
Re: Themed RTF Control Karl Wochele <kw@e©os-system.de> - 2012-06-12 16:29 +0200
Re: Themed RTF Control "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2012-06-13 12:02 +0200
Re: Themed RTF Control dlzc <dlzc1@cox.net> - 2012-06-13 07:04 -0700
Re: Themed RTF Control "Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it> - 2012-06-14 12:25 +0200
Re: Themed RTF Control Karl Faller <k.faller_withoutthat_@onlinehome.de> - 2012-06-14 12:42 +0200
csiph-web