/********************************************************************* * * EDIT_SetMaxLen */ void EDIT_SetMaxLen(EDIT_Handle hObj, int MaxLen) { if (hObj) { EDIT_Obj* pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); if (MaxLen != pObj->MaxLen) { if (MaxLen < pObj->MaxLen) { if (pObj->hpText) { char* pText; int NumChars; pText = (char*) GUI_ALLOC_h2p(pObj->hpText); NumChars = GUI__GetNumChars(pText); if (NumChars > MaxLen) { int NumBytes; NumBytes = GUI_UC__NumChars2NumBytes(pText, MaxLen); *(pText + NumBytes) = 0; } } } _IncrementBuffer(pObj, MaxLen - pObj->BufferSize + 1); pObj->MaxLen = MaxLen; EDIT_Invalidate(hObj); } WM_UNLOCK(); } }
/********************************************************************* * * GUI_EditHex */ U32 GUI_EditHex(U32 Value, U32 Min, U32 Max, int Len, int xsize) { U32 Ret = Value; int Key, x, y, ysize, Id; EDIT_Handle hEdit; EDIT_Obj* pObj; const GUI_FONT GUI_UNI_PTR * pOldFont = GUI_SetFont(EDIT_GetDefaultFont()); x = GUI_GetDispPosX(); y = GUI_GetDispPosY(); if (xsize == 0) xsize = GUI_GetCharDistX('X') * Len + 6; ysize = GUI_GetFontSizeY(); Id = 0x1234; hEdit = EDIT_Create(x, y, xsize, ysize, Id, Len, 0); pObj = EDIT_H2P(hEdit); EDIT_SetHexMode(hEdit, Value, Min, Max); WM_SetFocus(hEdit); do { Key = GUI_WaitKey(); } while ((Key != GUI_KEY_ESCAPE) && (Key != GUI_KEY_ENTER) && (Key != 0)); GUI_SetFont(pOldFont); if (Key == GUI_KEY_ENTER) Ret = pObj->CurrentValue; EDIT_Delete(hEdit); return Ret; }
/********************************************************************* * * GUI_EditString */ void GUI_EditString(char * pString, int Len, int xsize) { int Key, x, y, ysize, Id; EDIT_Handle hEdit; EDIT_Obj* pObj; const GUI_FONT GUI_UNI_PTR * pOldFont; WM_LOCK(); pOldFont = GUI_SetFont(EDIT_GetDefaultFont()); x = GUI_GetDispPosX(); y = GUI_GetDispPosY(); if (xsize == 0) { xsize = GUI_GetCharDistX('X') * Len + 6; } ysize = GUI_GetFontSizeY(); Id = 0x1234; hEdit = EDIT_Create(x, y, xsize, ysize, Id, Len, 0); EDIT_SetText(hEdit, pString); pObj = EDIT_H2P(hEdit); WM_SetFocus(hEdit); do { Key = GUI_WaitKey(); } while ((Key != GUI_KEY_ESCAPE) && (Key != GUI_KEY_ENTER) && (Key != 0)); if (Key == GUI_KEY_ENTER) { EDIT_GetText(hEdit, pString, pObj->MaxLen); } GUI_SetFont(pOldFont); EDIT_Delete(hEdit); WM_UNLOCK(); }
void EDIT_SetBinMode(EDIT_Handle hEdit, U32 Value, U32 Min, U32 Max) { EDIT_Obj* pObj; int MaxLen; WM_LOCK(); pObj = EDIT_H2P(hEdit); pObj->pfAddKeyEx = _AddKeyBin; pObj->pfUpdateBufer = _UpdateBuffer; pObj->CurrentValue = Value; pObj->CursorPos = 0; MaxLen = pObj->MaxLen; if (MaxLen <= 0 ) { MaxLen = _GetNumDigits(Max); } if (MaxLen > 32) { MaxLen = 32; } if (MaxLen != pObj->MaxLen) { EDIT_SetMaxLen(hEdit, MaxLen); } pObj->Min = Min; pObj->Max = Max; pObj->EditMode = GUI_EDIT_MODE_OVERWRITE; _UpdateBuffer(pObj); WM_UNLOCK(); }
/********************************************************************* * * _SetValue */ static void _SetValue(EDIT_Handle hObj, I32 Value, int Unsigned) { EDIT_Obj* pObj; if (hObj) { WM_LOCK(); pObj = EDIT_H2P(hObj); /* Put in min/max range */ if (Unsigned) { if ((unsigned)Value < (unsigned)pObj->Min) { Value = pObj->Min; } if ((unsigned)Value > (unsigned)pObj->Max) { Value = pObj->Max; } } else { if (Value < pObj->Min) { Value = pObj->Min; } if (Value > pObj->Max) { Value = pObj->Max; } } if (pObj->CurrentValue != (U32)Value) { pObj->CurrentValue = Value; if (pObj->pfUpdateBuffer) { pObj->pfUpdateBuffer(hObj); } WM_InvalidateWindow(hObj); WM_NotifyParent(hObj, WM_NOTIFICATION_VALUE_CHANGED); } WM_UNLOCK(); } }
/********************************************************************* * * _UpdateBuffer */ static void _UpdateBuffer(EDIT_Handle hObj) { char * s; EDIT_Obj * pObj; pObj = EDIT_H2P(hObj); /* The GUI needs not to be locked here. This function is called only from EDIT_AddKey which has already locked the GUI */ s = (char*) GUI_ALLOC_h2p(pObj->hpText); GUI_AddHex(pObj->CurrentValue, pObj->MaxLen, &s); }
/********************************************************************* * * EDIT_SetpfAddKeyEx */ void EDIT_SetpfAddKeyEx(EDIT_Handle hObj, tEDIT_AddKeyEx * pfAddKeyEx) { if (hObj) { EDIT_Obj* pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); pObj->pfAddKeyEx = pfAddKeyEx; WM_UNLOCK(); } }
/********************************************************************* * * EDIT_SetpfUpdateBuffer */ void EDIT_SetpfUpdateBuffer(EDIT_Handle hObj, tEDIT_UpdateBuffer * pfUpdateBuffer) { if (hObj) { EDIT_Obj* pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); pObj->pfUpdateBuffer = pfUpdateBuffer; WM_UNLOCK(); } }
/********************************************************************* * * EDIT_SetCursorAtChar */ void EDIT_SetCursorAtChar(EDIT_Handle hObj, int Pos) { if (hObj) { EDIT_Obj* pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); EDIT__SetCursorPos(pObj, Pos); EDIT_Invalidate(hObj); WM_UNLOCK(); } }
I32 EDIT_GetValue(EDIT_Handle hObj) { EDIT_Obj* pObj; I32 r = 0; if (hObj) { WM_LOCK(); pObj = EDIT_H2P(hObj); r = pObj->CurrentValue; WM_UNLOCK(); } return r; }
/********************************************************************* * * _UpdateBuffer */ static void _UpdateBuffer(EDIT_Handle hObj) { char * s; EDIT_Obj * pObj; pObj = EDIT_H2P(hObj); /* The GUI needs not to be locked here. This function is called only from EDIT_AddKey which has already locked the GUI */ s = (char*) GUI_ALLOC_h2p(pObj->hpText); if (pObj->Flags == GUI_EDIT_SIGNED) { I32 Result = GUI_AddSign(pObj->CurrentValue, &s); GUI_AddDecShift(Result, pObj->MaxLen - 1, pObj->NumDecs, &s); } else { GUI_AddDecShift(pObj->CurrentValue, pObj->MaxLen, pObj->NumDecs, &s); } }
/********************************************************************* * * EDIT_SetInsertMode */ int EDIT_SetInsertMode(EDIT_Handle hObj, int OnOff) { int PrevMode = 0; if (hObj) { EDIT_Obj* pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); PrevMode = pObj->EditMode; pObj->EditMode = OnOff ? GUI_EDIT_MODE_INSERT : GUI_EDIT_MODE_OVERWRITE; WM_UNLOCK(); } return PrevMode; }
void EDIT_SetFont(EDIT_Handle hObj, const GUI_FONT* pfont) { EDIT_Obj* pObj; if (hObj == 0) return; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj) { pObj->pFont = pfont; EDIT_Invalidate(hObj); } WM_UNLOCK(); }
void EDIT_SetTextColor(EDIT_Handle hObj, int Index, GUI_COLOR color) { EDIT_Obj* pObj; if (hObj == 0) return; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj) { pObj->aTextColor[Index] = color; EDIT_Invalidate(hObj); } WM_UNLOCK(); }
/********************************************************************* * * EDIT_SetFloatValue */ void EDIT_SetFloatValue(EDIT_Handle hObj, float Value) { if (hObj) { float Scale; EDIT_Obj * pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); Scale = (float)GUI_Pow10[pObj->NumDecs]; Value *= Scale; EDIT_SetValue(hObj, (I32)(Value + (Value >= 0 ? 0.5 : -0.5))); WM_UNLOCK(); } }
void EDIT_SetTextAlign(EDIT_Handle hObj, int Align) { EDIT_Obj* pObj; if (hObj == 0) return; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj) { pObj->Align = Align; EDIT_Invalidate(hObj); } WM_UNLOCK(); }
/********************************************************************* * * EDIT_GetFloatValue */ float EDIT_GetFloatValue(EDIT_Handle hObj) { float Value = 0; if (hObj) { float Scale; EDIT_Obj * pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); Scale = (float)GUI_Pow10[pObj->NumDecs]; Value = (float)(I32)pObj->CurrentValue / Scale; WM_UNLOCK(); } return Value; }
/********************************************************************* * * EDIT_SetTextColor */ void EDIT_SetTextColor(EDIT_Handle hObj, unsigned int Index, GUI_COLOR color) { EDIT_Obj* pObj; if (hObj == 0) return; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj) { if (Index < GUI_COUNTOF(pObj->Props.aTextColor)) { pObj->Props.aTextColor[Index] = color; EDIT_Invalidate(hObj); } } WM_UNLOCK(); }
/********************************************************************* * * EDIT_GetNumChars */ int EDIT_GetNumChars(EDIT_Handle hObj) { int NumChars = 0; if (hObj) { EDIT_Obj* pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj->hpText) { char * pText; pText = (char*) GUI_ALLOC_h2p(pObj->hpText); NumChars = GUI__GetNumChars(pText); } WM_UNLOCK(); } return NumChars; }
void EDIT_GetText(EDIT_Handle hObj, char* sDest, int MaxLen) { EDIT_Obj* pObj; if (hObj == 0) return; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj) { char * sSource = (char*) WM_HMEM2Ptr(pObj->hpText); int Len = (int)strlen(sSource); if (Len > (MaxLen - 1)) Len = MaxLen - 1; memcpy((void *)sDest, (const void *)sSource, Len); *(sDest+Len) = 0; } WM_UNLOCK(); }
void EDIT_SetMaxLen(EDIT_Handle hObj, int MaxLen) { EDIT_Obj* pObj; WM_HMEM hpText; if (hObj) { WM_LOCK(); pObj = EDIT_H2P(hObj); if ((hpText = WM_ALLOC(MaxLen+1)) ==0) { GUI_DEBUG_ERROROUT("EDIT_SetMaxLen failed to alloc buffer"); } else { WM_FREEPTR(&pObj->hpText); pObj->hpText = hpText; pObj->MaxLen = MaxLen; } EDIT_Invalidate(hObj); WM_UNLOCK(); } }
/********************************************************************* * * _AddKeyHex */ static void _AddKeyHex(EDIT_Handle hObj, int Key) { EDIT_Obj * pObj; pObj = EDIT_H2P(hObj); /* The GUI needs not to be locked here. This function is called only from EDIT_AddKey which has already locked the GUI */ if (pObj) { switch (Key) { #if EDIT_HEX_DIGITONLY case GUI_KEY_UP: { int Nibble = (_GetCurrentNibble(pObj) + 1) & 15; _EditHex(Nibble, pObj, hObj); } break; case GUI_KEY_DOWN: { int Nibble = (_GetCurrentNibble(pObj) + 1) & 15; _EditHex(Nibble, pObj, hObj); } break; #else case GUI_KEY_UP: _AddPosition(pObj, hObj, 1); break; case GUI_KEY_DOWN: _AddPosition(pObj, hObj, -1); break; #endif case GUI_KEY_RIGHT: EDIT__SetCursorPos(pObj, pObj->CursorPos + 1); break; case GUI_KEY_LEFT: EDIT__SetCursorPos(pObj, pObj->CursorPos - 1); break; default: { int Nibble = _HexChar2Int(Key); if (Nibble >= 0) { _EditHex(Nibble, pObj, hObj); EDIT__SetCursorPos(pObj, pObj->CursorPos + 1); } } break; } } _UpdateBuffer(hObj); }
void EDIT_SetText (EDIT_Handle hObj, const char* sNew) { EDIT_Obj* pObj; if (hObj == 0) return; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj) { char*sDest = (char*) WM_HMEM2Ptr(pObj->hpText); int Len = sNew ? (int)strlen(sNew) : 0; if (Len > pObj->MaxLen) Len = pObj->MaxLen; memcpy(sDest, sNew, Len); *(sDest+Len) = 0; pObj->CursorPos = Len; if (pObj->CursorPos == pObj->MaxLen) pObj->CursorPos--; EDIT_Invalidate(hObj); } WM_UNLOCK(); }
void EDIT_SetDecMode(EDIT_Handle hEdit, I32 Value, I32 Min, I32 Max, int Shift, U8 Flags) { EDIT_Obj* pObj; WM_LOCK(); if (hEdit) { pObj = EDIT_H2P(hEdit); pObj->pfAddKeyEx = _AddKeyDec; pObj->pfUpdateBufer = _UpdateBuffer; pObj->CurrentValue = Value; pObj->CursorPos = 0; pObj->Min = Min; pObj->Max = Max; pObj->NumDecs = Shift; pObj->Flags = Flags; pObj->EditMode = GUI_EDIT_MODE_OVERWRITE; _UpdateBuffer(pObj); if (_GetCurrentChar(pObj) == '.') { pObj->CursorPos++; } } WM_UNLOCK(); }
/********************************************************************* * * EDIT_SetText */ void EDIT_SetText(EDIT_Handle hObj, const char* s) { if (hObj) { EDIT_Obj* pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); if (s) { int NumBytesNew, NumBytesOld = 0; int NumCharsNew; if (pObj->hpText) { char* pText; pText = (char*) GUI_ALLOC_h2p(pObj->hpText); NumBytesOld = strlen(pText) + 1; } NumCharsNew = GUI__GetNumChars(s); if (NumCharsNew > pObj->MaxLen) { NumCharsNew = pObj->MaxLen; } NumBytesNew = GUI_UC__NumChars2NumBytes(s, NumCharsNew) + 1; if (_IsSpaceInBuffer(pObj, NumBytesNew - NumBytesOld)) { char* pText; pText = (char*) GUI_ALLOC_h2p(pObj->hpText); memcpy(pText, s, NumBytesNew); pObj->CursorPos = NumCharsNew; if (pObj->CursorPos == pObj->MaxLen) { if (pObj->EditMode == GUI_EDIT_MODE_OVERWRITE) { pObj->CursorPos--; } } } } else { GUI_ALLOC_FreePtr(&pObj->hpText); pObj->BufferSize = 0; pObj->CursorPos = 0; } EDIT_Invalidate(hObj); WM_UNLOCK(); } }
/********************************************************************* * * EDIT_GetCursorPixelPos */ void EDIT_GetCursorPixelPos(EDIT_Handle hObj, int * pxPos, int * pyPos) { if (hObj) { int NumChars; EDIT_Obj * pObj; const char GUI_UNI_PTR * pText; GUI_RECT rInside, rText; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj->hpText) { GUI_SetFont(pObj->Props.pFont); WIDGET__GetInsideRect(&pObj->Widget, &rInside); pText = (const char*) GUI_ALLOC_h2p(pObj->hpText); NumChars = GUI__GetNumChars(pText); rInside.x0 += pObj->Props.Border + EDIT_XOFF; rInside.x1 -= pObj->Props.Border + EDIT_XOFF; GUI__CalcTextRect(pText, &rInside, &rText, pObj->Props.Align); rText.x0 += GUI__GetCursorPosX(pText, pObj->CursorPos, NumChars); *pxPos = rText.x0; *pyPos = rText.y0; } WM_UNLOCK(); } }
/********************************************************************* * * EDIT_GetText */ void EDIT_GetText(EDIT_Handle hObj, char* sDest, int MaxLen) { if (sDest) { *sDest = 0; if (hObj) { EDIT_Obj* pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj->hpText) { char* pText; int NumChars, NumBytes; pText = (char*) GUI_ALLOC_h2p(pObj->hpText); NumChars = GUI__GetNumChars(pText); if (NumChars > MaxLen) { NumChars = MaxLen; } NumBytes = GUI_UC__NumChars2NumBytes(pText, NumChars); memcpy(sDest, pText, NumBytes); *(sDest + NumBytes) = 0; } WM_UNLOCK(); } } }
/********************************************************************* * * EDIT_SetCursorAtPixel */ void EDIT_SetCursorAtPixel(EDIT_Handle hObj, int xPos) { if (hObj) { EDIT_Obj* pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj->hpText) { const GUI_FONT GUI_UNI_PTR *pOldFont; int xSize, TextWidth, NumChars; const char GUI_UNI_PTR * pText; pText = (char*) GUI_ALLOC_h2p(pObj->hpText); pOldFont = GUI_SetFont(pObj->Props.pFont); xSize = WM_GetWindowSizeX(hObj); TextWidth = GUI_GetStringDistX(pText); switch (pObj->Props.Align & GUI_TA_HORIZONTAL) { case GUI_TA_HCENTER: xPos -= (xSize - TextWidth + 1) / 2; break; case GUI_TA_RIGHT: xPos -= xSize - TextWidth - (pObj->Props.Border + EDIT_XOFF); break; default: xPos -= (pObj->Props.Border + EDIT_XOFF) + pObj->Widget.pEffect->EffectSize; } NumChars = GUI__GetNumChars(pText); if (xPos < 0) { EDIT__SetCursorPos(pObj, 0); } else if (xPos > TextWidth) { EDIT__SetCursorPos(pObj, NumChars); } else { EDIT__SetCursorPos(pObj, GUI__GetCursorPosChar(pText, xPos, NumChars)); } GUI_SetFont(pOldFont); EDIT_Invalidate(hObj); } WM_UNLOCK(); } }
/********************************************************************* * * EDIT_AddKey */ void EDIT_AddKey(EDIT_Handle hObj, int Key) { if (hObj) { EDIT_Obj* pObj; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj) { if (pObj->pfAddKeyEx) { pObj->pfAddKeyEx(hObj, Key); } else { switch (Key) { case GUI_KEY_UP: if (pObj->hpText) { char* pText; U16 Char; pText = (char*) GUI_ALLOC_h2p(pObj->hpText); pText += GUI_UC__NumChars2NumBytes(pText, pObj->CursorPos); Char = GUI_UC_GetCharCode(pText); if (Char < 0x7f) { *pText = Char + 1; WM_NotifyParent(hObj, WM_NOTIFICATION_VALUE_CHANGED); } } break; case GUI_KEY_DOWN: if (pObj->hpText) { char* pText; U16 Char; pText = (char*) GUI_ALLOC_h2p(pObj->hpText); pText += GUI_UC__NumChars2NumBytes(pText, pObj->CursorPos); Char = GUI_UC_GetCharCode(pText); if (Char > 0x20) { *pText = Char - 1; WM_NotifyParent(hObj, WM_NOTIFICATION_VALUE_CHANGED); } } break; case GUI_KEY_RIGHT: EDIT__SetCursorPos(pObj, pObj->CursorPos + 1); break; case GUI_KEY_LEFT: EDIT__SetCursorPos(pObj, pObj->CursorPos - 1); break; case GUI_KEY_BACKSPACE: EDIT__SetCursorPos(pObj, pObj->CursorPos - 1); _DeleteChar(hObj, pObj); break; case GUI_KEY_DELETE: _DeleteChar(hObj, pObj); break; case GUI_KEY_INSERT: if (pObj->EditMode == GUI_EDIT_MODE_OVERWRITE) { pObj->EditMode = GUI_EDIT_MODE_INSERT; } else { pObj->EditMode = GUI_EDIT_MODE_OVERWRITE; EDIT__SetCursorPos(pObj, pObj->CursorPos); } break; default: if (Key >= 0x20) { if (pObj->EditMode != GUI_EDIT_MODE_INSERT) { _DeleteChar(hObj, pObj); } if (_InsertChar(hObj, pObj, Key)) { EDIT__SetCursorPos(pObj, pObj->CursorPos + 1); } } } } EDIT_Invalidate(hObj); } WM_UNLOCK(); } }
void EDIT_AddKey(EDIT_Handle hObj, int Key) { EDIT_Obj* pObj; if (hObj == 0) return; WM_LOCK(); pObj = EDIT_H2P(hObj); if (pObj) { if (pObj->pfAddKeyEx) { pObj->pfAddKeyEx(pObj, hObj, Key); } else { char*s = (char*) WM_HMEM2Ptr(pObj->hpText); int len = (int)strlen(s); switch (Key) { case GUI_KEY_UP: { char c = *(s + pObj->CursorPos); if (c < 0x7f) { *(s + pObj->CursorPos) = c + 1; WM_NotifyParent(hObj, WM_NOTIFICATION_VALUE_CHANGED); } } break; case GUI_KEY_DOWN: { char c = *(s + pObj->CursorPos); if (c > 0x20) { *(s + pObj->CursorPos) = c - 1; WM_NotifyParent(hObj, WM_NOTIFICATION_VALUE_CHANGED); } } break; case GUI_KEY_RIGHT: if (pObj->CursorPos < (pObj->MaxLen - 1)) if (pObj->CursorPos < len) pObj->CursorPos++; break; case GUI_KEY_LEFT: if (pObj->CursorPos > 0) pObj->CursorPos--; break; case GUI_KEY_BACKSPACE: if ((len > 0) && (pObj->CursorPos > 0)) { int CopyLength = pObj->MaxLen - pObj->CursorPos; strncpy(s + pObj->CursorPos - 1, s + pObj->CursorPos, CopyLength); *(s + len - 1) = 0; WM_NotifyParent(hObj, WM_NOTIFICATION_VALUE_CHANGED); pObj->CursorPos--; } break; case GUI_KEY_DELETE: if ((len > 0) && (pObj->CursorPos < len)) { if (len > 1) { int CopyLength = pObj->MaxLen - pObj->CursorPos - 1; strncpy(s + pObj->CursorPos, s + pObj->CursorPos + 1, CopyLength); } *(s + len - 1) = 0; WM_NotifyParent(hObj, WM_NOTIFICATION_VALUE_CHANGED); } break; case GUI_KEY_INSERT: if (pObj->EditMode == GUI_EDIT_MODE_OVERWRITE) pObj->EditMode = GUI_EDIT_MODE_INSERT; else pObj->EditMode = GUI_EDIT_MODE_OVERWRITE; break; case GUI_KEY_ENTER: case GUI_KEY_ESCAPE: break; default: if ((Key >= 0x20) && (Key <= 0x7f)) { if (pObj->EditMode == GUI_EDIT_MODE_INSERT) { if (len < pObj->MaxLen) { int CopyLength = pObj->MaxLen - pObj->CursorPos - 1; memmove(s + pObj->CursorPos + 1, s + pObj->CursorPos, CopyLength); *(s + pObj->CursorPos) = Key; WM_NotifyParent(hObj, WM_NOTIFICATION_VALUE_CHANGED); if (pObj->CursorPos < (pObj->MaxLen - 1)) pObj->CursorPos++; } } else { *(s + pObj->CursorPos) = Key; WM_NotifyParent(hObj, WM_NOTIFICATION_VALUE_CHANGED); if (pObj->CursorPos < (pObj->MaxLen - 1)) pObj->CursorPos++; } } break; } } EDIT_Invalidate(hObj); } WM_UNLOCK(); }