#include <9pm/windows.h>
#include <9pm/u.h>
#include <9pm/libc.h>
HWND WINAPI
CreateWindowEx(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName,
DWORD dwStyle, int X, int Y, int nWidth, int nHeight, HWND hWndParent,
HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
{
char *class, *name;
HWND h;
if(win_useunicode)
return CreateWindowExW(dwExStyle, lpClassName, lpWindowName,
dwStyle, X, Y, nWidth, nHeight, hWndParent,
hMenu, hInstance, lpParam);
class = win_wstr2utf(lpClassName);
name = win_wstr2utf(lpWindowName);
h = CreateWindowExA(dwExStyle, class, name,
dwStyle, X, Y, nWidth, nHeight, hWndParent,
hMenu, hInstance, lpParam);
win_free(class);
win_free(name);
return h;
}
syntax highlighted by Code2HTML, v. 0.9.1