Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2004

Tip: Looking for answers? Try searching our database.

GetMessage from hidden window

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rajko - 01 May 2004 19:57 GMT
Strange, very strange.

I'm using CDialog to process messages form CMenu.
CDialog does not enter modal state.
CDialog constructor have Create() and
CDialog destructor have CWnd::DestroyWindow();

I'm using following code to dispatch message to CDialog:
MSG msg;
GetMessage(&msg);
DispatchMessage(&msg);

Now, if CDialog is visible code runs ok.

If CDialog is NOT visible code stops at GetMessage() and hungs ???
Why? What to do? I dont want CDialog to be visible.

I could try somehting like this:
dlgPM.ShowWindow(SW_SHOW);
GetMessage(&msg, dlgPM.m_hWnd, 0, 0);
dlgPM.ShowWindow(SW_HIDE);
but it blinks on screen and I dont want that either.

Thanks for help, Rajko.
Rajko - 01 May 2004 20:24 GMT
Ah, what a stupid.
I was little tired .... and irritated because Windows Shell did not allow me
to insert more that 16 menu items so I needed to rewrite some good code
which is supposed to work anyway.

Of course ShowWindow sent message, and PeekMessage is better solution.

Rajko.

> Strange, very strange.
>
[quoted text clipped - 20 lines]
>
> Thanks for help, Rajko.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.