Andrew Jensen wrote:
I have searched the SDK, spent a lot of time moving up and down paths using Xray, and keep coming up dry.

All I want to do is create a maximized window, actually not create it, I wan't to maximize an open window. Not one that is the same size as the desktop, a Maximized window state.

If there really is no such thing in the API, then how do I get a Hwnd, I saw mention of it once but now can't find it, to a top level window so that I can call a win32 function. Kind of hate to make this OS specific however.

You are right ... currently there is no function on the window API to maximize nor minimize a toolkit window.

May be we should change that next time it's possible.
But you can retrieve the native window handle (e.g. HWND on windows).

Cast the window to the interface css.awt.XSystemDependentWindowPeer
and call it's method getWindowHandle(). The parameter ProcessId can be ignored (use an empty array) ... but the second parameter SystemType must be from type css.lang.SystemDependent.

The return value itselfs depend from the used SystemType parameter.
Please read the document of the interface.

Here a basic macro, which shows the needed steps:

sub maximize

        frame  = StarDesktop.getActiveFrame()
        window = frame.getContainerWindow()
        handle = window.getWindowHandle(dimarray(), 1) ' 1=WIN32
        msgbox handle

end sub




Any help would really be appreciated.

From:
OpenOffice.org 2.0 Office Suite
Guide to New Features
*Quote:*

testtool: new commands to min/max/restore windows


Quality Assurance


Added the following methods for Document-Windows + .Close + BOOL .IsMax + BOOL .IsMin + BOOL .IsRestore + .Minimize + .Maximize + .Restore.



Drew Jensen

Guanahani - not Ahmedabad...only missed it by that much.. ~ Chris. Columbus


Regards
Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to