>so my qusetion is that :I need to know how many
>the libraries under C language until this day.. ?
It sounds like you just want to focus on Win32 for now. You can start here , but eventually you'll be checking MSDN regularly.
Note that GUI programming is not easy as there's quite a learning curve when coming from console applications.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
>but I would like to know how many libraries on C language until today is there any location.?
There are thousands upon thousands of C libraries. And no, there's no centralized location.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
No, windows.h is definitely not part of the c/c++ standard.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
>but why they say ..:programming under win32 using C language ..!
You're using the C language to access the Win32 API through a C interface (the header and library).
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
It just means you can use C language to build gui MS-Windows programs. You can also use other languages, such as C#, VB, php, C++, and others. The win32 api functions were made by Microsoft to be called by as many different programming languages as possible. windows.h is just a header file used within C and C++ language.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
The functions declared in windows.h can be used in all languges. windows.h is specific to C and C++. The other languages have a similar header file that is targeted to that language, but they all reference the same win32 api functions.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
>do you mean there is no difference in any thing when I
>use in C langauge and when I use it in C++ ?
More or less.
>then why they say programming win32 by C and programming win32 by C++..!?
Probably because it's true. "Win32 by C" means a C program that uses Win32. Likewise, "Win32 by C++" means a C++ program that uses Win32. C and C++ are different languages, so it's a rather important distinction even if is usable in both.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
Some addition.
The original MS windows.h header is a root of the lots of include files: windef.h, winbase.h, wingdi.h and others. In itself it contains few declarations.
Open these files (any) and search the __cplusplus identifier. It's the key point to understand why the single window.h used in C and C++ (different) languages.
The program in C++ can use functions written in C (but not vice versa). The C++ Standard requires that "The name _ _ cplusplus is defined to the value [tbd] when compiling a C++ translation unit" (defined as a macros). In other words you (and MS) can write headers with common for C and C++ preprocessor conditional statements which are "sensitive" to the compiled unit language.
All classic Windows API functions have C interface (written in C). For example (all-capital words are type aliases defined by typedef):
VOID GetSystemTime(LPSYSTEMTIME lpst);
VOID GetSystemInfo(LPSYSTEM_INFO lpSystemInfo);
The program in C needs these prototypes. The program in C++ needs to know that these functions written in C:
extern "C" {
VOID GetSystemTime(LPSYSTEMTIME lpst);
VOID GetSystemInfo(LPSYSTEM_INFO lpSystemInfo);
}
Let's invent common code:
#ifdef __cplusplus
extern "C" { /* skip this line if it's C code compiled */
#endif
VOID GetSystemTime(LPSYSTEMTIME lpst);
VOID GetSystemInfo(LPSYSTEM_INFO lpSystemInfo);
#ifdef __cplusplus
} /* /* skip this line if it's C code compiled */
#endif
That's why C and C++ can use common system headers...
ArkM
Postaholic
2,001 posts since Jul 2008
Reputation Points: 1,234
Solved Threads: 348