]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/utilsgui.cpp
Improve extended key handling code readability.
[wxWidgets.git] / src / os2 / utilsgui.cpp
index a48d2a09369511990a0a8d185dfaa199895e5015..5b7e06cf347edf692d6ecf98c3bfc50a6cfdfd49 100644 (file)
@@ -428,8 +428,10 @@ void wxDisplaySize(
         ::DevCloseDC(hdcScreen);
         ::WinReleasePS(hpsScreen);
     }
-    *pWidth = (int)lWidth;
-    *pHeight = (int)lHeight;
+    if (pWidth)
+        *pWidth = (int)lWidth;
+    if (pHeight)
+        *pHeight = (int)lHeight;
 }
 
 void wxDisplaySizeMM(
@@ -519,7 +521,7 @@ wxString WXDLLEXPORT wxGetWindowText(
     if ( hWnd )
     {
        long                lLen = ::WinQueryWindowTextLength((HWND)hWnd) + 1;
-       ::WinQueryWindowText((HWND)hWnd, lLen, wxStringBuffer(vStr, lLen));
+       ::WinQueryWindowText((HWND)hWnd, lLen, (PSZ)(wxChar*)wxStringBuffer(vStr, lLen));
     }
 
     return vStr;
@@ -536,7 +538,7 @@ wxString WXDLLEXPORT wxGetWindowClass(
 
        for ( ;; )
        {
-           int                     nCount = ::WinQueryClassName((HWND)hWnd, nLen, wxStringBuffer(vStr, nLen));
+           int                     nCount = ::WinQueryClassName((HWND)hWnd, nLen, (PSZ)(wxChar*)wxStringBuffer(vStr, nLen));
 
            if (nCount == nLen )
            {
@@ -939,7 +941,7 @@ wxBitmap wxDisableBitmap(
     int                             j;
 
     //
-    // Bitmap must be ina double-word alligned address so we may
+    // Bitmap must be in a double-word aligned address so we may
     // have some padding to worry about
     //
     if (nLineBoundary > 0)