Windows Programming Tips
From Lazarus-ccr
This page is dedicated to desktop Windows programming tips.
Contents |
[edit] Other Interfaces
- Lazarus known issues (things that will never be fixed) - A list of interface compatibility issues
- Win32/64 Interface - The winapi interface for Windows 95/98/Me/2K/XP/Vista, but not CE
- GTK1 Interface - The gtk1 for Unixes, Mac OS X, Windows
- GTK2 Interface - The gtk2 for Unixes, Mac OS X, Windows
- Carbon Interface - The Carbon Interface for Mac OS X
- Qt Interface - The Qt 4 Interface for Unixes, Mac OS X and linux-based PDAs
- Windows CE Interface - For Pocket PC and Smartphones
- fpGUI Interface - A widgetset completely written in Object Pascal
- Cocoa Interface - The Cocoa Interface for Mac OS X
[edit] Platform specific Tips
- OS X Programming Tips - Lazarus installation, useful tools, Unix commands, and more...
- WinCE Programming Tips - Using the telephone API, sending SMSes, and more...
- Windows Programming Tips - Desktop Windows programming tips.
[edit] Interfaces Development Articles
- Carbon interface internals - If you want to help improving the Carbon interface
- Windows CE Development Notes - For Pocket PC and Smartphones
- Adding a new interface - How to add a new widget set interface
- LCL Defines - Choosing the right options to recompile LCL
[edit] Code snipets
[edit] Listing all available drives
program listdevices; {$ifdef fpc}{$mode delphi}{$endif} {$apptype console} uses Windows; var Drive: Char; DriveLetter: string; begin WriteLn('The following drives were found in this computer:'); WriteLn(''); // Search all drive letters for Drive := 'A' to 'Z' do begin DriveLetter := Drive + ':\'; case GetDriveType(PChar(DriveLetter)) of DRIVE_REMOVABLE: WriteLn(DriveLetter + ' Floppy Drive'); DRIVE_FIXED: WriteLn(DriveLetter + ' Fixed Drive'); DRIVE_REMOTE: WriteLn(DriveLetter + ' Network Drive'); DRIVE_CDROM: WriteLn(DriveLetter + ' CD-ROM Drive'); DRIVE_RAMDISK: WriteLn(DriveLetter + ' RAM Disk'); end; end; // Also add a stop to see the result under Windows WriteLn(''); WriteLn('Please press <ENTER> to exit the program.'); ReadLn(DriveLetter); end.
