![]() ![]() Result := GetIcon(id, sisLarge, false, false) Ĭlass function TStockIcon.GetBmp(id: integer): TBitmap 'The stock icon identifier is invalid')Ĭlass function TStockIcon.GetIcon(id: integer): HICON ResCode := SHGetStockIconInfo(id, flags, SSII) SisShellSize: flags := SHGSI_ICON or SHGSI_SHELLICONSIZE SisSmall: flags := SHGSI_ICON or SHGSI_SMALLICON SisLarge: flags := SHGSI_ICON or SHGSI_LARGEICON you always want to get an icon so SHGSI_ICON is here in all choices Overlay, selected: boolean): Graphics.TBitmap overload Ĭlass function TStockIcon.GetIcon(id: integer size: TStockIconSize Overlay, selected: boolean): HICON overload Ĭlass function GetBmp(id: integer): Graphics.TBitmap overload // conflicts with "Windows" unitĬlass function GetBmp(id: integer size: TStockIconSize TStockIconSize = (sisLarge, sisSmall, sisShellSize) Ĭlass function GetIcon(id: integer): HICON overload Ĭlass function GetIcon(id: integer size: TStockIconSize I have put together a small utility class named “TStockIcon” that wraps calls to “SHGetStockIconInfo” and simplifies access to Windows Stock Icons. The “SHGetStockIconInfo” function takes an integer “id” of the icon we want to retrieve, “flags” argument that can be used to specify if we want normal or large size icons, and returns HResult and “TSHStockIconInfo” record as “out” parameter. It is not a new unit, but it works great with new Windows 7 APIs! In order to retrieve Windows Stock Icons in your Delphi code, you need to call “SHGetStockIconInfo” function defined in “ShellAPI” exported from shell32 Windows DLL. I was just reading through recent Dr.Bob’s excellent article on using new Windows 7 TaskBar in Delphi code (good stuff!) and though it would be cool to revisit just another area also covered by Windows API Code Pack: Windows Stock Icons.ĭelphi 2010 comes with “ShellAPI” unit that simplifies Windows Shell programming. Delphi also means great, very responsive IDE and standalone executables with no dependencies that will run on just any version of Windows, does not matter which version of. You get the best of two worlds: native, high performance code and elegant Visual Component Library. NET in the dark era of late Borland, are looking at Delphi again, because it continues to be the relevant choice for your just another new project and it combines native performance with the the power of visual RAD programming. WWS is designed from the ground up to be a completely native-code implementation of SOAP, including support for many of the WS-* protocols.”ĭelphi 2010 is gaining traction again, and many Delphi programmers that moved away to Java and. NET is the only and the best way to code for Windows, the native code is still recommended where performance matters, like in the case of new Windows 7 subsystems like Direct2D or Windows Web Service API. I like Kenny Kerr saying in “Introducting Direct2D” MSDN article, that “if you want to develop high-performance and high-quality commercial applications, you’ll still look to C++ and native code to deliver that power.” Another great comment from this author is on the new native Windows 7 Web Services API in another MSDN article “Windows Web Services”: “C++ developers no longer have to think of themselves as second-class citizens in the world of Web Services. ![]() NET programming languages, including C#, Delphi Prism and others, or resort to native programming, like Visual C++, Delphi and C++Builder. ![]() If you want to code for Windows you have the choice of using any of the. NET, which contains managed wrappers for p-invoked functionality available from native Windows API layer. NET developers with Windows API Code Pack for. The latest version of Delphi – Delphi 2010 – is the first release to support Windows 7, with all its latest and hottest additions including touch, multi-touch, gesturing and Direct2D. The Windows operating system is implemented in native C++ code and Delphi 2010 can directly leverage all its features without introducing additional layers of redirection, which is necessary in. Delphi is well-known for its rapid application development capabilities. It is not a big discovery that all applications are running in the environment provided by the underlying operating system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |