Wine, WineLib and "Programming Windows 95"
Last updated: 2001/4/1
Shows how to build an MDI application. mdidemo allows you to open two
kinds of windows. The first kind contains a 'Hello' message, while the
second kind contains random rectangle that keep being updated. You can open
as many windows as you want, move them around, iconize them, tile them, etc.
- When there is no child window open the 'File' menu
contains an extra menu separator at the bottom of the menu. This extra
separator disappears as soon as a child window is opened (and the menu
is changed slightly).
- The background of the client area is of the wrong
color: it is of the light grey instead of the dark grey.
- Clicking on the title bar of a child window should
make it active but it does not. One has to move the window to make it
- Iconized windows appear as... well, icons. But in
Win32 that's not how they are supposed to look like. Also the placement
is wrong. The icon should appear at the bottom of the window but instead
there is a space below it.
- When a rectangle window is being iconized it is
still being updated and you can see rectangles being drawn on top of the
icon. This is not good!
- The menu of iconized windows is incorrect. It's
the same as that of an application but should be different. In
particular it's missing a 'next' entry for activating another child
window. Also the 'Switch to...', 'About Wine' and 'Put mark in debug
log' are probably superfluous in this context.
- Here's a little recipe: start mdidemo, open two
hello child windows, go to close mdidemo and say cancel to both
questions. What did you notice? The window that was at the bottom in Z
order is now on top. In Windows there is no reshuffling of the window
- There is way too much flicker (caused by
repeatedly switching the focus from one window to the other) when one
tries to quit and there are hello windows open.
- When a child window does not fit into the
client area scrollbars appear. They do not in Windows. Maybe having
scrollbars appear is an option and Wine is not paying attention.
CreateSolidBrush, DeleteObject, GetStockObject, Rectangle, SelectObject, SetTextColor
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetProcessHeap, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
BeginPaint, CheckMenuItem, CreateWindowExA, DefFrameProcA, DefMDIChildProcA, DestroyMenu, DispatchMessageA, DrawMenuBar, DrawTextA, EndPaint, EnumChildWindows, GetClientRect, GetDC, GetMenu, GetMessageA, GetParent, GetSubMenu, GetWindow, GetWindowLongA, InvalidateRect, IsWindow, KillTimer, LoadAcceleratorsA, LoadCursorA, LoadIconA, LoadMenuA, MessageBoxA, PostQuitMessage, RegisterClassExA, ReleaseDC, SendMessageA, SetTimer, SetWindowLongA, ShowWindow, TranslateAcceleratorA, TranslateMDISysAccel, TranslateMessage, UpdateWindow