]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/choice.cpp
Applied patch [ 603104 ] wxX11 wxClientDC, wxPaintDC fix
[wxWidgets.git] / src / os2 / choice.cpp
index a39235977d1c236824aa990416d41ef5424fc6ec..f3f95b2a91721a56218cc5e2082c3bb720dcc903 100644 (file)
@@ -39,16 +39,16 @@ bool wxChoice::Create(
 {
     long                            lSstyle;
 
-    if (!OS2CreateControl( pParent
-                          ,vId
-                          ,rPos
-                          ,rSize
-                          ,lStyle
+    if (!CreateControl( pParent
+                       ,vId
+                       ,rPos
+                       ,rSize
+                       ,lStyle
 #if wxUSE_VALIDATORS
-                          ,rValidator
+                       ,rValidator
 #endif
-                          ,rsName
-                         ))
+                       ,rsName
+                      ))
         return FALSE;
     lSstyle = CBS_DROPDOWNLIST |
               WS_TABSTOP       |
@@ -212,7 +212,7 @@ wxString wxChoice::GetString(
     char*                           zBuf;
 
     nLen = (size_t)LONGFROMMR(::WinSendMsg(GetHwnd(), LM_QUERYITEMTEXTLENGTH, (MPARAM)n, (MPARAM)0));
-    if (nLen)
+    if (nLen != LIT_ERROR && nLen > 0)
     {
         zBuf = new char[nLen + 1];
         ::WinSendMsg( GetHwnd()