Article View: comp.os.os2.programmer
Article #707Re: Dialog as Mainwindow: Problems, help!!!
From: Michael Harris
Date: Wed, 15 Apr 1992 05:47
Date: Wed, 15 Apr 1992 05:47
23 lines
1815 bytes
1815 bytes
nicolai@lysator.liu.se (Nicolai Wadstr|m) writes:
>The system (mailer & bbs) I'm working on right now has given me some
>troubles... For convinience I use a Dialog as a main window, but this
>causes some problems, I can't (or don't know how) to set the icon for
>the window (the windows has a minimize button), and when the application
>is started it doesn't get focus! The program windows comes to the foreground
>but it does not become the active application!
For the icon... look at WM_SETICON. You should send this message to the
dialog frame. (ie from inside the dialog proc, send the message to yourself.)
For the focus problem, are you returning TRUE from WM_INITDLG in your
dialog proc? Returning TRUE disables the default processing of setting
focus to the first control in your dialog. If you must return TRUE to
WM_INITDLG, use WinSetFocus to change the focus to a control on the dialog.
If you create the dialog invisible and set the position in your code with
WinSetWindowPos are you specifying SWP_ACTIVATE?
______________________________________________________________________________
Michael Harris - harris@catt.ncsu.edu or harris@carvm3.vnet.ibm.com
Vice-President, Computer & Technologies Theme Program, NC State University
(My opinions are my own and do not represent those of NCSU or IBM Corporation)
Technical Details
Message-ID:
<harris.703316822@garfield.catt.ncsu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!mips!swrinde!gatech!taco!garfield.catt.ncsu.edu!harrisReferences:
<1228@lysator.liu.se>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!mips!swrinde!gatech!taco!garfield.catt.ncsu.edu!harris From: harris@garfield.catt.ncsu.edu (Michael Harris) Newsgroups: comp.os.os2.programmer Subject: Re: Dialog as Mainwindow: Problems, help!!! Message-ID: <harris.703316822@garfield.catt.ncsu.edu> Date: 15 Apr 92 05:47:02 GMT References: <1228@lysator.liu.se> Sender: news@ncsu.edu (USENET News System) Organization: North Carolina State University Lines: 23