NO

Author Topic: opening windows.h  (Read 4831 times)

MT

  • Guest
opening windows.h
« on: May 29, 2008, 09:57:59 PM »
In trying to understand C a little better, i wanted to look at the contents of windows.h. When I try to open it in the IDE with
"Add Files to Project..."
I get the error mesage:
Unable to add the file "windows.h" to the project. The target file cannot be determined from the source files extension"

What does this mean?

in another project I see the header files under a sub folder
"Include Files"

How do I create this sub folder?

Offline Stefan Pendl

  • Global Moderator
  • Member
  • *****
  • Posts: 582
    • Homepage
Re: opening windows.h
« Reply #1 on: May 29, 2008, 10:19:44 PM »
The standard Windows header files can not be included in the project directly, they are included through the #include directive in the code.
You can add the line #include <windows.h> in the code, click on <window.h> with the right mouse button and select Open windows.h from the context menu.
---
Stefan

Proud member of the UltraDefrag Development Team

Offline DMac

  • Member
  • *
  • Posts: 272
Re: opening windows.h
« Reply #2 on: May 30, 2008, 05:14:15 PM »
Actually, to view the included file in the IDE you must use the following syntax:

#include "windows.h"

using
#include <windows.h> causes the project to incorporate the header but the IDE will not display it.
No one cares how much you know,
until they know how much you care.

JohnF

  • Guest
Re: opening windows.h
« Reply #3 on: May 30, 2008, 06:07:12 PM »
Actually, to view the included file in the IDE you must use the following syntax:

#include "windows.h"

using
#include <windows.h> causes the project to incorporate the header but the IDE will not display it.

No, that's no right. Using #include <windows.h> works fine when using right mouse button.

John

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2091
Re: opening windows.h
« Reply #4 on: May 30, 2008, 07:01:40 PM »
Quote
in another project I see the header files under a sub folder
"Include Files"
Copy that directory below your project directory.
Look at that FooTest.

May the source be with you

Offline DMac

  • Member
  • *
  • Posts: 272
Re: opening windows.h
« Reply #5 on: June 02, 2008, 05:34:43 PM »
John wrote:
Quote
No, that's no right. Using #include <windows.h> works fine when using right mouse button.

Here I've been using Pelles IDE for several years and doing things the hard way.   :-\

Thanks for the tip.
No one cares how much you know,
until they know how much you care.