home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- // Pix.h
- //---------------------------------------------------------------------------
-
- //---------------------------------------------------------------------------
- // Helpful Macros
- //---------------------------------------------------------------------------
- #define OFFSETIN(struc, field) ((USHORT)&( ((struc *)0)->field ))
-
-
- //---------------------------------------------------------------------------
- // Resource ID's
- //---------------------------------------------------------------------------
- // Toolbox bitmap resource IDs numbers.
- //---------------------------------------------------------------------------
- #define IDBMP_PIX 8000
- #define IDBMP_PIXDOWN 8001
- #define IDBMP_PIXMONO 8003
- #define IDBMP_PIXEGA 8006
-
-
- #ifndef RC_INVOKED
- //---------------------------------------------------------------------------
- // Pix control data and structs
- //---------------------------------------------------------------------------
- #define ARRMAX 10
-
- typedef struct tagPIX
- {
- HSZ List[ARRMAX];
- HPIC hpicPict;
- } PIX;
-
- typedef PIX FAR * PPIX;
-
-
- //---------------------------------------------------------------------------
- // Control Procudure
- //---------------------------------------------------------------------------
- LONG FAR PASCAL _export PixCtlProc(HCTL, HWND, USHORT, USHORT, LONG);
-
-
- //---------------------------------------------------------------------------
- // Property info
- //---------------------------------------------------------------------------
- #ifdef CTL_DATA
- PROPINFO Property_Arr =
- {
- "List",
- DT_HSZ | PF_fPropArray| PF_fGetMsg | PF_fSetMsg | PF_fNoShow,
- OFFSETIN(PIX, List)
- };
-
- PROPINFO Property_Pict =
- {
- "Picture",
- DT_PICTURE | PF_fGetData | PF_fSetCheck | PF_fSetData | PF_fSaveData | PF_fGetHszMsg,
- OFFSETIN(PIX, hpicPict)
- };
- #endif // CTL_DATA
-
-
- //---------------------------------------------------------------------------
- // Property list
- //---------------------------------------------------------------------------
- // Define the consecutive indicies for the properties
- //---------------------------------------------------------------------------
- #define IPROP_PIX_CTLNAME 0
- #define IPROP_PIX_INDEX 1
- #define IPROP_PIX_BACKCOLOR 2
- #define IPROP_PIX_LEFT 3
- #define IPROP_PIX_TOP 4
- #define IPROP_PIX_WIDTH 5
- #define IPROP_PIX_HEIGHT 6
- #define IPROP_PIX_VISIBLE 7
- #define IPROP_PIX_PARENT 8
- #define IPROP_PIX_DRAGMODE 9
- #define IPROP_PIX_DRAGICON 10
- #define IPROP_PIX_TAG 11
- #define IPROP_PIX_LIST 12
- #define IPROP_PIX_PICT 13
-
- #ifdef CTL_DATA
- PPROPINFO Pix_Properties[] =
- {
- PPROPINFO_STD_CTLNAME,
- PPROPINFO_STD_INDEX,
- PPROPINFO_STD_BACKCOLOR,
- PPROPINFO_STD_LEFT,
- PPROPINFO_STD_TOP,
- PPROPINFO_STD_WIDTH,
- PPROPINFO_STD_HEIGHT,
- PPROPINFO_STD_VISIBLE,
- PPROPINFO_STD_PARENT,
- PPROPINFO_STD_DRAGMODE,
- PPROPINFO_STD_DRAGICON,
- PPROPINFO_STD_TAG,
- &Property_Arr,
- &Property_Pict,
- NULL
- };
- #endif // CTL_DATA
-
-
- //---------------------------------------------------------------------------
- // Event list
- //---------------------------------------------------------------------------
- // Define the consecutive indicies for the events
- //---------------------------------------------------------------------------
- #define IEVENT_PIX_CLICK 0
- #define IEVENT_PIX_DRAGDROP 1
- #define IEVENT_PIX_DRAGOVER 2
-
- #ifdef CTL_DATA
- PEVENTINFO Pix_Events[] =
- {
- PEVENTINFO_STD_CLICK,
- PEVENTINFO_STD_DRAGDROP,
- PEVENTINFO_STD_DRAGOVER,
- NULL
- };
- #endif // CTL_DATA
-
-
- //---------------------------------------------------------------------------
- // Model struct
- //---------------------------------------------------------------------------
- // Define the control model (using the event and property structures).
- //---------------------------------------------------------------------------
- #ifdef CTL_DATA
- MODEL modelPix =
- {
- VB_VERSION, // VB version being used
- 0, // MODEL flags
- (PCTLPROC)PixCtlProc, // Control procedures
- CS_VREDRAW | CS_HREDRAW, // Class style
- WS_BORDER, // Default Windows style
- sizeof(PIX), // Size of PIX structure
- IDBMP_PIX, // Palette bitmap ID
- "Pix", // Default control name
- "Pix", // Visual Basic class name
- NULL, // Parent class name
- Pix_Properties, // Property information table
- Pix_Events // Event information table
- };
- #endif // CTL_DATA
-
- #endif // RC_INVOKED
-
- //---------------------------------------------------------------------------
-