Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #3597 > unrolled thread

Themed RTF Control

Started by"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it>
First post2012-06-12 16:21 +0200
Last post2012-06-14 12:42 +0200
Articles 6 — 4 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  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

#3597 — Themed RTF Control

From"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it>
Date2012-06-12 16:21 +0200
SubjectThemed RTF Control
Message-ID<jr7j9n$75p$1@dont-email.me>
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 

[toc] | [next] | [standalone]


#3598

FromKarl Wochele <kw@e©os-system.de>
Date2012-06-12 16:29 +0200
Message-ID<a3p222FpsjU1@mid.individual.net>
In reply to#3597
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

[toc] | [prev] | [next] | [standalone]


#3603

From"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it>
Date2012-06-13 12:02 +0200
Message-ID<jr9of9$hqj$1@dont-email.me>
In reply to#3598
Very nice, exactly what I wanted. I was even surprised to get an answer so 
quickly. It seems that there are still some VO programmers around... May be 
we should more often put questions or put info on our own.

Thank you

Arne

"Karl Wochele" <kw@e©os-system.de> schrieb im Newsbeitrag 
news:a3p222FpsjU1@mid.individual.net...
> 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 

[toc] | [prev] | [next] | [standalone]


#3604

Fromdlzc <dlzc1@cox.net>
Date2012-06-13 07:04 -0700
Message-ID<e5eebb2e-5948-48ea-a534-c97cc766fa5e@googlegroups.com>
In reply to#3603
Dear Arne Ortlinghaus:

On Wednesday, June 13, 2012 3:02:16 AM UTC-7, Arne Ortlinghaus wrote:
...
> It seems that there are still some VO programmers
> around... May be we should more often put questions
> or put info on our own.

A piggy bank has as much money in it as is put into it.  I don't do VO, but I hover here as a Clipper programmer, to see what is happening, and to help the tiny bit I can.

If you checked in once even a week, we'd all be a little richer for the experience.

David A. Smith

[toc] | [prev] | [next] | [standalone]


#3607

From"Arne Ortlinghaus" <Arne.Ortlinghaus@acs.it>
Date2012-06-14 12:25 +0200
Message-ID<jrce72$174$1@dont-email.me>
In reply to#3604
Yes, normally I try to look in all VO groups once or two a week. I thought 
loud about the amount of news. May be we have to ask something or put 
something more often without having the necessity to show that there are 
still programmers on the world.

Arne

"dlzc" <dlzc1@cox.net> schrieb im Newsbeitrag 
news:e5eebb2e-5948-48ea-a534-c97cc766fa5e@googlegroups.com...
> Dear Arne Ortlinghaus:
>
> On Wednesday, June 13, 2012 3:02:16 AM UTC-7, Arne Ortlinghaus wrote:
> ...
>> It seems that there are still some VO programmers
>> around... May be we should more often put questions
>> or put info on our own.
>
> A piggy bank has as much money in it as is put into it.  I don't do VO, 
> but I hover here as a Clipper programmer, to see what is happening, and to 
> help the tiny bit I can.
>
> If you checked in once even a week, we'd all be a little richer for the 
> experience.
>
> David A. Smith 

[toc] | [prev] | [next] | [standalone]


#3608

FromKarl Faller <k.faller_withoutthat_@onlinehome.de>
Date2012-06-14 12:42 +0200
Message-ID<tmfjt7p8dqj4n8l51r6c2s6m9nadvn0199@4ax.com>
In reply to#3607
Arne,
>Yes, normally I try to look in all VO groups once or two a week. I thought 
>loud about the amount of news. 
one notices that VO is rather "ripe", so it is quite natural, that the
amount of messages has dropped.

>May be we have to ask something 
using Forte Agent for more than a decade, usually i start it in the
morning, hit once CTRL-H and see through all new messages in less the
5 min. For years i hope that they add an interface to those infamous
i-net fora, but alas, the ears are deaf. May be one should/could write
such a thing...

Karl 


>something more often without having the necessity to show that there are 
>still programmers on the world.
>
>Arne
>
>"dlzc" <dlzc1@cox.net> schrieb im Newsbeitrag 
>news:e5eebb2e-5948-48ea-a534-c97cc766fa5e@googlegroups.com...
>> Dear Arne Ortlinghaus:
>>
>> On Wednesday, June 13, 2012 3:02:16 AM UTC-7, Arne Ortlinghaus wrote:
>> ...
>>> It seems that there are still some VO programmers
>>> around... May be we should more often put questions
>>> or put info on our own.
>>
>> A piggy bank has as much money in it as is put into it.  I don't do VO, 
>> but I hover here as a Clipper programmer, to see what is happening, and to 
>> help the tiny bit I can.
>>
>> If you checked in once even a week, we'd all be a little richer for the 
>> experience.
>>
>> David A. Smith 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web