home *** CD-ROM | disk | FTP | other *** search
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // Filename: skeleton.hpp
- //
- // Description: Skeleton Visual Basic Custom Control.
- //
- // Resource information, property and event lists, the control
- // structure, error lists, and miscellaneous and control
- // specific defines, etc.
- //
- // Date Created: <Date>
- //
- // Author: <Your Name>
- //
- // Copyright (c) <Your Company Name> 1994
- //
- // Portions of this product are based on original
- // source code from Anton Software Limited.
- //
- //////////////////////////////////////////////////////////////////////////////
-
- #ifndef SKELETON_HPP
- #define SKELETON_HPP
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // Version information (for version information DLL)
- //
- //////////////////////////////////////////////////////////////////////////////
-
- // TO DO: enter your company name below. The acknowledgement to Anton
- // Software Limited MUST NOT be removed. On completion of the first
- // version, enter the date in the comments entry.
-
- #define VBX_ACKNOWLEDGEMENT "Portions of this product are based on " \
- "original source code from Anton Software " \
- "Limited\0"
- #define VBX_COMMENTS "v1.0 <date>\0"
- #define VBX_COMPANYNAME "Your Company Name\0"
- #define VBX_FILEDESCRIPTION "Skeleton Custom Control for Microsoft " \
- "Visual Basic (v2 and above)\0"
- #define VBX_INTERNALNAME "Skeleton\0"
- #define VBX_LEGALCOPYRIGHT "Copyright ⌐ Your Company Name 1994\0"
- #define VBX_LEGALTRADEMARKS "Skeleton is a trademark of Your Company Name\0"
- #define VBX_ORIGINALFILENAME "SKELETON.VBX\0"
- #define VBX_PRODUCTNAME "Skeleton VBX Custom Control\0"
- #define VBX_VERSION 1,00,0,00
- #define VBX_VERSION_STR "1.00.000\0"
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // Resource information
- //
- //////////////////////////////////////////////////////////////////////////////
-
- #include "resource.h" // App Studio created
-
- #ifndef RC_INVOKED
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // Miscellaneous
- //
- //////////////////////////////////////////////////////////////////////////////
-
- // Macro for referencing the member of a structure.
- #define OFFSETIN(struc, field) ((USHORT)&(((struc *)0)->field))
-
- // VB's boolean values.
- #define VB_TRUE -1
- #define VB_FALSE 0
-
- // Macro for outputing debug strings if in debug mode.
- #ifdef _DEBUG
- #define OUTPUT_DEBUG_STRING(debug_string) OutputDebugString(debug_string)
- #else
- #define OUTPUT_DEBUG_STRING(debug_string)
- #endif
-
- // TO DO: place your control's error numbers and error strings (if any) in
- // this section.
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // Property list index values
- //
- //////////////////////////////////////////////////////////////////////////////
-
- enum Properties
- {
- // TO DO: choose the standard properties you want your control to have,
- // and delete the unwanted properties from the list below. (You
- // will have to make a similar change in the skeldat.cpp file.)
-
- // Standard properties.
- IPROP_NAME,
- IPROP_INDEX,
- IPROP_ALIGN,
- IPROP_BACKCOLOR,
- IPROP_BORDERSTYLEON,
- IPROP_CLIPCONTROLS,
- IPROP_DATACHANGED,
- IPROP_DATAFIELD,
- IPROP_DATASOURCE,
- IPROP_DRAGICON,
- IPROP_DRAGMODE,
- IPROP_ENABLED,
- IPROP_FONTBOLD,
- IPROP_FONTITALIC,
- IPROP_FONTNAME,
- IPROP_FONTSIZE,
- IPROP_FONTSTRIKE,
- IPROP_FONTUNDER,
- IPROP_FORECOLOR,
- IPROP_HEIGHT,
- IPROP_HELPCONTEXTID,
- IPROP_HWND,
- IPROP_LEFT,
- IPROP_LINKITEM,
- IPROP_LINKMODE,
- IPROP_LINKTIMEOUT,
- IPROP_LINKTOPIC,
- IPROP_MOUSEPOINTER,
- IPROP_PARENT,
- IPROP_TABINDEX,
- IPROP_TABSTOP,
- IPROP_TAG,
- IPROP_TEXT,
- IPROP_TOP,
- IPROP_VISIBLE,
- IPROP_WIDTH,
-
- // TO DO: choose the custom properties you want your control to have. Use
- // MyProp1 and MyProp2 as templates for these new properties.
-
- // Custom properties.
- IPROP_ABOUT,
- IPROP_MYPROP1,
- IPROP_MYPROP2
-
- }; // enum Properties
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // Event list index values
- //
- //////////////////////////////////////////////////////////////////////////////
-
- enum Events
- {
- // TO DO: choose the standard events you want your control to have, and
- // delete the unwanted events from the list below. (You will have
- // to make a similar change in the skeldat.cpp file.)
-
- // Standard events.
- IEVENT_CLICK,
- IEVENT_DBLCLICK,
- IEVENT_DRAGDROP,
- IEVENT_DRAGOVER,
- IEVENT_GOTFOCUS,
- IEVENT_KEYDOWN,
- IEVENT_KEYPRESS,
- IEVENT_KEYUP,
- IEVENT_LOSTFOCUS,
- IEVENT_MOUSEDOWN,
- IEVENT_MOUSEMOVE,
- IEVENT_MOUSEUP,
- IEVENT_LINKERROR,
- IEVENT_LINKOPEN,
- IEVENT_LINKCLOSE,
- IEVENT_LINKNOTIFY,
- IEVENT_LINKCHANGE,
-
- // TO DO: choose the custom events you want your control to have. Use
- // MyEvent as a template for these new events.
-
- // Custom events.
- IEVENT_MYEVENT
-
- }; // enum Events
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // Event parameter lists
- //
- //////////////////////////////////////////////////////////////////////////////
-
- // TO DO: Use MYEVENT_PARAMS as a template for the event parameter structures
- // of your custom events.
-
- // "MyEvent" event parameter structure (must be in reverse order).
- typedef struct
- {
- SHORT FAR *param2; // pointer to Param2 parameter
- LONG FAR *param1; // pointer to Param1 parameter
- LPVOID lpvIndex; // Index parameter (for control arrays only)
- }
- MYEVENT_PARAMS;
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // Skeleton control structure and far pointer
- //
- //////////////////////////////////////////////////////////////////////////////
-
- // Control structure.
- typedef struct
- {
- // TO DO: add fields below for your custom properties.
-
- // Properties.
- ENUM enumAbout; // About property (ENUM)
- HSZ hszMyProp1; // value of MyProp1 property (HSZ)
- ENUM enumMyProp2; // value of MyProp2 property (ENUM)
-
- // TO DO: add fields below for your non-property control specific data.
-
- // Other instance specific data.
- BOOL fCreated; // whether the control has been created
- BOOL fInitialised; // whether the control has been initialised
- BOOL fLoaded; // whether the control has been loaded
- }
- SKELETON;
-
- // Far pointer to a SKELETON control structure.
- typedef SKELETON FAR *LPSKELETON;
-
- // Macro for accessing SKELETON control structure elements.
- #define LP_SKELETON_DEREF(hctl) ((LPSKELETON)VBDerefControl(hctl))
-
- #endif // RC_INVOKED
- #endif // SKELETON_HPP
-