where can I find the Win32 API constants for C#
-
Hi All, Excuse me for my bad English. Who can tell me where I can found the constants needed to program win32 api within C#. For example in the Win32 API reference, I found the following procedure:
AddFontResourceEx The AddFontResourceEx function adds the font resource from the specified file to the system. Fonts added with the AddFontResourceEx function can be marked as private and not enumerable. int AddFontResourceEx( LPCTSTR lpszFilename, // font file name DWORD fl, // font characteristics PVOID pdv // reserved );
Where fl stands for Flags used to define how the private font resource is loaded. FR_PRIVATE FR_NOT_ENUM I can find in my books that these constants in C# corresponds with the flags:public const Int32 FR_PRIVATE = 0x10; public const Int32 FR_NOT_ENUM = 0x20;
But now my question. Where can I find the values like 0x10, 0x20 or all the others? I can't find it anywhere, who can help me with this. Thanks and regards, Wernand The Netherlands -
Hi All, Excuse me for my bad English. Who can tell me where I can found the constants needed to program win32 api within C#. For example in the Win32 API reference, I found the following procedure:
AddFontResourceEx The AddFontResourceEx function adds the font resource from the specified file to the system. Fonts added with the AddFontResourceEx function can be marked as private and not enumerable. int AddFontResourceEx( LPCTSTR lpszFilename, // font file name DWORD fl, // font characteristics PVOID pdv // reserved );
Where fl stands for Flags used to define how the private font resource is loaded. FR_PRIVATE FR_NOT_ENUM I can find in my books that these constants in C# corresponds with the flags:public const Int32 FR_PRIVATE = 0x10; public const Int32 FR_NOT_ENUM = 0x20;
But now my question. Where can I find the values like 0x10, 0x20 or all the others? I can't find it anywhere, who can help me with this. Thanks and regards, Wernand The NetherlandsI have found it on the msdn site from Microsoft. You can simple search in C++ SDK with findstr you get then the values: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include>findstr "FR_PRIVATE" *.h WinGDI.h:#define FR_PRIVATE 0x10 C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include>findstr "FR_NOT_ENUM" *.h WinGDI.h:#define FR_NOT_ENUM 0x20 :-D
-
I have found it on the msdn site from Microsoft. You can simple search in C++ SDK with findstr you get then the values: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include>findstr "FR_PRIVATE" *.h WinGDI.h:#define FR_PRIVATE 0x10 C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include>findstr "FR_NOT_ENUM" *.h WinGDI.h:#define FR_NOT_ENUM 0x20 :-D
-
Remember to just include the WinGDI.h in your program, and not to use the values directly. Your English is very good by the way, probably better than most people's Dutch! (Zeker weten). Ciao, Pauwl
Um, he's coding a C# app which doesn't use/understand include files. He has to define these (as consts, an enum, whatever) in his source.
-----BEGIN GEEK CODE BLOCK----- Version: 3.21 GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++ -----END GEEK CODE BLOCK-----
-
Hi All, Excuse me for my bad English. Who can tell me where I can found the constants needed to program win32 api within C#. For example in the Win32 API reference, I found the following procedure:
AddFontResourceEx The AddFontResourceEx function adds the font resource from the specified file to the system. Fonts added with the AddFontResourceEx function can be marked as private and not enumerable. int AddFontResourceEx( LPCTSTR lpszFilename, // font file name DWORD fl, // font characteristics PVOID pdv // reserved );
Where fl stands for Flags used to define how the private font resource is loaded. FR_PRIVATE FR_NOT_ENUM I can find in my books that these constants in C# corresponds with the flags:public const Int32 FR_PRIVATE = 0x10; public const Int32 FR_NOT_ENUM = 0x20;
But now my question. Where can I find the values like 0x10, 0x20 or all the others? I can't find it anywhere, who can help me with this. Thanks and regards, Wernand The Netherlands