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 Tech Support » CExtGridInplaceEdit question Collapse All
Subject Author Date
tera tera Nov 9, 2010 - 12:30 AM

Hello.

class MUXDLL_EXPORT CMuGridCellEditStr : public CExtGridInplaceEdit

This class is virtual in CExtGridInplaceEdit.
By this program, I want to judge the input character.
For example, DeleteKey or numerical value.

Please teach a sample code.

tera tera Nov 9, 2010 - 5:27 PM



Then I cannot catch VK_DELETE.

With the following CODE, a message does not flow.


bool CExtGridWnd::OnGbwBeginEdit(  LONG nVisibleColNo,  LONG nVisibleRowNo,  LONG nColNo,  LONG nRowNo,  INT nColType,  INT nRowType,  const RECT & rcCellExtra,  const RECT & rcCell,  const RECT & rcInplaceControl,  bool bContinueMsgLoop, // = true  __EXT_MFC_SAFE_LPCTSTR strStartEditText, // = NULL  HWND hWndParentForEditor // = NULL  ) {  :  :  :  :  if( (!bCtrl) && (!bShift) && int(msg.wParam) == VK_DELETE )  {   if( msg.message != WM_CHAR )   {    if( ! g_pEditCell->_OnQueryInplaceVkDeleteProcessingEnabled() )    { ::PeekMessage(&msg,NULL,msg.message,msg.message,PM_REMOVE); continue;    }    LRESULT lResult = 0L;    g_pEditCell->OnInplaceControlWindowProc( lResult, msg.message, msg.wParam, msg.lParam, msg.hwnd, *this, nVisibleColNo, nVisibleRowNo, nColNo, nRowNo, nColType, nRowType, rcCellExtra, rcCell, rcInplaceControl );  :  :

Technical Support Nov 10, 2010 - 2:23 AM

The CExtGridWnd::OnGbwBeginEdit() will be invoked only if the WindowProc virtual method of your in-place editor control invokes the parent class’s WindowProc virtual method for WM_KEY*** messages.

Technical Support Nov 10, 2010 - 1:41 AM

The CExtGridWnd::OnGbwBeginEdit() will be invoked only if the WindowProc virtual method of your in-place editor control will invoke the parent class WindowProc virtual method for WM_KEY*** messages.

Technical Support Nov 9, 2010 - 2:09 AM

You should handle the WM_KEYDOWN standard message in an overridden WindowProc() virtual method.