WinHlprs: Windows Helper Functions

Click to open or copy the WinHlprs project files.

This sample includes the following functions.

dialog.cxx

Class or Function Description
CHlprDialog::ShowDialog Creates the dialog so that its DialogProc member function can be invoked. Similar to Windows' DialogBox function.
DialogProc A common DialogProc used by all CHlprDialog class objects. This procedure is the DialogProc registered for all dialogs created with the CHlprDialog class.

cwindow.cxx

Implementation for a window class.

Class or Function Description
CHlprWindow::Create A special version of CreateWindow. ::WindowProc forwards all messages on to the CHlprWindow::WindowProc method, allowing the window to directly access class members, giving the WindowProc access to the "this" pointer.
WindowProc A standard WindowProc that forwards Windows messages on to the CHlprWindow::WindowProc method.

strmhelp.cxx

Contains routines for writing variables to a stream in an architecture-independent manner.

Function Description
SizeDouble Returns the maximum number of bytes that WriteDouble will take to write a double to an IStream.
WriteDouble Writes a double to an OLE stream in a machine-independent manner.
ReadDouble Reads a double from an OLE stream in a machine-independent manner.

Building SDK Samples

This sample uses the following keywords:

chlprwindow; create; createwindow; defwindowproc; dialogboxparam; dialogproc; gethwnd; getwindowlong; read; readdouble; setwindowlong; showdialog; sizedouble; sprintf; sscanf; strlen; succeeded; windowproc; write; writedouble