Wine, WineLib and "Programming Windows 95"
Last updated: 2003/5/4
Description
This example shows how to put bitmaps and menu items with weird fonts
and sizes in the menus. Note that the bitmap is actually put in the system
menu. Here are some screenshots showing what the application looks like in
Win95 and Win98:
Wine tests
- The look of the items when they are selected or
highlighted is different between Win95 and Win98 and... Wine. The best
is to check out the screenshots. I have also made Wine screenshots to
show how they now look in my modified Wine tree:
Win95 look screenshot
Win98 look screenshot
Winelib tests
Tested API
- GDI32
CreateBitmap, CreateBitmapIndirect, CreateCompatibleDC, CreateFontIndirectA, CreateICA, DeleteDC, DeleteObject, GetObjectA, GetStockObject, GetTextExtentPointA, GetTextMetricsA, SelectObject, StretchBlt, TextOutA
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
AppendMenuA, CheckMenuItem, CreateMenu, CreateWindowExA, DefWindowProcA, DispatchMessageA, GetMenu, GetMessageA, GetSystemMenu, LoadBitmapA, LoadCursorA, LoadIconA, LoadMenuA, MessageBeep, MessageBoxA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Opens a window with a menu. Most menu items are unimplemented and simply
produce a beep. You can change the background color, start a timer which
will produce a beep per second, or display the about and help.
Wine tests
- Works just like on Windows.
Winelib tests
Tested API
- GDI32
GetStockObject
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
CheckMenuItem, CreateWindowExA, DefWindowProcA, DispatchMessageA, EnableMenuItem, GetMenu, GetMessageA, InvalidateRect, KillTimer, LoadCursorA, LoadIconA, MessageBeep, MessageBoxA, PostQuitMessage, RegisterClassExA, SendMessageA, SetClassLongA, SetTimer, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
This example uses a weird system of replaceable menus. When you click on "File..." the menu is replaced by the contents of the file menu. The las item "(principal)" allows you to go back to the main menu.
Wine tests
- Works just like on Windows.
Winelib tests
Tested API
- GDI32
GetStockObject
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
CreateWindowExA, DefWindowProcA, DestroyMenu, DispatchMessageA, GetMessageA, GetWindowLongA, LoadCursorA, LoadIconA, LoadMenuA, MessageBeep, PostQuitMessage, RegisterClassExA, SetMenu, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2000/12/2
Description
This example shows how to use the system menu.
Wine tests
- This example does not work in managed mode. This is normal. In that case the menu is handled by the window manager and there is no garanteee that it will let us modify it.
Winelib tests
Tested API
- GDI32
GetStockObject
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
AppendMenuA, CreateWindowExA, DefWindowProcA, DispatchMessageA, GetMessageA, GetSystemMenu, LoadCursorA, LoadIconA, MessageBoxA, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2001/4/1
Description
This is the same as menudemo except that this time we have a popup menu.
Wine tests
Winelib tests
Tested API
- GDI32
GetStockObject
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
CheckMenuItem, ClientToScreen, CreateWindowExA, DefWindowProcA, DispatchMessageA, GetMessageA, GetSubMenu, InvalidateRect, LoadCursorA, LoadIconA, LoadMenuA, MessageBeep, MessageBoxA, PostQuitMessage, RegisterClassExA, SendMessageA, SetClassLongA, ShowWindow, TrackPopupMenu, TranslateMessage, UpdateWindow
Last updated: 2000/12/2
Description
This is the same as the poppad example but with a menu this time.
Wine tests
- Same remarks as for poppad1.
Winelib tests
Tested API
- GDI32
GetStockObject
- KERNEL32
CloseHandle, ExitProcess, FlushFileBuffers, FreeEnvironmentStringsA, FreeEnvironmentStringsW, GetACP, GetCPInfo, GetCommandLineA, GetEnvironmentStrings, GetEnvironmentStringsW, GetFileType, GetLastError, GetModuleFileNameA, GetModuleHandleA, GetOEMCP, GetProcAddress, GetStartupInfoA, GetStdHandle, GetVersion, HeapAlloc, HeapCreate, HeapFree, LoadLibraryA, RtlUnwind, SetFilePointer, SetHandleCount, SetStdHandle, UnhandledExceptionFilter, WideCharToMultiByte, WriteFile
- USER32
CreateWindowExA, DefWindowProcA, DestroyWindow, DispatchMessageA, EnableMenuItem, GetMessageA, GetSystemMetrics, IsClipboardFormatAvailable, LoadAcceleratorsA, LoadCursorA, LoadIconA, MessageBeep, MessageBoxA, MoveWindow, PostQuitMessage, RegisterClassExA, SendMessageA, SetFocus, ShowWindow, TranslateAcceleratorA, TranslateMessage, UpdateWindow