Wine, WineLib and "Programming Windows 95"
Last updated: 2001/2/26
Description
Press the left mouse button and drag the mouse to draw a black rectangle.
Do it again, the first rectangle is erased and a new one is drawn. Resizing
the window has no effect on the rectangle (make the window smaller than the
rectangle and then bigger and you will still have your original rectangle).
Note that if you exit the client area and release the mouse button,
capture1 still believes that the mouse button is pressed when you get back
into the client area. With a mouse click it will be ok again.
Wine tests
Winelib tests
Tested API
- GDI32
GetStockObject, Rectangle, SelectObject, SetROP2
- 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
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetDC, GetMessageA, InvalidateRect, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ReleaseDC, SetCursor, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Same as capture1 except that this time if you exit the client area the
program will continue tracking the mouse.
Wine tests
- The basic mouse tracking works fine.
- If you get out of the client area by the top or
left border capture2 believes that you are far far to the right.
The source of the problem is the following: when the mouse gets into one
of the above areas, the WM_MOUSEMOVE message returns coordinates that are
interpreted by the program as unsigned shorts and then extended to a
signed int instead of first being cast into signed shorts before the
extension. The reason this does not cause a problem in Windows 9x is that
Windows 9x coordinates are limited to the -32768+32767 range anyway. So
when the program tries to draw a rectangle to x=65535 this coordinate is
then reinterpreted as a signed short anyway which gives us -1.
NT has true 32bit coordinates and sure enough we get the exact same
problem there. So basically it was decided (see bug #53) that it
was not worth implementing both 32bit coordinate support and 16bit Win9x
coordinate support. So thi will remain as is.
Winelib tests
Tested API
- GDI32
GetStockObject, Rectangle, SelectObject, SetROP2
- 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
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetDC, GetMessageA, InvalidateRect, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ReleaseCapture, ReleaseDC, SetCapture, SetCursor, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
The program divides the window in a checkboard of 25 cells. A click on a
cell will display a cross in it and a second click will erase that cross.
When the window is resized the cells are resized accordingly and keep the
checked/not checked status. You may see a small variable border around the
cells. That's because of rounding errors made by the program.
Wine tests
- Works just like on Windows.
Winelib tests
Tested API
- GDI32
GetStockObject, LineTo, MoveToEx, Rectangle
- 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
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetMessageA, InvalidateRect, LoadCursorA, LoadIconA, MessageBeep, PostQuitMessage, RegisterClassExA, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Same as checker1 but with an additional keyboard mode. You can move the
mouse pointer with the arrow keys, home and end move it respectively to the
top left and bottom right corners and you can use space and enter to toggle a
cell's status.
Wine tests
- Works just like on Windows.
Winelib tests
Tested API
- GDI32
GetStockObject, LineTo, MoveToEx, Rectangle
- 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
BeginPaint, ClientToScreen, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetCursorPos, GetMessageA, InvalidateRect, LoadCursorA, LoadIconA, MessageBeep, PostQuitMessage, RegisterClassExA, ScreenToClient, SendMessageA, SetCursorPos, ShowCursor, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2003/5/4
Description
Same as checker1 but implemented using child windows. Note that this
version does not have the keyboard interface of checker2.
Wine tests
- Works just like on Windows.
Winelib tests
Tested API
- GDI32
GetStockObject, LineTo, MoveToEx, Rectangle
- 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
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetClientRect, GetMessageA, GetWindowLongA, GetWindowWord, InvalidateRect, LoadCursorA, LoadIconA, MessageBeep, MoveWindow, PostQuitMessage, RegisterClassExA, SetWindowWord, ShowWindow, TranslateMessage, UpdateWindow
Last updated: 2001/2/26
Description
Connect tracks the mouse movements recording each point's coordinates as
long as the left mouse button is depressed. Then it connects each point to
all the other points.
If you are outside the client area when you release the mouse button then
connect does not do anything. Also if you do the above while it is still
drawing the lines nothing happens. To try this move the mouse for some time
before releasing the button, connect remembers up to 1000 points which gives
it 500,000 lines to draw. But if you release the button after it has
finished drawing the lines, then that part of the mouse movements will be
taken into account.
Wine tests
- Works just like on Windows.
Winelib tests
Tested API
- GDI32
GetStockObject, LineTo, MoveToEx, SetPixel
- 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
BeginPaint, CreateWindowExA, DefWindowProcA, DispatchMessageA, EndPaint, GetDC, GetMessageA, InvalidateRect, LoadCursorA, LoadIconA, PostQuitMessage, RegisterClassExA, ReleaseDC, SetCursor, ShowCursor, ShowWindow, TranslateMessage, UpdateWindow