/*====START_GENERATED_PROLOG======================================
 */
/*
 *   COMPONENT_NAME: odother
 *
 *   CLASSES: none
 *
 *   ORIGINS: 82,27
 *
 *
 *   (C) COPYRIGHT International Business Machines Corp. 1995,1996
 *   All Rights Reserved
 *   Licensed Materials - Property of IBM
 *   US Government Users Restricted Rights - Use, duplication or
 *   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
 *   	
 *   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 *   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 *   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
 *   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
 *   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
 *   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
 *   OR PERFORMANCE OF THIS SOFTWARE.
 */
/*====END_GENERATED_PROLOG========================================
 */

// @(#) 1.7 com/src/samples/bitmap/iodbitmp.hpp, odbitmappart, od96nt, odnt9714c 3/24/97 18:42:33 [4/2/97 17:54:47]
#define FAILURE 0
#define SUCCESS 1

#define SET_DATA       6000
#define NEW_BITMAP     6001

// In/Externalization data structure
struct BitmapExternalizedData {
             ODBoolean     bdNegative;      // True if bitmap displayed in reverse video
             unsigned      bdFileNameSize;  // length of bitmap filename in bdFileData
             unsigned      bdFileDataSize;  // length of bitmap file in bdFileData
};

// Registration values and other constants
const ODType   kPartHandlerName           = "Bitmap";
const ODType   kPartHandlerDisplayName    = "IBM Bitmap Part Handler";

const ODType   kKindIBMBitmap             = "IBM Bitmap";
const ODType   kBitmapKindDisplayName     = "IBM Bitmap Examples";
const ODType   kBitmapCategory            = "+//ISO 9070/ANSI::113722::US::CI LABS::Samples:Bitmap";
const ODType   kBitmapCategoryDisplayName = "Bitmaps";
const ODType   kBitmapFileNameType        = "Bitmap";
const ODType   kBitmapFileNameFilter      = "*.BMP";

const ODType   kODKindODFBitmap           = "+//ISO 9070/ANSI::113722::US::CI LABS::Apple:ODFExamples:Kind:ODFBitmap";
const ODType   kODFBitmapKindDisplayName  = "ODF Bitmap Examples";
const ODType   kODFBitmapFileNameType     = "DFBD";

const ODType   kBitmapOptionsValue        = "Bitmap Part Options";
const ODType   kBitmapFileName            = "iodbitmp.dll";
const ODType   kBitmapOpenDialogTitle     = "Open Bitmap:";

const ODType   kODBitmapType              = "CF_BITMAP";
const ODType   kODDragFileType            = "<DRM_OS2FILE,DRF_UNKNOWN>";

#if defined(_PLATFORM_WIN32_)
const   unsigned long   kODMaxFileNameSize = MAX_PATH;
#elif defined(_PLATFORM_OS2_)
const   unsigned long   kODMaxFileNameSize = CCHMAXPATH;
#endif // defined(_PLATFORM_OS2_)

#define SMALLICONSIZE     16
#define LARGEICONSIZE     32
#define THUMBNAILSIZE     64

// Platform specific routines, implemented in bitplat.cpp.  The implementation
// of each of these functions will differ with each platform iodbitmap is
// implemented on.
ODBoolean PlatOpenDlg(HWND hwnd, char* docName);
ODBoolean PlatReadFile(char* docName, char* &buffer, ODULong &bytesRead);
HBITMAP  PlatCreateBitmap(char* fileName, char* buffer, HDC hdcMemory);
void  PlatDrawBitmap(HDC hdcDraw, HDC hdcMemory, RECT frameRect, HBITMAP hbm, ODBoolean negative);
HPALETTE PlatCreatePalette(char* buffer);
