Make HWND a pointer instead of a cint and fix MSVC compiler warning (#10789)

In Windows, a HWND is a HANDLE which is a PVOID so a pointer in Nim
This commit is contained in:
Bogdan 2019-03-13 16:54:36 +02:00 • committed by Andreas Rumpf
commit b270917de1
2 changed files with 3 additions and 3 deletions

View file

@ -28,11 +28,11 @@ when not defined(windows) or not defined(guiapp):
proc writeToStdErr(msg: cstring) = rawWrite(cstderr, msg)
else:
proc MessageBoxA(hWnd: cint, lpText, lpCaption: cstring, uType: int): int32 {.
proc MessageBoxA(hWnd: pointer, lpText, lpCaption: cstring, uType: int): int32 {.
header: "<windows.h>", nodecl.}
proc writeToStdErr(msg: cstring) =
discard MessageBoxA(0, msg, nil, 0)
discard MessageBoxA(nil, msg, nil, 0)
proc showErrorMessage(data: cstring) {.gcsafe.} =
if errorMessageWriter != nil: