
Minimize on Startup(Again)
Quote:
> I'm assuming you're using OWL for this, my replies are based on that
> assumption.
Yes I am.
Quote:
> How are you trying to do this now? If I were to do such I would save
> the state in an .INI file, read that file when my App starts, and
> override the Init constructor to add that style to the
> TApplication.Attr field.
Below is a snippit of code that I currently have in the Init section of my
main application window object definitions.
constructor TMainWindow.Init(AParent: PWindowsObject; ATitle: PChar);
begin
if WinMinimized then
Attr.Param := Attr.Param or ws_Minimize;
TDlgWindow.Init(AParent, ATitle);
end;
This doesn't work either, even after I did as you suggested. the WinMinimized
flag is True if the application was iconized on termination. Otherwise it is
False. Unfortunately, the window still comes up in its original style. Did I
misinterpret something you said earlier?
Quote:
> If your window is based on TDlgWindow then this is a known "bug" in
> OWL where the ProcessAccels method of TApplication never gets called
> because ProcessDlgMsg() is called first and it swallows the
> accelerator messages; the simple solution is to override the
> ProcessAppMsg() method like so:
> function TMyApplication.ProcessAppMsg( var Message : TMsg ): boolean; virtual;
> begin
> ProcessAppMsg := ProcessAccels( Message ) ;
> end ;
I am using a TDlgWindow object. This quick fix did the trick. Thanks! :)
Quote:
> Regards,
> Stephen Posey
Best Regards,
Scott McIntyre
======================================================================
11400 ROBINWOOD DRIVE PHONE: 301-790-2800 x327
HAGERSTOWN MD 21742-6590 USA FAX: 301-739-0737
======================================================================
Home Page: http://www.western-md.com/hjc/
=============================================================