| .NET DotNet Forum Index » Visual C++ Forum » Can I show a Dialog in console program ?... |
|
Page 1 of 1 |
|
| Author |
Message |
| Kid... |
Posted: Tue Oct 06, 2009 8:46 pm |
|
|
|
Guest
|
Hi
I would like to show a GUI CDialog in Win32 console program , is it possible ?
I do not want to launch another Windows GUI program .
How can I implement it or where to find the sample code ?
Thank you . |
|
|
| Back to top |
|
|
|
| Ben Voigt [C++ MVP]... |
Posted: Tue Oct 06, 2009 10:40 pm |
|
|
|
Guest
|
Programs marked as console subsystem can show GUI (and programs marked as
GUI subsystem can use console windows, they just don't get one
automatically).
You'll need a message loop if you want to display anything except a modal
dialog.
By CDialog I guess you're thinking about MFC? That will make things more
difficult, and the proper newsgroup for non-.NET C++ questions is
microsoft.public.vc.language, for GUI questions like this then
microsoft.public.win32.programmer.user might be better.
I'd suggest forgetting CDialog and using the Win32 DialogBox() function if
you need just one simple dialog box. You use the same dialog box editor but
write your own dialog box procedure. The problem with CDialog is you need
to set up a bunch of MFC stuff, like a CWinApp-derived class, first. If
your dialog is more complicated, then WTL is probably the way to go (still
simpler setup than MFC).
"Kid" <Kid at (no spam) discussions.microsoft.com> wrote in message
news:8C6A5C1D-AB93-4F5E-88DB-38896E130B87 at (no spam) microsoft.com...
Quote: Hi
I would like to show a GUI CDialog in Win32 console program , is it
possible ?
I do not want to launch another Windows GUI program .
How can I implement it or where to find the sample code ?
Thank you . |
|
|
| Back to top |
|
|
|
|