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!

could somebody PLEASE take a look at this?!?!?!?!?!

Status
Not open for further replies.

goomouse

Programmer
Feb 22, 2003
1
AT
"I seem to have 3 errors in this and they are all from here" hWnd CreateMainWindow(HINSTANCE hInstance) "to here. It says that there is missing a ; before the identifier CreateWindowMain. Here is the rest of the code (its only a simple Windows in Windows)
{
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
);


}


than you
goomouse
 
I think the problem is you are using a variable, not a 'typedef' in your definition. In the line where there are the errors (start of function) change 'hWnd' to HWND, i.e.
Code:
HWND CreateMainWindow(HINSTANCE hInstance)
   {
      ...rest of code stays the same in here.
   }
You will also need to change your prototype definition:
Code:
HWND CreateMainWindow(HINSTANCE);
Hope this works for you - Adonai :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top