Code:
LRESULT CALLBACK WndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc ;
PAINTSTRUCT ps ;
RECT rect ;
switch (message)
{
case WM_COMMAND:
switch (LOWORD(wParam))
{
//case to be changed later this is just for now
case ID_ARCHIVO_NUEVOCLIENTE:
//create new window or dialog window
NuevoClienteWindow = CreateDialog(GetModuleHandle(NULL),MAKEINTRESOURCE(IDD_DIALOG1), hwnd, NuevoCliente);
//we have to show the new window after it has been created
ShowWindow(NuevoClienteWindow, SW_SHOW);
break;
}
case WM_CREATE:
{
HWND ToolBar;
ToolBar= CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | WS_VISIBLE, 0, 0, 0, 0, hwnd, (HMENU)IDC_MAIN_TOOL, GetModuleHandle(NULL), NULL);
return 0 ;
}
case WM_PAINT:
{
hdc = BeginPaint (hwnd, &ps) ;
GetClientRect (hwnd, &rect) ;
DrawText (hdc, TEXT ("Long Project"), -1, &rect,
DT_SINGLELINE | DT_CENTER | DT_VCENTER) ;
EndPaint (hwnd, &ps) ;
return 0 ;
}
case WM_DESTROY:
PostQuitMessage (0) ;
return 0 ;
}
return DefWindowProc (hwnd, message, wParam, lParam) ;
}
//###############################//
ERRORS:
--------------------Configuration: Project - Win32 Debug--------------------
Compiling...
Main.cpp
D:\Documents and Settings\incognito\My Documents\Project\Project\Main.cpp(133) : error C2143: syntax error : missing ')' before ';'
D:\Documents and Settings\incognito\My Documents\Project\Project\Main.cpp(133) : error C2660: 'CreateWindowExA' : function does not take 10 parameters
D:\Documents and Settings\incognito\My Documents\Project\Project\Main.cpp(133) : error C2143: syntax error : missing ';' before ','
D:\Documents and Settings\incognito\My Documents\Project\Project\Main.cpp(133) : error C2059: syntax error : ')'
Error executing cl.exe.
Main.obj - 4 error(s), 0 warning(s)