Other Issues - MFC dialog based application
Asked By roopa saini
09-Feb-12 02:51 AM
hello all,
I have a dialod based application build in mfc. It has two dialog main dialog and other i want to minimize both dialog when i clicked on other dialog's minimize button.when i clicked on other dialog's minimize button it becomes minimize but main dialog does not.
regards,
roopa
D Company replied to roopa saini
Hello Roopa,
try this approach
1.)Add a handler for WM_SYSCOMMAND, for handling the "you're being minimized" event.
2.)Create a simple popup menu for attaching to the systray icon, and add command handlers for the menu items. (E.g. Restore, About, Exit, etc.)
3.)Override DestroyWindow(). In it, manually get rid of the systray icon since Windows won't do it for you.
You may want to add code to handle the case where the user wants to start the app minimized. MFC won't handle this case for CDialog-based apps, so you have to do it yourself.
make a note that this only works right if the dialog you want to minimize has the WS_VISIBLE style set when you create it. If not, Windows ignores you when you say ShowWindow(SW_HIDE) in the minimize handler, and you get a systray icon and a taskbar button.
For more help Visisthere
Hope it works!!
Regards
D

Re: MFC and threads C++ / VB On Thu, 05 Apr 2007 15:51:44 -0400, Joseph M t refer to you, but since you brought it up, when I go back and re-read your message that called PostMessage / WFSO a "device driver paradigm", left error detection in WFSO an "exercise for the reader", and said the choices hinged on "performance issues", I still can't find any hint this wasn't the way you'd really PostMessage / WFSO / WFMO, because it's the only thing in this thread that discusses the issues and presents the two real alternatives. - - Doug Harrison Visual C++ MVP VC MFC Discussions Threads (1) Joseph (1) Newcomer (1) Unwise (1) Ignore (1) Responses (1) Suggestion (1 having to service a message loop to maintain responsiveness, so I'm wondering why we're talking about GetMessage anyway. Certainly, if you try to program something sequentially that needs to ll just introduce complexity reminiscent of Win16 PeekMessage (AKA cooperative) multitasking. What I think you're describing is worth the trouble only if the thread can do something else pending the
Why Domodal Crashing? Office Hi All ! I have created MFC dialog in MFC extention DLL. That Dialog is created and displaed successfully using domodal in win32 console application with mfc support and also successfully executed with mfc appwizard executable. Now I have created Office Add-in using the sample of Comaddin. There I am calling the same MFC Extension based dialog in that but is crashing after calling domodal. I have tried the CDO and MAPI Developer Tool - The key aspect is probably that you've created an MFC extension DLL rather than just a plain DLL (that uses MFC). Both your projects that have worked have MFC support, presumably the one that doesn't doesn't have MFC support? Dave Since Office
MFC updates and enhancements C++ / VB I think that it will be *very interesting* for the people who read and post on this newsgroup to know that MFC is still very live and well, and the Visual C++ Team is doing great things for MFC and native C++. http: / / blogs.msdn.com / vcblog / For example: In this video Pat Brenner a developer on the Visual C++ libraries team, talks about the functionality of the new MFC update. This significantly enhanced version of MFC will enable developers to create applications with the "look and feel" of Microsoft Office, Internet can view the video at http: / / channel9.msdn.com / showpost.aspx?postid = 355087 Giovanni VC MFC Discussions Windows XP (1) Visual Studio 2005 (1) Exchange Server (1) Visual Studio (1) PowerPoint I don't think is as easy (out of the box) with C# and VB. MFC lives! Tom Here is a little more: <http: / / msdn2.microsoft.com / en-us / visualc / bb892882 the way to say they chose BCGSoft due to how well it meshed with existing MFC. I think CodeJock does not mesh very well. . . their ribbon for example requires a lot
Future of MFC? C++ / VB I am told great things may be on the horizon for MFC. Why the big secret, can anyone elaborate? Many thanks, Duncan VC MFC Discussions WinCE (1) Visual Studio 2008 (1) Compact Framework (1) Visual Studio (1) Office 2007 Giovanni posted the blog entry, but I wanted to add that I don't think MFC is dead by any means. It makes sense for MSFT to improve that paradigm. I certainly is the most powerful, and the apps it produces can be highly tuned. Adding MFC to the mix makes VC++ somewhat easier to use, but there are other tools out less powerful) such as VB6 and Delphi. But I agree with you that VC++ with MFC does hit the sweet spot of power vs. ease-of-use, which is why I talented touch in creating the .NET framework technology. Giovanni Why do you say this? They're as likely to run as existing MFC apps. They can be compiled into an .exe and distributed with the VBRUNx.dll. - - David
Good MFC Book C++ / VB Hi, I'd like to get a decent MFC book. I have good c++ skills and considerable experience writing non-MFC applications in Visual Studio. Can anyone recommend a good book for writing MFC applications?. Thanks in advance, Dave VC MFC Discussions JqidnZdSzb8JAozVnZ2dnUVZ8qydnZ2d (1) Hqmdnd3gbMAczo3VnZ2dnUVZ8q (1) Visual Studio (1) Ma6BefIzVRVnyjgA (1) WinAPI (1) AmazonUK (1) DidYou 1) January (1) scritto nel messaggio I would recommend Jeff Prosise's "Programming Windows with MFC" (Microsoft Press). The author is very clear in explaining the subject. This book is a can find it used at a small price here: http: / / www.amazon.com / Programming-Windows-MFC-Jeff-Prosise / dp / 1572316950 Giovanni On 25 Jan, 12:11, "Giovanni Dicanio" <giovanni.dica. . .@invalid ref = cm_cr_pr_product_top - - David Sometimes you can get the book used on Amazon as well. You're right, it's a good book, but that's a lot of £'s for any