This commit is contained in:
Igor Pavlov
2015-06-15 00:00:00 +00:00
committed by Kornel Lesiński
parent 0713a3ab80
commit 54490d51d5
591 changed files with 34932 additions and 16390 deletions
+13 -5
View File
@@ -18,11 +18,15 @@ namespace NControl {
LRESULT CComboBox::GetLBText(int index, CSysString &s)
{
s.Empty();
LRESULT len = GetLBTextLen(index);
LRESULT len = GetLBTextLen(index); // length, excluding the terminating null character
if (len == CB_ERR)
return len;
len = GetLBText(index, s.GetBuffer((int)len + 1));
s.ReleaseBuffer();
LRESULT len2 = GetLBText(index, s.GetBuf((unsigned)len));
if (len2 == CB_ERR)
return len;
if (len > len2)
len = len2;
s.ReleaseBuf_CalcLen((unsigned)len);
return len;
}
@@ -42,8 +46,12 @@ LRESULT CComboBox::GetLBText(int index, UString &s)
LRESULT len = SendMessageW(CB_GETLBTEXTLEN, index, 0);
if (len == CB_ERR)
return len;
len = SendMessageW(CB_GETLBTEXT, index, (LPARAM)s.GetBuffer((int)len + 1));
s.ReleaseBuffer();
LRESULT len2 = SendMessageW(CB_GETLBTEXT, index, (LPARAM)s.GetBuf((unsigned)len));
if (len2 == CB_ERR)
return len;
if (len > len2)
len = len2;
s.ReleaseBuf_CalcLen(len);
return len;
}
AString sa;
+2 -2
View File
@@ -95,9 +95,9 @@ public:
/*
#ifdef UNDER_CE
virtual void OnHelp(void *) { OnHelp(); };
virtual void OnHelp(void *) { OnHelp(); }
#else
virtual void OnHelp(LPHELPINFO) { OnHelp(); };
virtual void OnHelp(LPHELPINFO) { OnHelp(); }
#endif
*/
virtual void OnHelp() {};
+1 -1
View File
@@ -35,7 +35,7 @@ public:
virtual void OnDestroy() { PostQuitMessage(0); }
virtual void OnClose() { Destroy(); }
/*
virtual LRESULT OnHelp(LPHELPINFO helpInfo) { OnHelp(); };
virtual LRESULT OnHelp(LPHELPINFO helpInfo) { OnHelp(); }
virtual LRESULT OnHelp() {};
virtual bool OnButtonClicked(int buttonID, HWND buttonHWND);
virtual void OnOK() {};