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


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

How to trap resize of a splitwindow?

Started byD.J.W. van Kooten <public@ic2remove.this.com>
First post2013-09-03 14:10 +0200
Last post2013-09-05 10:23 +0200
Articles 6 — 4 participants

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


Contents

  How to trap resize of a splitwindow? D.J.W. van Kooten <public@ic2remove.this.com> - 2013-09-03 14:10 +0200
    Re: How to trap resize of a splitwindow? Malcolm G <malcolm-news2012delete@delete.jobstream.com> - 2013-09-03 13:40 +0100
      Re: How to trap resize of a splitwindow? D.J.W. van Kooten <public@ic2remove.this.com> - 2013-09-03 15:11 +0200
    Re: How to trap resize of a splitwindow? "Wolfgang Riedmann" <wriedmann@gmail.com> - 2013-09-03 16:09 +0200
    Re: How to trap resize of a splitwindow? Mathias <mathias.hakansson@consultec.se> - 2013-09-04 22:57 -0700
      Re: How to trap resize of a splitwindow? D.J.W. van Kooten <public@ic2remove.this.com> - 2013-09-05 10:23 +0200

#5768 — How to trap resize of a splitwindow?

FromD.J.W. van Kooten <public@ic2remove.this.com>
Date2013-09-03 14:10 +0200
SubjectHow to trap resize of a splitwindow?
Message-ID<vsjb29h0bln46lujqeto2ssatgq8q8n1fe@4ax.com>
After having read 15 years of messages in this NG about this subject,
I still didn't find a way to trap resizing a splitwindow. See the code
I tried below. None of the events are fired after I resize a
splitwindow except WM_PAINT in the Expose. But this is strangely
enough only called the 2nd time I resize (and after that every time).

I found a trick to redisplay OLE content in one of the panes of a
splitwindow and it needs to be called again when I resize the window.
But the nearest I come to this solution is only after the second
resize...

Dick

METHOD Dispatch(oEvent) CLASS DocSplit

	DO	CASE

	CASE oEvent:Message == WM_WINDOWPOSCHANGED .OR. oEvent:Message
== WM_CAPTURECHANGED // .AND. !SELF:lIsResizing
		_DebOut32(PSZ("WINDOWPOSCHANGED via dispatch"))		
	CASE oEvent:Message == WM_SIZING
		_DebOut32(PSZ("Sizing via dispatch"))

	CASE oEvent:Message == WM_EXITSIZEMOVE
		_DebOut32(PSZ("Exitmove via dispatch"))
	
	CASE oEvent:Message=WM_SIZE
		_DebOut32(PSZ("WMSize"))
	CASE oEvent:Message=WM_LBUTTONDOWN
		SELF:lDown:=TRUE
		_DebOut32(PSZ("LButtonUp"))
	
	CASE oEvent:Message=WM_LBUTTONUP
		_DebOut32(PSZ("LButtonDown"))
		SELF:lDown:=FALSE
	
	CASE oEvent:Message=WM_MOUSEMOVE
		_DebOut32(PSZ("MouseMove"))
	ENDCASE

RETURN SUPER:Dispatch(oEvent)

METHOD Expose	(oExposeEvent)	CLASS DocSplit
	SUPER:Expose(oExposeEvent)
	DO CASE
		
	CASE oExposeEvent:Message == WM_SIZING
			_Debout32(PSZ("sizing via expose"))
	CASE oExposeEvent:Message == WM_PAINT // Only this one is
fired
		_Debout32(PSZ("paint via expose"))
	CASE oExposeEvent:Message == WM_EXITSIZEMOVE
		_DebOut32(PSZ("Exitmove via expose"))
	CASE oExposeEvent:Message=WM_SIZE
		_DebOut32(PSZ("WMSize"))
	CASE oExposeEvent:Message=WM_LBUTTONDOWN
		SELF:lDown:=TRUE
		_DebOut32(PSZ("LButtonUp"))
	ENDCASE	
RETURN NIL

[toc] | [next] | [standalone]


#5769

FromMalcolm G <malcolm-news2012delete@delete.jobstream.com>
Date2013-09-03 13:40 +0100
Message-ID<kNkVt.62078$iy6.5510@fx12.am4>
In reply to#5768
On 03/09/2013 13:10, D.J.W. van Kooten wrote:
> After having read 15 years of messages in this NG about this subject,
> I still didn't find a way to trap resizing a splitwindow. See the code
> I tried below. None of the events are fired after I resize a
> splitwindow except WM_PAINT in the Expose. But this is strangely
> enough only called the 2nd time I resize (and after that every time).

For clarity which sort of resize?
Resize of the split window or resize of the children of the split window
by moving the divider?

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


#5770

FromD.J.W. van Kooten <public@ic2remove.this.com>
Date2013-09-03 15:11 +0200
Message-ID<1hnb29lkgdlgb0iq5v14eds5nbmg7ub5hb@4ax.com>
In reply to#5769
On Tue, 03 Sep 2013 13:40:48 +0100, Malcolm G
<malcolm-news2012delete@delete.jobstream.com> wrote:

>On 03/09/2013 13:10, D.J.W. van Kooten wrote:
>> After having read 15 years of messages in this NG about this subject,
>> I still didn't find a way to trap resizing a splitwindow. See the code
>> I tried below. None of the events are fired after I resize a
>> splitwindow except WM_PAINT in the Expose. But this is strangely
>> enough only called the 2nd time I resize (and after that every time).

Hello Malcolm,

>For clarity which sort of resize?
>Resize of the split window or resize of the children of the split window
>by moving the divider?

The second. I drag the divider and this only seems to generate the
WM_PAINT event in Expose but starting only the second time I move....

