Windows Programming Tips
From Lazarus wiki
Revision as of 15:30, 20 August 2008 by Sekelsenmat (talk | contribs) (New page: This page is dedicated to desktop Windows programming tips. __TOC__ {{Other Interfaces}} ==Code snipets== ===Listing all available drives=== <delphi> program listdevices; {$ifdef fpc...)
This page is dedicated to desktop Windows programming tips.
Other Interfaces
- Lazarus known issues (things that will never be fixed) - A list of interface compatibility issues
- Win32/64 Interface - The Windows API (formerly Win32 API) interface for Windows 95/98/Me/2000/XP/Vista/10, but not CE
- Windows CE Interface - For Pocket PC and Smartphones
- Carbon Interface - The Carbon 32 bit interface for macOS (deprecated; removed from macOS 10.15)
- Cocoa Interface - The Cocoa 64 bit interface for macOS
- Qt Interface - The Qt4 interface for Unixes, macOS, Windows, and Linux-based PDAs
- Qt5 Interface - The Qt5 interface for Unixes, macOS, Windows, and Linux-based PDAs
- GTK1 Interface - The gtk1 interface for Unixes, macOS (X11), Windows
- GTK2 Interface - The gtk2 interface for Unixes, macOS (X11), Windows
- GTK3 Interface - The gtk3 interface for Unixes, macOS (X11), Windows
- fpGUI Interface - Based on the fpGUI library, which is a cross-platform toolkit completely written in Object Pascal
- Custom Drawn Interface - A cross-platform LCL backend written completely in Object Pascal inside Lazarus. The Lazarus interface to Android.
Platform specific Tips
- Android Programming - For Android smartphones and tablets
- iPhone/iPod development - About using Objective Pascal to develop iOS applications
- FreeBSD Programming Tips - FreeBSD programming tips
- Linux Programming Tips - How to execute particular programming tasks in Linux
- macOS Programming Tips - Lazarus tips, useful tools, Unix commands, and more...
- WinCE Programming Tips - Using the telephone API, sending SMSes, and more...
- Windows Programming Tips - Desktop Windows programming tips
Interface 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
- LCL Internals - Some info about the inner workings of the LCL
- Cocoa Internals - Some info about the inner workings of the Cocoa widgetset
Code snipets
Listing all available drives
<delphi> 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. </delphi>