Including windows controls in an area on Windows Platform

View: New views
4 Messages — Rating Filter:   Alert me  

Including windows controls in an area on Windows Platform

by Andreas Menzi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I want to add a scrollbar to an area. I do this by creating a windows control with the CreateWindow function. When the window containing the area is opened, the scrollbars aren't visible. When I resize the window, I can see the scrollbars flickering. When the window is resized, the scrollbars disappear. How can I ensure that the scrollbars are visible within the area??

Re: Including windows controls in an area on Windows Platform

by Rob Laveaux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 18 mei 2009, at 15:44, Andreas Menzi wrote:

> I want to add a scrollbar to an area. I do this by creating a  
> windows control
> with the CreateWindow function. When the window containing the area is
> opened, the scrollbars aren't visible. When I resize the window, I  
> can see
> the scrollbars flickering. When the window is resized, the scrollbars
> disappear. How can I ensure that the scrollbars are visible within the
> area??

Make sure you call PA_SetPluginAreaClipMode.

/*
        On Windows 4D allocates an offscreen port and ask form objects,
        including plugins, to draw inside. Then the offscreen is blittered on  
screen.

        This may be a problem for plugin areas that cannot draw themselves in  
an offscreen.
        These plugins should inform 4D so that the offscreen is not blittered  
over their area,
        by calling PA_SetPluginAreaClipMode( ref, 1);
       
        pluginRef is your plugin data handle you provided at plugin area  
creation.
        set clipChildren to 1 to ask 4D not to draw over your plugin area.
        set clipChildren to 0 to restore normal behavior
        fError is non-zero if no plugin area with specified ref could be found.
*/

HTH,

- Rob Laveaux

--------------------------------------------------------
Pluggers Software
Bleriotlaan 62
2497 BM  Den Haag
The Netherlands

Email: rob.laveaux@...
Website: http://www.pluggers.nl

--------------------------------------------------------



**********************************************************************
4D Plugins hosted by 4D, Inc.                      http://www.4D.com/

    Did you know?  The 4D Partner Program now gives you
    access to Hotfix releases as soon as they are available!
    To learn more, go to http://www.4D.com/support/partner.html

To Unsubscribe:                      mailto:4D-Plugins-off@...
***********************************************************************


Re: Including windows controls in an area on Windows Platform

by Andreas Menzi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the tip. The only problem I have now is that the plugin area does not get a window focus event. If the window containing my area is behind another window and then gets the focus, I do not receive an update event. Do you have an idea how to handle that? Waiting for an idle event is a bit a waste of time.


Rob Laveaux wrote:
On 18 mei 2009, at 15:44, Andreas Menzi wrote:

> I want to add a scrollbar to an area. I do this by creating a  
> windows control
> with the CreateWindow function. When the window containing the area is
> opened, the scrollbars aren't visible. When I resize the window, I  
> can see
> the scrollbars flickering. When the window is resized, the scrollbars
> disappear. How can I ensure that the scrollbars are visible within the
> area??

Make sure you call PA_SetPluginAreaClipMode.

/*
        On Windows 4D allocates an offscreen port and ask form objects,
        including plugins, to draw inside. Then the offscreen is blittered on  
screen.

        This may be a problem for plugin areas that cannot draw themselves in  
an offscreen.
        These plugins should inform 4D so that the offscreen is not blittered  
over their area,
        by calling PA_SetPluginAreaClipMode( ref, 1);
       
        pluginRef is your plugin data handle you provided at plugin area  
creation.
        set clipChildren to 1 to ask 4D not to draw over your plugin area.
        set clipChildren to 0 to restore normal behavior
        fError is non-zero if no plugin area with specified ref could be found.
*/

HTH,

- Rob Laveaux

--------------------------------------------------------
Pluggers Software
Bleriotlaan 62
2497 BM  Den Haag
The Netherlands

Email: rob.laveaux@pluggers.nl
Website: http://www.pluggers.nl

--------------------------------------------------------



**********************************************************************
4D Plugins hosted by 4D, Inc.                      http://www.4D.com/

    Did you know?  The 4D Partner Program now gives you
    access to Hotfix releases as soon as they are available!
    To learn more, go to http://www.4D.com/support/partner.html

To Unsubscribe:                      mailto:4D-Plugins-off@info.4D.com
***********************************************************************

Re: Including windows controls in an area on Windows Platform

by Rob Laveaux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 28 mei 2009, at 13:49, Andreas Menzi wrote:

> Thanks for the tip. The only problem I have now is that the plugin  
> area does
> not get a window focus event. If the window containing my area is  
> behind
> another window and then gets the focus, I do not receive an update  
> event. Do
> you have an idea how to handle that? Waiting for an idle event is a  
> bit a
> waste of time.

Have you tried installing your own WNDPROC (using SetWindowLong)?
That way you can install your own event handler.

HTH,

- Rob Laveaux

--------------------------------------------------------
Pluggers Software
Bleriotlaan 62
2497 BM  Den Haag
The Netherlands

Email: rob.laveaux@...
Website: http://www.pluggers.nl

--------------------------------------------------------



**********************************************************************
4D Plugins hosted by 4D, Inc.                      http://www.4D.com/

    Register for 4D Summit 2009 Today
    Early Bird Pricing Ends August 28th - http://www.4D.com/summit

To Unsubscribe:                      mailto:4D-Plugins-off@...
***********************************************************************