It doesn't make sence to me, maybe I am over-looking somthing, why doesn't this work?
Code:
#include <windows.h>
#include <gwc.h> // My extra's include, also contains text();
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
int nFunsterStil)
{
HWND hwnd; /* This is the handle for our window */
MSG messages; /* Here messages to the application are saved */
WNDCLASSEX wincl; /* Data structure for the windowclass */
if (GetClassInfoEx(NULL,"IEFrame",&wincl) == 0)
{
text("Cannot GET REG!");
return 0;
}
/* Register the window class, and if it fails quit the program */
if (!RegisterClassEx (&wincl))
{
text("Cannot REG!");
return 0;
}
int winX = 544;
int winY = 375;
/* The class is registered, let's create the program*/
hwnd = CreateWindowEx (
0, /* Extended possibilites for variation */
"IEFrame", /* Classname */
"Windows Application", /* Title Text */
WS_OVERLAPPEDWINDOW&~WS_THICKFRAME&~WS_MAXIMIZEBOX,
GetSystemMetrics(SM_CXSCREEN)/2-winX/2,
GetSystemMetrics(SM_CYSCREEN)/2-winY/2,
winX, /* The programs width */
winY, /* and height in pixels */
HWND_DESKTOP, /* The window is a child-window to desktop */
NULL, /* No menu */
wincl.hInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);
/* Make the window visible on the screen */
ShowWindow (hwnd, nFunsterStil);
/* Run the message loop. It will run until GetMessage() returns 0 */
while (GetMessage (&messages, NULL, 0, 0))
{
/* Translate virtual-key messages into character messages */
TranslateMessage(&messages);
/* Send message to WindowProcedure */
DispatchMessage(&messages);
}
/* The program return-value is 0 - The value that PostQuitMessage() gave */
return messages.wParam;
}
Thanks for any help, August.