My first windows program.

I'm not sure what i did wrong care to explain?

line 4 expected constructer, destructer, or type conversion before '.' token


#include <windows.h>

WNDCLASSEX WndClsEx;
WndClsEx.cbSize = sizeof(WNDCLASSEX);
WndClsEx = CS_HREDRAW | CS_VREDRAW;
WndClsEx lpfnWndProc = WndProcedure;
WndClsEx.cbClsExtra = 0;
WndClsEx.cbWndExtra = 0;
WndClsEx.hicon = LoadIcon(NULL, IDI_APPLICATION);
WndClsEx.hCursor = LoadCursor(NULL, IDC_CROSS);
WndClsEx.hbrBackground = (HBRUSH)GetStockObject(White_Brush);
WndClsEx.lpszMenuName = NULL;
WndClsEx.lpszClassName = "GlowDotWin32TutorialPart1";
WndClsEx.hIconSm = LoadIcon(NULL, IDI_APPLICATION);

HWND hWnd = CreateWindow("GlowDotWin32TutorialPart1",
"GlowDot Win32 Tutorial - Part1",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hInstance,
NULL);

ShowWindow(hWnd, SW_SHOWNORMAL);
UpdateWindow(hWnd);

LRESULT CALLBACK WndProcedure(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);

while( (hRet = GetMessage( &msg, NULL, 0, 0)) != 0)
{
if (hRet == -1)
{

}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
Wow cant believe i did not see that, nvm people i fixed it.
Oh never-mind that did not help. Still the same error message....
Move the line LRESULT CALLBACK WndProcedure(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); at the top.
It seems that did not work.
Of course this is incorrect too:
WndClsEx lpfnWndProc = WndProcedure;

Topic archived. No new replies allowed.