Exemple #1
0
LRESULT CComboBox::GetLBText(int index, UString &s)
{
  s.Empty();
  if (g_IsNT)
  {
    LRESULT len = SendMsgW(CB_GETLBTEXTLEN, index, 0);
    if (len == CB_ERR)
      return len;
    LRESULT len2 = SendMsgW(CB_GETLBTEXT, index, (LPARAM)s.GetBuf((unsigned)len));
    if (len2 == CB_ERR)
      return len;
    if (len > len2)
      len = len2;
    s.ReleaseBuf_CalcLen((unsigned)len);
    return len;
  }
  AString sa;
  LRESULT len = GetLBText(index, sa);
  if (len == CB_ERR)
    return len;
  s = GetUnicodeString(sa);
  return s.Len();
}
Exemple #2
0
LRESULT CComboBox::AddString(LPCWSTR s)
{
  if (g_IsNT)
    return SendMsgW(CB_ADDSTRING, 0, (LPARAM)s);
  return AddString(GetSystemString(s));
}
Exemple #3
0
 INT CAnyWindow::GetTextLengthW() const
 {
   return ( (INT) SendMsgW(WM_GETTEXTLENGTH, 0, 0) );
 }
Exemple #4
0
 BOOL CAnyWindow::SetTextW(const WCHAR* cszText)
 {
   return ( SendMsgW(WM_SETTEXT, 0, (LPARAM) cszText) == TRUE );
 }
Exemple #5
0
 INT CAnyWindow::GetTextW(WCHAR* lpTextBuf, INT nTextBufSize)
 {
   return ( (INT) SendMsgW(WM_GETTEXT,  
     (WPARAM) nTextBufSize, (LPARAM) lpTextBuf) );
 }