Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Process MouseDown event Collapse All
Subject Author Date
jb lee May 17, 2005 - 7:09 AM

I derived my class from CExtControlBar and process mouse as U do at MDI sampe. But, The message can’t handled at my code, why? below are part of my class :


class CMyPreviewBar : public CExtControlBar
{
 class CMyPreviewWnd : public CExtWRB<CBitmapPicture>
 {
 private:
  virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
  {
   switch (message)
   {
   case WM_CONTEXTMENU:
    return 0;


   case WM_LBUTTONDOWN :
    AfxMessageBox("Btn Down");
   }
   return CExtWRB<CBitmapPicture>::WindowProc(message, wParam, lParam);
  }
 }; // class CMyPreviewWnd


 CMyPreviewWnd m_wndTaskArea;


 

Technical Support May 17, 2005 - 9:55 AM

It seems the CMyPreviewBar::CMyPreviewWnd class handles mouse events correctly. Please make sure you have specified the CMyPreviewBar window as its parent window. Please also check whether the CMyPreviewBar::CMyPreviewWnd window is enabled -- this is essential for receiving mouse click events. You can also send us your project and we will fix the problem.

jb lee May 18, 2005 - 10:02 AM

Thank you.


I did it. CMyPreviewWnd is derived from CStatic. So, I added SS_NOTIFY style constant at Create(...) call.

Technical Support May 19, 2005 - 3:00 AM

In this case we have no more questions and need to take a look at your project. Could you send it to us or any other project that demonstrates the problem?