locked
OnClipboardUpdate() is not called RRS feed

  • Question

  • I handle a Windows message WM_CLIPBOARDUPDATE and add function OnClipboardUpdate() like this :

    void CClipBrdView::OnClipboardUpdate()
    {
    	// 此功能要求 Windows Vista 或更高版本。
    	// _WIN32_WINNT 符号必须 >= 0x0600。
    	// TODO: 在此添加消息处理程序代码和/或调用默认值
    	this->GetDC()->TextOutW(20,20,_T("fromClipboard"));
    
    	CView::OnClipboardUpdate();
    }
    
    but OnClipboardUpdate() is not called when I copyed some text,why?
    
    Wednesday, June 9, 2010 9:26 AM

Answers

  • haozi2638 wrote:
    > I handle a Windows message WM_CLIPBOARDUPDATE and add function OnClipboardUpdate() like this :
     
    Which Windows version is your program running on? The message is only sent on Vista and up.
     
    Also, I'm pretty sure it's only sent to top-level windows. Your view is likely a child of the frame window.
    --
    Igor Tandetnik
     
     
    • Marked as answer by Yi Feng Li Tuesday, June 15, 2010 1:58 AM
    Wednesday, June 9, 2010 2:48 PM

All replies

  • haozi2638 wrote:
    > I handle a Windows message WM_CLIPBOARDUPDATE and add function OnClipboardUpdate() like this :
     
    Which Windows version is your program running on? The message is only sent on Vista and up.
     
    Also, I'm pretty sure it's only sent to top-level windows. Your view is likely a child of the frame window.
    --
    Igor Tandetnik
     
     
    • Marked as answer by Yi Feng Li Tuesday, June 15, 2010 1:58 AM
    Wednesday, June 9, 2010 2:48 PM
  •  Windows version is Windows 7
    Sunday, June 20, 2010 3:45 AM