Re: Cursor/caret is not shown in an in-place CEdit-derived control

"Jim Barry" <[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <5F0D4FC75D2B4BEE90CD5B8F2DB757C0@jbarry>
"izm_ka" wrote:
> LRESULT CMyInPlaceEdit::OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM 
> lParam, BOOL& bHandled)
> {
> ///CEdit::OnLButtonDown(nFlags, point);
> ::DefWindowProc(m_hWnd, uMsg, wParam, lParam);
>
> bHandled = FALSE;
> return 0;
> }

Don't call the Win32 API function DefWindowProc directly. If you set 
bHandled to FALSE, the message will automatically be passed on to the 
original window procedure. Otherwise, you can leave bHandled as TRUE and 
explcitly call the original window procedure using the 
CWindowImpl::DefWindowProc member function (actually a member of 
CWindowImplBaseT). By the way, there is a rather handy parameterless 
overload of DefWindowProc that calls the original window procedure with the 
current message parameters.

- Jim 



------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.