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.
Subject |
Author |
Date |
|
Padraig Beirne
|
Dec 5, 2009 - 8:51 AM
|
Is there an equivalent of GetSel/SetSel for CExtGridWnd. I want to detect the space bar within the 1st 6 Char typed. Can I do this?
|
|
Technical Support
|
Dec 10, 2009 - 2:07 PM
|
The CExtGridCell::OnKey() virtual method is invoked for the focused grid cell only and when there is no in-place editor window activated. You can override the CExtGridCell::OnInplaceControlWindowProc() and/or CExtGridWnd::OnGridCellInplaceControlWindowProc() virtual methods to catch the WM_CHAR , WM_CUT , WM_PASTE and EM_REPLACESEL messages sent to the in-pace activated cell editor window. These messages perform the text changing in the edit control.
|
|
Padraig Beirne
|
Dec 10, 2009 - 12:23 PM
|
Thanks for your response to this query. Sorry I got dragged away for a few days.
I had investigated OnInplaceControlTextInputVerify and also OnInplaceControlTextInputComplete but the only way I could find a particular Char was to search sTextNew for it. Example: if sTextNew = "Unit4 York Ave" I want use the 1st space(between "Unit4" & "York") to seperate sTextNew into strSite="Unit4" & strRoad="York Ave". I can use OnInplaceControlTextInputComplete to search sTextNew on exiting the cell. If I were to use a function like
CExtGridCell::OnKey() I could chk for nChar=32 but this func doesn’t respond during InPlaceEdit. Or does it? I hope this will clarify.
|
|
Technical Support
|
Dec 5, 2009 - 1:26 PM
|
Please provide us with more details about your task. If you want to trace the in-place cell text editing, then you should override the CExtGridCell::OnInplaceControlTextInputVerify() virtual method in your grid cell class or the CExtGridWnd::OnGridCellInplaceControlTextInputVerify() virtual method in your grid control class.
|
|
Padraig Beirne
|
Dec 11, 2009 - 1:41 AM
|
|
|