Complete set: Intro to C - Bill Buchanan
Complete set: Intro to C - Bill Buchanan
Complete set: Intro to C - Bill Buchanan
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
1.3.1 Win32 API<br />
The Win32 API library contains many routines:<br />
• Creating windows.<br />
• Windows support functions.<br />
• Message processing.<br />
• Menus.<br />
• Resources.<br />
• Dialog boxes.<br />
• User input functions.<br />
• Memory management.<br />
• GDI (graphical device interface).<br />
• Bitmaps, icons and metafiles.<br />
• Printing and text output.<br />
• Painting and drawing.<br />
• File I/O.<br />
• Clipboard. Support for public and<br />
private clipboards.<br />
• Registry. Support for functions<br />
which access the Registry.<br />
• Initialization files. Support for<br />
functions which access INI files.<br />
• System information.<br />
• String manipulation.<br />
• Timers.<br />
• Processes and threads.<br />
• Error and exception processing.<br />
• Help files.<br />
• File compression/decompression.<br />
• DLLs.<br />
• Network support (NetBios and<br />
Windows sockets 1.1 APIs).<br />
• Multimedia support (sound<br />
APIs).<br />
• OLE and DDE (dynamic data exchange).<br />
• TrueType fonts.<br />
An example of a C++ call <strong>to</strong> these APIs is:<br />
duction <strong>to</strong> .NET<br />
<strong>Intro</strong><br />
Program 1.4: ClassComplexNumberExample<br />
#include <br />
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrev, LPSTR lpCmd, int nShow)<br />
{<br />
char msg[128];<br />
wsprintf(msg, "My name is Fred");<br />
MessageBox(GetFocus(), msg, "My first Window", MB_OK | MB_ICONINFORMATION);<br />
return(0);<br />
}<br />
Where the MessageBox() routine is a standard API call <strong>to</strong> show a basic message box,<br />
such as:<br />
Agilent .NET Course: <strong>Intro</strong>duction 7