Vote UpVote

Translating flags in API calls, part 1

Source Code Adventures – OK, so we have all seen the way that flags are passed to API calls. Take the ShowWindow function. In Delphi it is declared as this: function ShowWindow(hWnd: HWND; nCmdShow: Integer): BOOL; stdcall; Now, there is nothing wrong with the declaration – it will work, is well documented and is of course not seen by most Delphi developers, since the calls are all wrapped up in the Delphi VCL. Thing is, that the nCmdShow parameter is declared as in integer (even in the Windows API docs) but functionally, it acts as an enumerated type. That is to say, it has a defined set of values, and only those ...
Favorite? Off-Topic? Cobus Kruger @ 2009-06-28 11:46


Visits: 47
Votes: 0
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News


Please login or register to use this functionality.
(click on this box to dismiss)