本文整理汇总了C++中TABLE::DestroyEditControl方法的典型用法代码示例。如果您正苦于以下问题:C++ TABLE::DestroyEditControl方法的具体用法?C++ TABLE::DestroyEditControl怎么用?C++ TABLE::DestroyEditControl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TABLE
的用法示例。
在下文中一共展示了TABLE::DestroyEditControl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
long far pascal _export EditControlProc(
HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
TABLE* table = (TABLE*)MAKELONG((UINT)GetProp(hWnd, "loPtr"), (UINT)GetProp(hWnd, "hiPtr"));
BOOL number = (BOOL)GetProp(hWnd, "number");
BOOL destroy = FALSE;
switch(uMsg)
{
case WM_KEYDOWN:
// The parent table never gets the keydown messages when they are
// being intercepted by the edit control. So I need to post the
// keydown message back to the parent window (the table window)
PostMessage(GetParent(hWnd), EDITM_KEYDOWN, wParam, lParam);
break;
case WM_CHAR:
if(wParam==VK_TAB)
return 0L;
else if(number)
{
switch(wParam)
{
case '-':
case '+':
case 'e':
case 'E':
case '.':
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case VK_BACK:
case VK_CLEAR:
case VK_HOME:
case VK_END:
break;
default:
MessageBeep(-1);
return 0L;
}
}
break;
case WM_LBUTTONDBLCLK:
if(table->dblClkWait)
{
AEvtPostSignalAtMark(table->theObject, SIGNAL_ROWDOUBLECLICKED);
destroy = TRUE;
}
break;
default:
break;
}
if(destroy)
{
table->DestroyEditControl();
return 0L;
}
else
{
#ifdef STRICT
return CallWindowProc((WNDPROC)(table->oldEditControlProc), hWnd, uMsg, wParam, lParam);
#else
return CallWindowProc((FARPROC)table->oldEditControlProc, hWnd, uMsg, wParam, lParam);
#endif
}
}