I am trying to create a simple window, and after compilation, it states that there is something wrong with this:
LRESULT CALLBACK WndProc(HWND hWindow, UINT msg, WPARAM wParam, LPARAM lParam)
{
HDC hDC;
PAINTSTRUCT ps;
RECT rect;
switch (msg)
{
case WM_PAINT:
//Draw some text centered in the client area of the main window
hDC = BeginPaint(hWindow, &ps);
GetClientRect(hWindow, &rect);
DrawText(hDC, TEXT("This is a skeleton application!"), -1, &rect,
DT_SINGLELINE | DT_CENTER | DT_ VCENTER);
EndPaint(hWindow, &ps);
return 0;
case WM_DESTROY:
//Exit the application
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hWindow, msg, wParam, lParam);
}
The error says that DT is undeclared. What can I do to fix this?
LRESULT CALLBACK WndProc(HWND hWindow, UINT msg, WPARAM wParam, LPARAM lParam)
{
HDC hDC;
PAINTSTRUCT ps;
RECT rect;
switch (msg)
{
case WM_PAINT:
//Draw some text centered in the client area of the main window
hDC = BeginPaint(hWindow, &ps);
GetClientRect(hWindow, &rect);
DrawText(hDC, TEXT("This is a skeleton application!"), -1, &rect,
DT_SINGLELINE | DT_CENTER | DT_ VCENTER);
EndPaint(hWindow, &ps);
return 0;
case WM_DESTROY:
//Exit the application
PostQuitMessage(0);
return 0;
}
return DefWindowProc(hWindow, msg, wParam, lParam);
}
The error says that DT is undeclared. What can I do to fix this?