Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

if "adholioshake" is still around please click here

Status
Not open for further replies.

tunahead

Programmer
Feb 22, 2003
9
AT
(by the way i am goomouse only that the other acount doesn´t work)

I did what you said but it aint working
any other ideas?
if so, thanks

HWND CreateMainWindow(HINSTANCE hInstance)
{
WNDCLASSEX wndClass; //WNDCLASSEX Struktur

//Struktur initialisieren
wndClass.cbSize=sizeof(WNDCLASSEX); //Größe angeben
wndClass.style =CS_DBLCLKS | CS_OWNDC|//Standart
CS_HREDRAW | CS_VREDRAW;//Stile

//Callbackfunktion angeben (noch nicht durchgenommen)
wndClass.lpfnWndProc=MessageHandler;

wndClass.cbClsExtra=0; //Zusätzliche Angaben
wndClass.cbWndExtra=0; //Werden nicht benötigt
wndClass.hInstance=hInstance; //Anwendungsinstanz

//Weisser Pinsel zum füllen des fensterhintergrunds
wndClass.hbrBackground=
(HBRUSH)GetStockObject(WHITE_BRUSH);

//Standart-Mauscursor verwenden
wndClass.hCursor=LoadCursor(NULL, IDC_ARROW);

//Das Fenster soll kein Menü haben
wndClass.lpszMenuName=NULL;

//Der Name der Fensterklasse wird noch beim Aufruf vonCreateWindowEx benötigt
wndClass.lpszClassName="WindowClass";

//Icons für das Fenster festlegen:
wndClass.hIcon=LoadIcon(NULL, IDI_WINLOGO);
wndClass.hIconSm=LoadIcon(NULL, IDI_WINLOGO);

//Fensterklasse registrieren, damit sie von
//CreateWindowEx verwendet werden kann
RegisterClassEx(&wndClass);

//Der Rückgabewert von CreateWindowEx is auch der Rückgabewert von der
//Funktion:
return CreateWindowEx(
NULL, //Ohne erweiterte Stile
"WindowClass", //Klassenname
"Ein einfaches Fenter", //Fenstertitel
WS_OVERLAPPEDWINDOW, //Fenstereingenschaften
WS_VISIBLE,
0, 0, //Anfangsposition
400, 300, //Größe
NULL, //Handle des Elterfensters
NULL, //Handle des Menüs
hInstance, //Anwendungsinstanz
NULL, //Nicht benötigt
);


}
 
What are the error messages - It's not the same line again is it? Perhaps the return function requires
Code:
CreateWindowEx(...)
in brackets to process it.
ie.
Code:
return(CreateWindowEx(...));
Please post any error messages so I can see what is wrong better. Thanks, Adonai.
 
I need the error messages to fully assess what is wrong with the code. A suggestion, put CreateWindowEx(...) in paretheses, ie.
Code:
return(CreateWindowEx(...));
If more probs post error msgs - Adonai.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top