Re: How to minimize a document window via program?

From: [at]} <wolfgang.wimmer{>
Date: Mon, 16 Aug 2004 11:48:58 +0200

----boundary-LibPST-iamunique-826490661_-_-
Content-type: text/plain


Here another way of minimizing, using at the end the same method....

     PROCEDURE Minimize* (); (** minimizes the window in focus **)
          VAR rc: INTEGER; f: Ports.Frame;
     BEGIN
          f := Controllers.FocusFrame();
          IF f # NIL THEN
               rc := WinApi.ShowWindow(f.rider(HostPorts.Rider).port.wnd,
WinApi.SW_SHOWMINIMIZED);
          END
     END Minimize;

     PROCEDURE MinimizeAll* (); (** minimizes whole Blackbox **)
          VAR rc: INTEGER; f: Ports.Frame; hc,hm: WinApi.HWND;
     BEGIN
          f := Controllers.FocusFrame();
          IF f # NIL THEN
               hc := WinApi.GetParent(f.rider(HostPorts.Rider).port.wnd);
(* client window *)
               hm := WinApi.GetParent(hc);
          (* frame (main) window *)
               rc := WinApi.ShowWindow(hm, WinApi.SW_SHOWMINIMIZED);
          END
     END MinimizeAll;

Kind regards
Wolfgang


Message from Rene Krywult <rene.krywult{([at]})nowhere.xy
23:32
                                                                                                           
                                                                                                           
             2004-08-15 Rene Krywult <rene.krywult{([at]})nowhere.xy
               23:32
                             Sent by Rene Krywult <rene.krywult{([at]})nowhere.xy
                                                                                                           
                                                                                                           

                                                                                                         
                                                                                                         
                           To: Blackbox <blackbox{([at]})nowhere.xy
                           cc:
                           Subject: Re: How to minimize a document window via program?
                                                                                                         



Helmut,

If you have the Ports.Frame, do the following:

windowsstruct:=frame.rider(HostPorts.Rider).port.wnd;
WinApi.SetWindowLong(windowsstruct, WinApi.GWL_STYLE,WinApi.WS_MINIMIZE).;

This SHOULD do the trick, though I didn't try it out.

Rene

>Dear BlackBox User,
>
>every document window inside BlackBox have in the header line on the right
>side 3 icons: _ [] X (minimize, maximize & close).
>
>Does anybody know how to minimize a BlackBox document window via a
Component
>Pascal program?
>
>Any help and succession are welcome. Thank you in advance.
>
>Regards ^
> /v\
>Helmut Zinn /vvv\
> /vvvvv\
> /+-----+\
> | |
> \|||/ | {([at]})nowhere.xy
> (o o) | |
>---ooO-(_)-Ooo--w-w-w-| {([at]})nowhere.xy
> | |
> | {([at]})nowhere.xy
> | |
>----------------------+-----+
>Have a look at http://www.zinnamturm.de
>Send your answer and comments to mailto:cpc{([at]})nowhere.xy
>
>

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

To unsubscribe from this mailing list, send a message containing the word
"unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage,
send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the
list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to
the mailing list. That way, the list server will recognize you as
subscriber and forward your posting immediately, without creating any
overhead.

b) If, for some reason, you cannot post from the address, by which you are
subscribed, your message will be moderated to avoid spam. Please understand
that moderation will often cause some delay, in particular over weekends or
holydays.




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

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-826490661_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9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ZGVyKEhvc3RQb3J0cy5SaWRlcikucG9ydC53bmQp
O1xwYXINCigqIGNsaWVudCB3aW5kb3cgKilccGFyDQogICAgICAgICAgICAgICBobSA6PSBXaW5B
cGkuR2V0UGFyZW50KGhjKTtccGFyDQogICAgICAgICAgKCogZnJhbWUgKG1haW4pIHdpbmRvdyAq
KVxwYXINCiAgICAgICAgICAgICAgIHJjIDo9IFdpbkFwaS5TaG93V2luZG93KGhtLCBXaW5BcGku
U1dfU0hPV01JTklNSVpFRCk7XHBhcg0KICAgICAgICAgIEVORFxwYXINCiAgICAgRU5EIE1pbmlt
aXplQWxsO1xwYXINClxwYXINCktpbmQgcmVnYXJkc1xwYXINCldvbGZnYW5nXHBhcg0KXHBhcg0K
XHBhcg0KTWVzc2FnZSBmcm9tIFJlbmUgS3J5d3VsdCA8cmVuZS5rcnl3dWx0QGFvbi5hdD4gcmVj
ZWl2ZWQgb24gMjAwNC0wOC0xNVxwYXINCjIzOjMyXHBhcg0KICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBccGFyDQogICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxwYXINCiAgICAgICAgICAgICAyMDA0LTA4LTE1
ICAgICAgUmVuZSBLcnl3dWx0IDxyZW5lLmtyeXd1bHRAYW9uLmF0PiAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgXHBhcg0KICAgICAgICAgICAgICAgMjM6MzIgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICBccGFyDQogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIFNlbnQgYnkgUmVuZSBLcnl3dWx0IDxyZW5lLmtyeXd1bHRAYW9uLmF0PiAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIFxwYXINCiAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgXHBhcg0KICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBccGFyDQpccGFyDQogICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICBccGFyDQogICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBccGFyDQogICAgICAgICAgICAgICAgICAgICAgICAgICBU
bzogICAgIEJsYWNrYm94IDxibGFja2JveEBvYmVyb24uY2g+ICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICBccGFyDQogICAgICAgICAgICAgICAgICAgICAgICAgICBjYzog
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBccGFyDQogICAgICAgICAgICAgICAgICAgICAgICAgICBTdWJqZWN0
OiAgICAgUmU6IEhvdyB0byBtaW5pbWl6ZSBhIGRvY3VtZW50IHdpbmRvdyB2aWEgcHJvZ3JhbT8g
ICAgICAgICAgICAgICBccGFyDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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ZSB3aWxs
IGJlIG1vZGVyYXRlZCB0byBhdm9pZCBzcGFtLiBQbGVhc2UgdW5kZXJzdGFuZCB0aGF0IG1vZGVy
YXRpb24gd2lsbCBvZnRlbiBjYXVzZSBzb21lIGRlbGF5LCBpbiBwYXJ0aWN1bGFyIG92ZXIgd2Vl
a2VuZHMgb3IgaG99fQBzdGFuZCB0aGF0IA==


----boundary-LibPST-iamunique-826490661_-_---
Received on Mon Aug 16 2004 - 11:48:58 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:40 UTC