L_UseBitmapClass
#include "l_bitmap.h"
L_VOID EXT_FUNCTION L_UseBitmapClass(L_VOID)
Dynamically loads the appropriate DLL to let your program use the L_BITMAPCLASS registered class.
Returns
None.
Comments
Because the L_BITMAPCLASS registered class uses messages rather than function calls, the required dynamic link library (LTWND14n.dll or LTWND12w.dll) is not loaded automatically. Therefore, the toolkit provides this dummy function in the DLL, which you can call before using the registered class messages.
Required DLLs and Libraries
LTKRN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Platforms
Windows 95 / 98 / Me, Windows 2000 / XP.
See Also
Topics: |
Example
/* This example demonstrates programming basics for the LEAD registered class. */
int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MSG msg; /* Message structure, See Windows SDK for more information. */
HWND hwnd; /* Handle to the application window */
LEADBITMAPLOAD LoadStruct; /* Structure for the name of the DLL */
UNREFERENCED_PARAMETER (hPrevInstance);
L_UseBitmapClass ();
/* Create a normal overlapped window with scroll bars and automatic window
sizing when a bitmap is loaded. */
hwnd = CreateWindow (L_BITMAPCLASS,
TEXT("L_BITMAPCLASS Registered Class Example"),
WS_OVERLAPPEDWINDOW |
WS_CLIPCHILDREN |
WS_VSCROLL |
WS_HSCROLL |
L_BS_THUMBTRACK |
L_BS_SIZEWINDOW,
0,
0,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL,
NULL,
hInstance,
NULL);
ShowWindow (hwnd, nCmdShow);
/* Load the bitmap and force screen update */
#ifdef WIN32
memset (&LoadStruct, 0, sizeof (LoadStruct));
#else
_fmemset (&LoadStruct, 0, sizeof (LoadStruct));
#endif
LoadStruct.uStructSize = sizeof (LoadStruct);
lstrcpy (LoadStruct.Name, TEXT("IMAGE3.CMP")); /* Get the name of the image file */
SendMessage (hwnd,
L_BM_LOAD, /* Send the message to load the image */
TRUE,
(LONG) (LPSTR) & LoadStruct);
/* Normal message loop. The L_BITMAPCLASS window procedure will post
a WM_QUIT message if there is not a parent. Such as in this case... */
while (GetMessage (&msg, NULL, 0, 0))
{
TranslateMessage (&msg);
DispatchMessage (&msg);
}
return (0);
}