Dick

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


#5771

From"Wolfgang Riedmann" <wriedmann@gmail.com>
Date2013-09-03 16:09 +0200
Message-ID<b8m8shFo3iiU1@mid.individual.net>
In reply to#5768
Hi Dick,

> After having read 15 years of messages in this NG about this subject,
> I still didn't find a way to trap resizing a splitwindow. 

normally, resizing of the SplitWindow itself is useless, as also moving
the dividers changes the contained controls/windows.

Therefore I trap the resizing events of the contained elements, and if
needed, I pass them up to the SplitWindow.

Unfortunately, SplitWindows do not behave as other VO windows, as they
are defined in the CA DLLs, and not well integrated in the GUI classes.

So sometimes I cannot place a control directly on the SplitWindow, but
need to put a DialogWindow in the middle.

Wolfgang



-- 

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


#5803

FromMathias <mathias.hakansson@consultec.se>
Date2013-09-04 22:57 -0700
Message-ID<17ac32da-fcfb-4b18-a326-3d52c4c11897@googlegroups.com>
In reply to#5768
Hi Dick,

what are you trying to do? The Controls/windows contained in a splitwindow resizes and redraw themselves as you move the divider. What more do you want it to do?

/Mathias

Den tisdagen den 3:e september 2013 kl. 14:10:08 UTC+2 skrev D. J. W. van Kooten:
> After having read 15 years of messages in this NG about this subject,
> 
> I still didn't find a way to trap resizing a splitwindow. See the code
> 
> I tried below. None of the events are fired after I resize a
> 
> splitwindow except WM_PAINT in the Expose. But this is strangely
> 
> enough only called the 2nd time I resize (and after that every time).
> 
> 
> 
> I found a trick to redisplay OLE content in one of the panes of a
> 
> splitwindow and it needs to be called again when I resize the window.
> 
> But the nearest I come to this solution is only after the second
> 
> resize...
> 
> 
> 
> Dick
> 
> 
> 
> METHOD Dispatch(oEvent) CLASS DocSplit
> 
> 
> 
> 	DO	CASE
> 
> 
> 
> 	CASE oEvent:Message == WM_WINDOWPOSCHANGED .OR. oEvent:Message
> 
> == WM_CAPTURECHANGED // .AND. !SELF:lIsResizing
> 
> 		_DebOut32(PSZ("WINDOWPOSCHANGED via dispatch"))		
> 
> 	CASE oEvent:Message == WM_SIZING
> 
> 		_DebOut32(PSZ("Sizing via dispatch"))
> 
> 
> 
> 	CASE oEvent:Message == WM_EXITSIZEMOVE
> 
> 		_DebOut32(PSZ("Exitmove via dispatch"))
> 
> 	
> 
> 	CASE oEvent:Message=WM_SIZE
> 
> 		_DebOut32(PSZ("WMSize"))
> 
> 	CASE oEvent:Message=WM_LBUTTONDOWN
> 
> 		SELF:lDown:=TRUE
> 
> 		_DebOut32(PSZ("LButtonUp"))
> 
> 	
> 
> 	CASE oEvent:Message=WM_LBUTTONUP
> 
> 		_DebOut32(PSZ("LButtonDown"))
> 
> 		SELF:lDown:=FALSE
> 
> 	
> 
> 	CASE oEvent:Message=WM_MOUSEMOVE
> 
> 		_DebOut32(PSZ("MouseMove"))
> 
> 	ENDCASE
> 
> 
> 
> RETURN SUPER:Dispatch(oEvent)
> 
> 
> 
> METHOD Expose	(oExposeEvent)	CLASS DocSplit
> 
> 	SUPER:Expose(oExposeEvent)
> 
> 	DO CASE
> 
> 		
> 
> 	CASE oExposeEvent:Message == WM_SIZING
> 
> 			_Debout32(PSZ("sizing via expose"))
> 
> 	CASE oExposeEvent:Message == WM_PAINT // Only this one is
> 
> fired
> 
> 		_Debout32(PSZ("paint via expose"))
> 
> 	CASE oExposeEvent:Message == WM_EXITSIZEMOVE
> 
> 		_DebOut32(PSZ("Exitmove via expose"))
> 
> 	CASE oExposeEvent:Message=WM_SIZE
> 
> 		_DebOut32(PSZ("WMSize"))
> 
> 	CASE oExposeEvent:Message=WM_LBUTTONDOWN
> 
> 		SELF:lDown:=TRUE
> 
> 		_DebOut32(PSZ("LButtonUp"))
> 
> 	ENDCASE	
> 
> RETURN NIL

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


#5804

FromD.J.W. van Kooten <public@ic2remove.this.com>
Date2013-09-05 10:23 +0200
Message-ID<orfg29d4h2cqfs63do9kbp173ja1h2rjcs@4ax.com>
In reply to#5803
On Wed, 4 Sep 2013 22:57:58 -0700 (PDT), Mathias
<mathias.hakansson@consultec.se> wrote:

Hello Mathias,
>
>what are you trying to do? 
>The Controls/windows contained in a splitwindow resizes and redraw themselves as you move the divider. What more do you want it to do?
>
After some more investigation I have now concluded that the first time
I drag the splitwindow to another size, my OLE content is NOT
refreshed (which is consistent with the fact that the WM_PAINT event
is not fired the first time either). I then see for example the
enlarged content and the old content in the center. After that I can
indeed resize and the content is refreshed.

I guess that this is a bug in the VO code and as I've once understood
that the whole source code of the splitwindow libs was lost, it
doesn't seem to be anything which can be solved.

Dick

[toc] | [prev] | [standalone]


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


csiph-web