已选SS_NOTIFY。
谢谢!

解决方案 »

  1.   

    "A static control normally takes no input and provides no output; however, it can notify its parent of mouse clicks if it's created with SS_NOTIFY style."----FROM MSDN.
    “normally”
    如果想让它particular,接受键盘输入,该怎么办呢?
      

  2.   

    BOOL CMyEdit::PreTranslateMessage(MSG* pMsg) 
    {
    // TODO: Add your specialized code here and/or call the base class
    if (pMsg->message == WM_KEYDOWN)
    {
    if ((pMsg->wParam == 37) ||
    (pMsg->wParam == 38) ||
    (pMsg->wParam == 39) ||
    (pMsg->wParam == 40)) //四个箭头(分别为 左,上,右,下)
    {
    MoveCursor(pMsg->wParam - 37);
    return true;
    }
    }
    return CWnd::PreTranslateMessage(pMsg);
    }
    以上是我写的一个相当于List功能的一个类,这是我处理KeyDown事件,你应该也可以在这里获得,如果不能,建议不要用STATIC这个类,这个类特殊,自己建一个类就好了。
      

  3.   

    我也在PreTranslateMessage(MSG* pMsg)写了
    if (pMsg->message == WM_KEYDOWN)
    但是根本就不执行下面的代码,
    郁闷啊!
      

  4.   

    做static类的时候,键盘操作都作掉了。
    如果你要键盘输入和输出等功能,你完全可以使用edit类啊。如果你非要使用static类完成键盘输入和输出等功能的话,建议你重写static类的过程函数。