Error expression expected before line 32?

I willpoint to line 32 with a arrow like this "<--".


#include <windows.h>



LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{

PAINTSTRUCT paint;

HDC hDC;

char string[] = "Hello World";

switch(msg){
// Window is being created
case WM_CREATE:
//Return it to make sure it works properly and displays the error messages
return 0;
// And then break the switch statement for efficiency factors.
break;
case WM_CLOSE:
// see if the window is closes
PostQuitMessage(1);
// if so send a message to the window telling it to close
return 0;
// check for errors
break;
// break it again

case WM_PAINT:
hDC = BeginPaint(hwnd, &paint);
SetTextColor(hDC,COLORREF("0x00FF0000"));
TextOut(hDC, 150, 150, string, sizeof(string)-1);
EndPaint(hwnd, &paint);
return 0;
break;

default:
break;

return (DefWindowProc(hwnd, msg, wParam, lParam));
}



}
int APIENTRY WinMain(HINSTANCE DERP,
HINSTANCE hp,
LPSTR CmdLine,
int cmdshow ){

}
Sorry I forgot to put the arrow, but the line is the one that starts out with SetTextColor. It is only used ounce in the whole source, should not be hard to find.
Look here:

http://msdn.microsoft.com/en-us/library/windows/desktop/dd183449%28v=vs.85%29.aspx

COLORREF does not take a string. Just remove the "
Topic archived. No new replies allowed.