Reputation: 191
I started playing around with the win32 api in c++ and as i was about to make a button, the intellisense says "define CreateWindow CreateWindowA". When i seem to hover down, it also says "Error: expected a )'".
Here is my code:
CreateWindow(TEXT("button"), TEXT("You should press this button"), WS_VISIBLE | WS_CHILD, 50, 50, 300, 300, hWnd, (HMENU)somecrap, NULL, NULL);
So could you tell me what is exactly the problem? From searching the internet, people were saying it has something to do with the character set with the preprocessor, but i'm not exactly sure what to do .
Upvotes: 3
Views: 2381
Reputation: 6564
The name CreateWindow
is a macro. The real Win32 API functions are 2: CreateWindowA
for ANSI and CreateWindowW
for Unicode. Depending on UNICODE
definition is used one of them.
Upvotes: 3