@@ -25,7 +25,7 @@ private let SwiftPickerViewProxyWindowProc: WNDPROC = { (hWnd, uMsg, wParam, lPa
25
25
switch lpDrawItem. pointee. itemAction {
26
26
case UINT ( ODA_SELECT) :
27
27
_ = 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) {
29
29
// If the item is selected, we have drawn the focus rectangle and the
30
30
// operation is complete.
31
31
return LRESULT ( 1 )
@@ -38,8 +38,8 @@ private let SwiftPickerViewProxyWindowProc: WNDPROC = { (hWnd, uMsg, wParam, lPa
38
38
if let view = unsafeBitCast ( lpDrawItem. pointee. itemData,
39
39
to: AnyObject . self) as? View {
40
40
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) )
43
43
// Setting `isHidden` is necessary for Views generated after initial
44
44
// call to `Window.makeKeyAndVisible()`
45
45
if IsWindowVisible ( GetParent ( view. hWnd) ) && !IsWindowVisible( view. hWnd) {
@@ -117,8 +117,8 @@ private let SwiftPickerViewWindowProc: SUBCLASSPROC = { (hWnd, uMsg, wParam, lPa
117
117
DeviceContextHandle ( owning: GetDC ( view. hWnd) )
118
118
let hBitmap : BitmapHandle =
119
119
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) ) )
122
122
123
123
let hDCMemory : DeviceContextHandle =
124
124
DeviceContextHandle ( owning: CreateCompatibleDC ( nil ) )
@@ -133,10 +133,10 @@ private let SwiftPickerViewWindowProc: SUBCLASSPROC = { (hWnd, uMsg, wParam, lPa
133
133
let hDC : DeviceContextHandle =
134
134
DeviceContextHandle ( owning: GetDC ( hWnd) )
135
135
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) )
140
140
141
141
return lResult
142
142
0 commit comments