Q: Smart Minimize and MFC Dialog Based App 
Author Message
 Q: Smart Minimize and MFC Dialog Based App

Hello Everyone,

I have a question.
I created a dialog based app with MFC app wizard. By default, it displays
"Done" button (OK in a circle). So I replaced it with "Smart Minimize"
button by adding the following code in OnInitDialog() handler.

    SHDoneButton(m_hWnd, SHDB_HIDE);

Now "X" in a circle button is displayed in stead of "Done" button. It works
fine most of the time. My app is minimized and still running (I confirmed
this with Remote Process Viewer.)

HOWEVER when there is only my app running, smart minimizing it does NOT
update the main screen area (where Today screen should appear). Today's menu
bar (with "New" menu item) appears but the main portion of the screen still
shows my app's dialog.

What am I doing wrong here? It's really simple app (I added only one line to
App Wizard's skelton code).

Any help would be appreciated.

Thanks in advance,

Shigeo Kiriyama
Nikon Instruments Inc.



Sun, 03 Oct 2004 05:24:18 GMT  
 Q: Smart Minimize and MFC Dialog Based App


Fri, 19 Jun 1992 00:00:00 GMT  
 Q: Smart Minimize and MFC Dialog Based App
Hi

your dialog-based application is not friendly to today screen. Read how to
fix it at
http://www.pocketpcdn.com/qa/today_friendly_dialogs.html

--
Yaroslav Goncharov
Smartphone Developer Network
www.smartphonedn.com



Quote:
> Hello Everyone,

> I have a question.
> I created a dialog based app with MFC app wizard. By default, it displays
> "Done" button (OK in a circle). So I replaced it with "Smart Minimize"
> button by adding the following code in OnInitDialog() handler.

>     SHDoneButton(m_hWnd, SHDB_HIDE);

> Now "X" in a circle button is displayed in stead of "Done" button. It
works
> fine most of the time. My app is minimized and still running (I confirmed
> this with Remote Process Viewer.)

> HOWEVER when there is only my app running, smart minimizing it does NOT
> update the main screen area (where Today screen should appear). Today's
menu
> bar (with "New" menu item) appears but the main portion of the screen
still
> shows my app's dialog.

> What am I doing wrong here? It's really simple app (I added only one line
to
> App Wizard's skelton code).

> Any help would be appreciated.

> Thanks in advance,

> Shigeo Kiriyama
> Nikon Instruments Inc.



Sun, 03 Oct 2004 16:16:46 GMT  
 Q: Smart Minimize and MFC Dialog Based App

There is a much simplier solution than the one described in that article. Go
to the resource editor, open your dialog and change its style from
Style:Popup to Style:Overlapped. Popup dialogs with NULL parent are owned by
today screen while overlapped are not. That's why popup dialogs shroud today
window.

--
Sincerely,
Alexander


http://www.RSDN.ru - Russian Software Developer Network


Quote:
> Hi

> your dialog-based application is not friendly to today screen. Read how to
> fix it at
> http://www.pocketpcdn.com/qa/today_friendly_dialogs.html

> --
> Yaroslav Goncharov
> Smartphone Developer Network
> www.smartphonedn.com



> > Hello Everyone,

> > I have a question.
> > I created a dialog based app with MFC app wizard. By default, it
displays
> > "Done" button (OK in a circle). So I replaced it with "Smart Minimize"
> > button by adding the following code in OnInitDialog() handler.

> >     SHDoneButton(m_hWnd, SHDB_HIDE);

> > Now "X" in a circle button is displayed in stead of "Done" button. It
> works
> > fine most of the time. My app is minimized and still running (I
confirmed
> > this with Remote Process Viewer.)

> > HOWEVER when there is only my app running, smart minimizing it does NOT
> > update the main screen area (where Today screen should appear). Today's
> menu
> > bar (with "New" menu item) appears but the main portion of the screen
> still
> > shows my app's dialog.

> > What am I doing wrong here? It's really simple app (I added only one
line
> to
> > App Wizard's skelton code).

> > Any help would be appreciated.

> > Thanks in advance,

> > Shigeo Kiriyama
> > Nikon Instruments Inc.



Sun, 03 Oct 2004 17:16:59 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Adding a minimize button to an existing dialog based app

2. Starting a Dialog Based app minimized.

3. Dialog-based app starting minimized

4. Dialog-based app, always minimized

5. Again: minimizing dialog-based app on startup....

6. Detect when dialog-based app is minimized?

7. Dialog based app minimize on startup???/

8. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

9. Message when app is reloaded (after smart minimize)

10. Message when app is reloaded (after smart minimize)

11. Minimizing MFC dialog app

12. cannot instantiate an activex control in mfc dialog based app

 

 
Powered by phpBB® Forum Software