Why don't my message boxes appear? 
Author Message
 Why don't my message boxes appear?

 Hi,
I'm currently developping a Win95 app with MFC4.0. This app has
a behaviour I?don't understand; when I want a message box, it
doesn't come until user press ALT key, as if that event is expected;
as long as this key hasn't been pressed, user can do nothing else:
everything gives a beep that makes user more and more nervous.

This app overides:
   CWnd::OnNcHitTest();
   CWnd::OnWindowPosChanging();
   CWnd::OnSetFocus();
   CWnd::OnActivate().

Maybe I do something wrong in one of those functions; but what?

Any (general) idea welcomed.

Thanks in advance,
                            Oleg.



Fri, 27 Aug 1999 03:00:00 GMT  
 Why don't my message boxes appear?

I posted that question and I post that answer I've just found since it
may helps some others...
If you look in WinCore.cpp, you would find
     CWnd::RunModalLoop().
In which you see that work is done on idle time only; that means that
work is done when there's some time available for the thread that called
CWnd::DoModal(). My app use a timer with a timer delay set to 50ms,
so there's not time left enough to execute CWnd::DoModal(); I'll take
another way do execute my timer... another thread, for instance.

  > Hi,
  >I'm currently developping a Win95 app with MFC4.0. This app has
  >a behaviour I?don't understand; when I want a message box, it
  >doesn't come until user press ALT key, as if that event is
  expected;
  >as long as this key hasn't been pressed, user can do nothing else:
  >everything gives a beep that makes user more and more nervous.
  >
  >This app overides:
  >   CWnd::OnNcHitTest();
  >   CWnd::OnWindowPosChanging();
  > CWnd::OnSetFocus();
  >  CWnd::OnActivate().
  >
  >Maybe I do something wrong in one of those functions; but what?
  >
  >Any (general) idea welcomed.
  >
  >Thanks in advance,
   >                           Oleg.



Fri, 27 Aug 1999 03:00:00 GMT  
 Why don't my message boxes appear?

I had the very same problem with my very first MFC app. In my case I had
specified a handler for OnPaint, and the function had an empty body.
Nothing was getting drawn, because of that.

Hope this helps.



Fri, 27 Aug 1999 03:00:00 GMT  
 Why don't my message boxes appear?

  > Hi,
  >I'm currently developping a Win95 app with MFC4.0. This app has
  >a behaviour I?don't understand; when I want a message box, it
  >doesn't come until user press ALT key, as if that event is
  expected;
  >as long as this key hasn't been pressed, user can do nothing else:
  >everything gives a beep that makes user more and more nervous.
  >
  >This app overides:
  >   CWnd::OnNcHitTest();
  >   CWnd::OnWindowPosChanging();
  >   CWnd::OnSetFocus();
  >   CWnd::OnActivate().
  >
  >Maybe I do something wrong in one of those functions; but what?
  >
  >Any (general) idea welcomed.
  >
  >Thanks in advance,
  >                            Oleg.

I've already posted an answer to that question which was mine too...
But, looking in MFC source code, I've some precision now.
As I've said, In wincore.cpp we find CWnd::RunModalLoop() which displays

dialog boxes on idle time only OR when thread receives some special
events. Those
two events are WM_SYSKEYDOWN (that explains the behaviour when ALT is
pressed) AND event number 0x118.

My question today is very technical: what is that #0x118 event???

Any precise answer welcomed...
       Oleg Lodygensky.



Sat, 28 Aug 1999 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Why Asyncsocket::Connect don't return a message in nonblocking mode

2. Link Errors in VC.net that don't appear in VC 6.0

3. ATL functions don't appear in profiler output

4. New classes don't appear on the ClassView tab

5. ATL functions don't appear in profiler output

6. strings don't appear in CComboBox.

7. ATL functions don't appear in profiler output

8. Tool Tips Don't Appear in Win95

9. strings don't appear in CComboBox.

10. Windows don't appear until someone presses the ALT Key

11. With 64k colors in Win95 the CListCtrl and CTreeCtrl Icons don't appear

12. Don't know why this doesn't work, but

 

 
Powered by phpBB® Forum Software