Wine, WineLib and "Programming Windows 95"
Table of contents
- General
- Introduction
- News
- Testing configuration
- Statistics
- Installation
- Wine notes
- Winelib notes
- Test Results
- API Index
This book came out soon after Windows 95 and explains how to use the, then
new, Win32 API. The focus is on simple GUI applications so there is not much
in terms of system level programming for instance. Also it does not make use
of the MFC or C++ which means the sample programs test the Win32 API directly
and should be relatively simple to compile.
Get the complete testing kit, including these pages, from:
PrgWin95-0.2.2.tar.gz
(it's released under the X11 license)
- 0.2.2: Updated the Wine test results. A lot of bugs have been fixed.
Unfortunately the Winelib side of things is now pretty obsolete and needs
a complete update :-(
- 0.2.1: Reporting some fixes in Wine.
- The edit flicker has been fixed by Ulrich Czekalla. Great work!
- The menu separator bug has been fixed.
- The enhanced metafile limitations that plagged emf1 have been fixed.
- 0.2.0: Major update, now uses the winemaker-based wpbtk.
- Retested most examples with the latest Wine.
- The Winelib tests now use winemaker-based makefiles and
thus they can (finally) be used with the latest Wine.
- Winelib applications are now linked with Wine's msvcrt.dll which solves
most C library related compilation problems.
- Converted the screenshots to png :-).
The tests have been performed on my Linux box:
- Linux: Debian 2.2 (potato)
- Kernel: 2.2.17pre6
- Libc: glibc 2.2.1
- X Server: XFree86 4.2.0 in 1920x1440x24
- Gcc version: 2.95.2
- G++ version: 2.95.2
- Wine version: Usually the CVS version as of the date indicated for
each test
- Windows version: Windows 98
I sometimes say that the values I get are different from what I get on
Windows. In that case the reference is a Windows 98 laptop running in
1024x768x16. Of course I ignored differences related to the resolution.
84 examples
84 have been tested (100%)
|
22 have Wine errors (26% of tested) |
16 have warnings (19% of tested) |
for a total of 38 errors |
for a total of 22 warnings |
11 have Winelib errors (13% of total) |
4 have warnings (5% of total) |
for a total of 15 errors |
for a total of 5 warnings |
79 executables |
0 Winelib executables (0%) |
5 libraries |
0 Winelib libraries (0%) |
102 C files |
0 compiled (0%) |
4 C++ files |
0 compiled (0%) |
27 RC files |
0 compiled (0%) |
To install this testing kit follow these steps:
#Copy the contents of the CD to some directory.
mkdir PrgWin95
cd PrgWin95
cp -r /cdrom/Code/* .
# The directories and files will be read-only, make them read-write
chmod -R u+w *
# Run winemaker as follows
winemaker --nogenerated-files .
# Uncompress the contents of the testing kit. Adapt to the version you got
tar xvfz ~/PrgWin95-0.2.1.tar.gz
# Then complete the setup.
./generate --setup
# And prepare the compilation
./configure --with-wine=$HOME/wine
# Make sure you have set up the environment correctly for using Wine
# Then recompile everything, keeping a log
make 2>&1 | tee make.log
To compile and perform the tests with Wine you will need to set up
the Wine environment (LD_LIBRARY_PATH and PATH) as you usually do when
you want to use Wine.
- In desktop mode the background is initially all
black but as windows are moved the real background color appears from
under the window.
- 'Alt-F4' works but not 'Ctrl-Esc' ("Switch to ..."). Using the mouse
I get the "Tasks" window so it must be something in the handling of
the keyboard shortcut.
- In the "Tasks" window:
- "File/Run Application" does not work. I get the following message
in the console:
fixme:shell:RunFileDlg (0x00000570 0x0 0x0 "Run Application" "(null)" 0x0):stub.
- "Tile Windows" says
fixme:mdi:TileWindows (0x00000000,0x00000001,...,0,...): stub
- "Shutdown Windows" does not seem to do anything.
- Most compilation/link problems related to the C
library have been solved now that we can link with msvcrt.dll (actually,
crtdll.dll can be used too).
We still get a few errors because we lack
the proper C headers (e.g. we need to map atoi to _atoi). But that is
coming too.
- Most cases where the Winelib version did not work as well as the native
executable under Wine have been solved. I believe most were related to
resource linking problems. There are still issues
with 9/hugopoem, 15/poppad, 20/caller, 20/callpub
- Chapter 2 - Hello, Windows 95 (Hello, Windows 95)
- Chapter 3 - Displaying text (Afficher du texte)
- Chapter 4 - Graphism, the basics (Les bases du graphisme)
- Chapter 5 - The keyboard (Le clavier)
- Chapter 6 - The mouse (La souris)
- Chapter 7 - The clock (L'horloge)
- Chapter 8 - The child windows (Les fenêtres enfants)
- Chapter 9 - Using resources (Utiliser les ressources)
- Chapter 10 - Menus and keyboard shortcuts (Menus et raccourcis clavier)
- Chapter 11 - Dialog boxes (Les boîtes de dialogue)
- Chapter 12 - The modern user interface (L'interface utilisateur moderne)
- Chapter 14 - Multitaksing and multithreading (Multitâche et multithreading)
- Chapter 15 - Using the printer (Utilisation de l'imprimante)
- Chapter 16 - The clipboard (Le Presse-papiers)
- Chapter 17 - Dynamic Data Exchange (DDE) (Echange dynamique de données (DDE))
- Chapter 18 - The multi-document interface (MDI) (Interface pour documents multiples (MDI))
- Chapter 19 - Dynamically linked libraries (DLL) (Bibliothèques de liens dynamiques (DLL))
- Chapter 20 - Going further with OLE? (Pour aller plus loin avec OLE ?)
This is an inverted list of the APIs used by the examples. Click on one of the functions to find which of the sample programs invoke it.
- COMCTL32
CreateToolbarEx, ImageList_LoadImageA, PropertySheetA
- GDI32
AbortDoc, BeginPath, BitBlt, CloseEnhMetaFile, CloseMetaFile, ClosePrinter, CombineRgn, CreateBitmap, CreateBitmapIndirect, CreateCompatibleBitmap, CreateCompatibleDC, CreateDCA, CreateEllipticRgn, CreateEnhMetaFileA, CreateFontIndirectA, CreateHatchBrush, CreateICA, CreateMetaFileA, CreatePatternBrush, CreateRectRgn, CreateSolidBrush, DPtoLP, DeleteDC, DeleteEnhMetaFile, DeleteMetaFile, DeleteObject, Ellipse, EndDoc, EndPage, EndPath, EnumPrintersA, ExtCreatePen, ExtEscape, ExtTextOutA, GetBkColor, GetDeviceCaps, GetEnhMetaFileA, GetObjectA, GetStockObject, GetTextColor, GetTextExtentPoint32A, GetTextExtentPointA, GetTextMetricsA, LineTo, ModifyWorldTransform, MoveToEx, OpenPrinterA, PlayEnhMetaFile, PlayMetaFile, PolyBezier, Polygon, Polyline, PrinterProperties, Rectangle, RestoreDC, RoundRect, SaveDC, SelectClipRgn, SelectObject, SetAbortProc, SetBkColor, SetBkMode, SetGraphicsMode, SetMapMode, SetPixel, SetROP2, SetTextAlign, SetTextColor, SetTextJustification, SetViewportExtEx, SetViewportOrgEx, SetWindowExtEx, SetWindowOrgEx, StartDocA, StartPage, StretchBlt, StrokePath, TextOutA
- KERNEL32
CloseHandle, CompareStringA, CompareStringW, CreateEventA, CreateFileA, CreateFileMappingA, CreateThread, DeleteCriticalSection, DisableThreadLibraryCalls, EnterCriticalSection, ExitProcess, ExitThread, FindResourceA, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, FreeLibrary, FreeResource, GetACP, GetCPInfo, GetCommandLineA, GetCurrentDirectoryA, GetCurrentThreadId, GetDriveTypeA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetFullPathNameA, GetLastError, GetLocalTime, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetProcessHeap, GetProfileIntA, GetProfileStringA, GetStartupInfoA, GetStdHandle, GetStringTypeA, GetStringTypeW, GetTickCount, GetTimeZoneInformation, GetVersion, GlobalAddAtomA, GlobalAlloc, GlobalDeleteAtom, GlobalFree, GlobalGetAtomNameA, GlobalLock, GlobalUnlock, HeapAlloc, HeapCompact, HeapCreate, HeapDestroy, HeapFree, HeapReAlloc, HeapSize, HeapWalk, InitializeCriticalSection, LCMapStringA, LCMapStringW, LeaveCriticalSection, LoadLibraryA, LoadResource, LockResource, MapViewOfFile, MultiByteToWideChar, OpenFile, RaiseException, ReadFile, ResumeThread, RtlUnwind, SetCurrentDirectoryA, SetEndOfFile, SetEnvironmentVariableA, SetEvent, SetFilePointer, SetHandleCount, SetLastError, SetStdHandle, Sleep, TlsAlloc, TlsGetValue, TlsSetValue, UnhandledExceptionFilter, UnmapViewOfFile, WaitForSingleObject, WideCharToMultiByte, WinExec, WriteFile, _lclose, _lread, lstrcmpA, lstrcmpiA, lstrcpyA, lstrlenA
- USER32
AppendMenuA, BeginPaint, CallWindowProcA, ChangeClipboardChain, CharNextA, CharUpperA, CheckMenuItem, CheckRadioButton, ClientToScreen, CloseClipboard, CreateCaret, CreateDialogParamA, CreateMenu, CreateWindowExA, DdeClientTransaction, DdeConnect, DdeCreateDataHandle, DdeCreateStringHandleA, DdeDisconnect, DdeFreeStringHandle, DdeGetData, DdeInitializeA, DdeNameService, DdePostAdvise, DdeQueryStringA, DdeUninitialize, DefFrameProcA, DefMDIChildProcA, DefWindowProcA, DeleteMenu, DestroyCaret, DestroyMenu, DestroyWindow, DialogBoxParamA, DispatchMessageA, DrawFocusRect, DrawIcon, DrawMenuBar, DrawTextA, EnableMenuItem, EnableWindow, EndDialog, EndPaint, EnumChildWindows, EnumWindows, FillRect, FrameRect, FreeDDElParam, GetClassNameA, GetClientRect, GetClipboardData, GetCursorPos, GetDC, GetDesktopWindow, GetDialogBaseUnits, GetDlgItem, GetDlgItemTextA, GetFocus, GetKeyState, GetMenu, GetMenuItemCount, GetMenuStringA, GetMessageA, GetParent, GetScrollPos, GetSubMenu, GetSysColor, GetSystemMenu, GetSystemMetrics, GetWindow, GetWindowLongA, GetWindowRect, GetWindowTextA, GetWindowTextLengthA, GetWindowWord, HideCaret, InvalidateRect, InvertRect, IsClipboardFormatAvailable, IsDialogMessageA, IsRectEmpty, IsWindow, IsWindowEnabled, IsWindowVisible, KillTimer, LoadAcceleratorsA, LoadBitmapA, LoadCursorA, LoadIconA, LoadMenuA, LoadStringA, LockWindowUpdate, MessageBeep, MessageBoxA, MoveWindow, OpenClipboard, PackDDElParam, PeekMessageA, PostMessageA, PostQuitMessage, PtInRect, RegisterClassExA, RegisterWindowMessageA, ReleaseCapture, ReleaseDC, ScreenToClient, ScrollWindow, SendDlgItemMessageA, SendMessageA, SetActiveWindow, SetCapture, SetCaretPos, SetClassLongA, SetClipboardViewer, SetCursor, SetCursorPos, SetDlgItemInt, SetDlgItemTextA, SetFocus, SetMenu, SetParent, SetRect, SetScrollPos, SetScrollRange, SetTimer, SetWindowLongA, SetWindowTextA, SetWindowWord, ShowCaret, ShowCursor, ShowWindow, TrackPopupMenu, TranslateAcceleratorA, TranslateMDISysAccel, TranslateMessage, UnpackDDElParam, UpdateWindow, ValidateRect, wsprintfA
- WINMM
PlaySoundA
- comdlg32
ChooseColorA, ChooseFontA, FindTextA, GetFileTitleA, GetOpenFileNameA, GetSaveFileNameA, PrintDlgA, ReplaceTextA
- imalloc
CreateAllocator
- ole32
CoCreateInstance, CoInitialize, CoUninitialize