From: vvkd on 3 Mar 2010 02:29 On application startup save foreground window. At the end of the OnInitDialog set saved window as foreground. PS. IMHO using dialog as a hidden window is not a really good idea. vishal.g.sha wrote: Minimizing an Dialog based application in Windows Mobile 5.0 28-May-08 hi all , i want to minimize an dialog based application in pocket pc . i tried using showwindow(sw_minimize) but it does not work is there any other api to achieve the same . Previous Posts In This Thread: On Wednesday, May 28, 2008 7:12 AM vishal.g.sha wrote: Minimizing an Dialog based application in Windows Mobile 5.0 hi all , i want to minimize an dialog based application in pocket pc . i tried using showwindow(sw_minimize) but it does not work is there any other api to achieve the same . On Wednesday, May 28, 2008 11:58 AM r_z_are wrote: Re: Minimizing an Dialog based application in Windows Mobile 5.0 On Tue, 27 May 2008 20:28:04 -0700 (PDT), "vishal.g.shah(a)gmail.com" <vishal.g.shah(a)gmail.com> wrote: When I look up ShowWindow in the MSDN that came with my copies of eVC, I notice SW_MINIMIZE is not listed as an option. So I'm not surprised it failed. I'm pretty sure Windows CE has no concept for "minimize". So I think we should step back and find out why you think you need to minimize a dialog box. ----------------------------------------- To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message). Robert E. Zaret, eMVP PenFact, Inc. 20 Park Plaza, Suite 478 Boston, MA 02116 www.penfact.com On Wednesday, May 28, 2008 6:48 PM Michael Salamone wrote: Right - minimize not supported on WinCE. Use ShowWindow(SW_HIDE). Right - minimize not supported on WinCE. Use ShowWindow(SW_HIDE). Might also be ableo to use SetWindowPos to move your window to the bottom of the Z-order. -- Michael Salamone, eMVP Entrek Software, Inc. www.entrek.com <r_z_aret(a)pen_fact.com> wrote in message news:tcrq345lhld9n3fccacdkihll8fp16c5qc(a)4ax.com... On Saturday, May 31, 2008 1:28 AM vishal.g.sha wrote: Thanks a lot Michael SetWindowPos workedSetWindowPos( NULL, -1000, -1000, 0, Thanks a lot Michael SetWindowPos worked SetWindowPos( NULL, -1000, -1000, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE ); =2E.... wrote: ght t On Sunday, June 01, 2008 4:44 PM Daqi Pei wrote: I've come to this before. I've come to this before. The problem of this solution is, though the main window is hidden, the small OK button at top-right is still there, making it confusing for the user. I wonder if there's a way to solve this? -- Daqi Pei vishal.g.shah(a)gmail.com wrote: On Sunday, June 01, 2008 5:29 PM Michael Salamone wrote: Well, I suggested changing the z-order, but the OP moved the window off the Well, I suggested changing the z-order, but the OP moved the window off the screen. So if that's what you did, then yes, you should still see the OK button for the window. I also suggested ShowWindow(SW_HIDE). The doc for that says that it will hide the window and activate another. It's not clear to me if SetWindowPos will activate another window. If it does great but if not, then try ShowWindow. Move the window to the bottom of the z-order like this: SetWindowPos(hWnd, HWND_BOTTOM, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE); I'm not sure if that will move it below the shell. I think not, but if it does then you'd definitely also want to call ShowWindow(SW_HIDE). -- Michael Salamone, eMVP Entrek Software, Inc. www.entrek.com "Daqi Pei" <me(a)peidaqi.com> wrote in message news:OpCTWhCxIHA.4376(a)TK2MSFTNGP06.phx.gbl... On Tuesday, June 03, 2008 3:58 PM r_z_are wrote: Re: Minimizing an Dialog based application in Windows Mobile 5.0 On Sun, 01 Jun 2008 15:44:49 -0500, Daqi Pei <me(a)peidaqi.com> wrote: When a window is minimized on a desktop, the windows stops being visible, but it's icon (in the task bar) remains visible. So users have a quick way to restore the window. Neither mechanism exists on a Pocket PC. So I again ask: what are you trying to do that you think minimizing is the answer? I regularly hide windows in my apps, and then show them as appropriate. Perhaps in response to a direct "request" from the user or the result of program logic. When a user switches to another app, the app that was running is hidden. The best method I know to bring back an app hidden this way is to let the user "restart" the user, but have the app really show the existing instance. This is done by making sure each app runs as a single, unique, instance. Solutions to this problem are posted rather often; look for posts with CreateMutex and FindWindow. ----------------------------------------- To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message). Robert E. Zaret, eMVP PenFact, Inc. 20 Park Plaza, Suite 478 Boston, MA 02116 www.penfact.com On Wednesday, June 04, 2008 3:55 PM Daqi Pei wrote: Well, how about want the user to look at the Today Screen. Well, how about want the user to look at the Today Screen. Sounds like a possible reason? -- Daqi On Wednesday, June 04, 2008 4:23 PM Scott Seligman wrote: Re: Minimizing an Dialog based application in Windows Mobile 5.0 Daqi Pei <me(a)peidaqi.com> wrote: If you want the user to see the Today Screen, then bring it to the foreground: SetForegroundWindow(FindWindow( _T("DesktopExplorerWindow"), _T("Desktop"))); -- --------- Scott Seligman <scott at <firstname> and michelle dot net> --------- The beginning is the most important part of the work. -- The Republic by Plato Submitted via EggHeadCafe - Software Developer Portal of Choice Dr. Dotnetsky's Cool .Net Tips and Tricks No. 26 http://www.eggheadcafe.com/tutorials/aspnet/8e390106-20d1-4b2b-be30-cde5d852348d/dr-dotnetskys-cool-net.aspx
|
Pages: 1 Prev: Getting SMS PDU from mapirule Next: How to modify tasks in c++ program |