Re: entering a function after dialog is displayed
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Thu, 11 Oct 2007 09:57:31 -0400
There are problems with "lengthy initialization" that cause problems. For example,
suppose during the lengthy initialization you switch away to check email and come back.
The screen is not redrawn properly. The message pump is blocked, and the WM_PAINT that
will repaint the app, the dialog, etc. is dead. In fact, I've seen cases where there's
just sort of a "hole" and this poor lonely progress bar, apparently floating in
hyperspace, is all that is visible (the programmer realized somehow that when updating the
progress bar, an UpdateWindow is required, so the only part of the app that comes up is
the progress bar!)
I always use a background thread.
MFC makes so many things so much simpler; I read the blog site, and it convinced me once
again that programming GUI apps in the raw API is a Fundamentally Losing Idea.
(Once I realized that MFC was not coupled to using Microsoft's brain-dead imitation text
editors, I started using it. That was over 12 years ago, and I've not seen any reason to
go back to raw API programming for apps since)
joe
On Wed, 10 Oct 2007 17:41:27 -0500, "Sheng Jiang[MVP]" <sheng_jiang@xxxxxxxxxxxxxxxxxxx>
wrote:
A background thread is more appropriate.Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.
- References:
- entering a function after dialog is displayed
- From: Z.K.
- Re: entering a function after dialog is displayed
- From: Anthony Wieser
- Re: entering a function after dialog is displayed
- From: David Wilkinson
- Re: entering a function after dialog is displayed
- From: Tom Serface
- Re: entering a function after dialog is displayed
- From: David Ching
- Re: entering a function after dialog is displayed
- From: Sheng Jiang[MVP]
- entering a function after dialog is displayed
- Prev by Date: Re: a visual tool showing C++ class structure ..
- Next by Date: Re: serialize a two dimensional array
- Previous by thread: Re: entering a function after dialog is displayed
- Next by thread: Re: entering a function after dialog is displayed
- Index(es):
Relevant Pages
|