Compiling error " F1005 Include files nested too deep

Started by
25 comments, last by ernestovr 19 years, 6 months ago
I understand that it may be a bigger project that I should be taken on but I'm waiting for a class to start and I'm trying to get my hands wet. I bought one of this books that give you some lesons it was no big deal getting the skeleton done so I thought I could go forward. I'm starting to think that I should wait for the class. Thank you very much.
Advertisement
EDIT: Nevermind didn't read your reply fully seems you got it.
No I diden't get it as far as I know everything is right but it continues to give me the same error. I think it may be because I'm using Borland C++BuilderX.
What I don't understand is that I'm using a sample code from a book that I'm reading (SAMS Teach Yourself Game Programming in 24 Hours).

Ernesto.
If an example is not working, then you've set up your compiler wrong. Btw - have you provided the WndProc function?

I'll throw an example of very basic Win32 application - does nothing, but creates an empty window, but it may be helpful to you:

#include <windows.h>const char *className = "win32app";//just a declaration - so the compiler knows "there's something called WndProc"LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);//this is the entry point of the applicationint WINAPI WinMain (HINSTANCE hInstance, HINSTANCE, LPSTR, int){  //now - I'll register the window class  WNDCLASS wc;  wc.style         = CS_HREDRAW | CS_VREDRAW;       //I want the window to be redrawn whenever vertical or horizontal resize happens  wc.lpfnWndProc   = WndProc;                       //the compiler already knows, there's someting called WndProc (look above)  wc.cbClsExtra    = 0;                             //I don't want an extra bytes  wc.cbWndExtra    = 0;                             //here neither  wc.hInstance     = hInstance;                     //the handle of instance  wc.hIcon         = LoadIcon (0, IDI_APPLICATION); //standard windows-provided icon - because I don't have one =)  wc.hCursor       = LoadCursor (0, IDC_ARROW);     //standard arrow cursor  wc.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);    //use standard window background  wc.lpszMenuName  = 0;                             //no menu  wc.lpszClassName = className;                     //the name of the class  RegisterClass (&wc);  //register the class  //now - I'll create the window  HWND hWnd = CreateWindowEx (    0,                             //no extended window style    className,                     //the name of the class I've just registered    "A simple win32 application",  //window title    WS_OVERLAPPEDWINDOW,           //window style    CW_USEDEFAULT,                 //x-position - just use default positioning    CW_USEDEFAULT,                 //y-position...    CW_USEDEFAULT,                 //width    CW_USEDEFAULT,                 //height    0,                             //handle of parent - I'm creating toplevel window - it doesn't have a parent    0,                             //handle of menu - the window doesn't have any    hInstance,                     //handle of instance    0                              //an extra parameter  );  //next, I'll make the window visible  ShowWindow (hWnd, SW_SHOW);  UpdateWindow (hWnd);  //then, I'll enter the game message loop (game, because, that's probably what you're interested in)  MSG msg;    while (true) {    //see, wheter there's a message    if (PeekMessage (&msg, 0, 0, 0, PM_REMOVE)) {      //yes, there's one      //is it WM_QUIT?      if (msg.message == WM_QUIT)        break;  //yes, break the loop      //no, it's something other - process it      TranslateMessage (&msg);      DispatchMessage (&msg);    } else {      //no, there's no message      //let's do something fancy here =)    }  }  return msg.wParam;  //the end}//the window procedureLRESULT CALLBACK WndProc (HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam){  //see, what message it is  switch (msg) {    case WM_DESTROY: {      //window-destruction (closing) message (so, the window is able to be closed)      PostQuitMessage (0);      return 0;    }  }  //no message, I'm interested in - pass it back to the OS  return DefWindowProc (hWnd, msg, wParam, lParam);}


This won't create any basic game or whatever, but it'll create a window. [smile]

If there's something unclear about it - just ask [smile]

Oxyd
Thank you Oxyd, I have checked all the code in the book and I'm not missing anything. Can I ask how did you put the pulldown into this window.

Thank you for you help.

Ernesto.
I looked at your code thank you, the first program I worked on did something that looks a lot like this. It was called skeleton. I'm comparing the code now to see the differences.

Again thank you.

Ernesto.

This topic is closed to new replies.

Advertisement