PRB: Invalid Handle Message Using Static Version of CTL3DLast reviewed: July 22, 1997Article ID: Q111752 |
1.00 1.50
WINDOWS
kbprg kbprb
The information in this article applies to:
SYMPTOMSThe Microsoft Developer Network (MSDN) CD provides a tool, CTL3D, that can be used with applications to give Windows controls a three-dimensional (3- D) look. The tool is provided as a dynamic-link library (DLL) (CTL3D.DLL) and as a static library (CTL3DS.LIB). When using the static library with an Microsoft Foundation Class (MFC) application, the controls do not appear as 3-D and the following debug error messages appear when the Ctl3dRegister() function is called:
err CTLTST 0117:0138: Invalid HANDLE: 0000 err CTLTST 0117:0197: Invalid global handle: 0000 CAUSEThe problem occurs when the .RC file does not include CTL3D.H. The include file, CTL3D.H, is needed to associate a resource ID with the 3-D bitmaps. When using the static version of CTL3D, the .RC file includes 3DCHECK.BMP, which is a bitmap used for the 3-D effects. For example,
CTL3D_3DCHECK BITMAP DISCARDABLE "3DCHECK.BMP"In CTL3D.H, the resource ID CTL3D_3DCHECK is associated with a number as shown below:
/* Resource ID for 3dcheck.bmp (for .lib version of ctl3d) */ #define CTL3D_3DCHECK 26567The association is needed if the library is to successfully load 3DCHECK.BMP. If the CTL3D.H header file is not included in the resource file, the necessary association is not made. The bitmap is assigned the string name "CTL3D_3DCHECK" instead of the expected resource number, and the CTL3D library fails to load the bitmap.
RESOLUTIONThe problem can be corrected by including CTL3D.H in the .RC file. To include CTL3D.H, open App Studio and choose Set Includes from the File menu. To the Read-Only Symbol Directives box, add the following text:
#include <ctl3d.h> MORE INFORMATIONBelow are the steps necessary to link to the static version of CTL3D, CTL3DS.LIB:
|
Additional reference words: 1.00 1.50 2.00 2.50 ctrl3d ctl3ds listbox
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |