@@ -25,7 +25,7 @@ private let SwiftPickerViewProxyWindowProc: WNDPROC = { (hWnd, uMsg, wParam, lPa
2525 switch lpDrawItem. pointee. itemAction {
2626 case UINT ( ODA_SELECT) :
2727 _ = DrawFocusRect ( lpDrawItem. pointee. hDC, & lpDrawItem. pointee. rcItem)
28- if lpDrawItem. pointee. itemState & DWORD ( ODS_SELECTED) == DWORD ( ODS_SELECTED) {
28+ if DWORD ( lpDrawItem. pointee. itemState) & DWORD ( ODS_SELECTED) == DWORD ( ODS_SELECTED) {
2929 // If the item is selected, we have drawn the focus rectangle and the
3030 // operation is complete.
3131 return LRESULT ( 1 )
@@ -38,8 +38,8 @@ private let SwiftPickerViewProxyWindowProc: WNDPROC = { (hWnd, uMsg, wParam, lPa
3838 if let view = unsafeBitCast ( lpDrawItem. pointee. itemData,
3939 to: AnyObject . self) as? View {
4040 let rctRect : RECT = lpDrawItem. pointee. rcItem
41- _ = SetWindowPos ( view. hWnd, nil , rctRect. left, rctRect. top, 0 , 0 ,
42- UINT ( SWP_NOSIZE) )
41+ _ = SetWindowPos ( view. hWnd, nil , CInt ( rctRect. left) , CInt ( rctRect. top) ,
42+ 0 , 0 , UINT ( SWP_NOSIZE) )
4343 // Setting `isHidden` is necessary for Views generated after initial
4444 // call to `Window.makeKeyAndVisible()`
4545 if IsWindowVisible ( GetParent ( view. hWnd) ) && !IsWindowVisible( view. hWnd) {
@@ -117,8 +117,8 @@ private let SwiftPickerViewWindowProc: SUBCLASSPROC = { (hWnd, uMsg, wParam, lPa
117117 DeviceContextHandle ( owning: GetDC ( view. hWnd) )
118118 let hBitmap : BitmapHandle =
119119 BitmapHandle ( owning: CreateCompatibleBitmap ( hDCItem. value,
120- rcClient. right - rcClient. left,
121- rcClient. bottom - rcClient. top) )
120+ CInt ( rcClient. right - rcClient. left) ,
121+ CInt ( rcClient. bottom - rcClient. top) ) )
122122
123123 let hDCMemory : DeviceContextHandle =
124124 DeviceContextHandle ( owning: CreateCompatibleDC ( nil ) )
@@ -133,10 +133,10 @@ private let SwiftPickerViewWindowProc: SUBCLASSPROC = { (hWnd, uMsg, wParam, lPa
133133 let hDC : DeviceContextHandle =
134134 DeviceContextHandle ( owning: GetDC ( hWnd) )
135135
136- _ = BitBlt ( hDC. value, cbiInfo. rcItem. left, cbiInfo. rcItem. top,
137- cbiInfo. rcItem. right - cbiInfo. rcItem. left,
138- cbiInfo. rcItem. bottom - cbiInfo. rcItem. top, hDCMemory . value ,
139- 0 , 0 , UINT ( SRCCOPY) )
136+ _ = BitBlt ( hDC. value, CInt ( cbiInfo. rcItem. left) , CInt ( cbiInfo. rcItem. top) ,
137+ CInt ( cbiInfo. rcItem. right - cbiInfo. rcItem. left) ,
138+ CInt ( cbiInfo. rcItem. bottom - cbiInfo. rcItem. top) ,
139+ hDCMemory . value , 0 , 0 , DWORD ( SRCCOPY) )
140140
141141 return lResult
142142
0 commit comments