#ifndef CASHFLOW_H_INCLUDED /***************************************************************************** * * Copyright (c) 1999, KL GROUP INC. All Rights Reserved. * http://www.klgroup.com * * This file is provided for demonstration and educational uses only. * Permission to use, copy, modify and distribute this file for * any purpose and without fee is hereby granted, provided that the * above copyright notice and this permission notice appear in all * copies, and that the name of KL Group not be used in advertising * or publicity pertaining to this material without the specific, * prior written permission of an authorized representative of * KL Group. * * KL GROUP MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY * OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED * TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR * PURPOSE, OR NON-INFRINGEMENT. KL GROUP SHALL NOT BE LIABLE FOR ANY * DAMAGES SUFFERED BY USERS AS A RESULT OF USING, MODIFYING OR * DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. */ /* Menu command IDs. */ #define IDM_EXIT 101 #define IDM_3D 102 #define IDM_ABOUT 103 #ifndef RC_INVOKED #ifndef STRICT #define STRICT #endif #include #include "flashlbl.h" #include "qrtrdata.h" /* Get offset of a member of a struct type. */ #define OFFSETIN(tstruct,member) ((unsigned)&((((tstruct)*)0)->(member))) #ifdef WIN32 #define WINENTRY __stdcall #else #define WINENTRY FAR PASCAL __export #endif /* Is POINT p in RECT r? */ #define PT_IN_RECT(p,r) ( ((p).x < (r).left ? 0 : \ ((p).y < (r).top ? 0 : \ ((p).x > (r).left + (r).right ? 0 : \ ((p).y > (r).top + (r).bottom ? 0 : 1 )))) ) \ /* Extract a POINT from a long (eg from the lParam of a mouse message). */ #ifdef WIN32 #define LONG2POINT(l,pt) ((pt).x=(short)LOWORD(l),(pt).y=(short)HIWORD(l)) #else #define LONG2POINT(l,pt) ((pt)=MAKEPOINT(l)) #endif /* Window sizes and placement. */ #define MAINFRAME_X 64 #define MAINFRAME_Y 64 #define MAINFRAME_W 576 #define MAINFRAME_H 416 #define DETAILFRAME_X MAINFRAME_X + MAINFRAME_W #define DETAILFRAME_Y MAINFRAME_Y #define DETAILFRAME_W 416 #define DETAILFRAME_H 320 #define DETAILFRAME_OFFSET 26 /* Parameters for 3D effects. */ #define BAR_3D_ROTATION 25 #define BAR_3D_INCLINATION 15 #define BAR_3D_DEPTH 10 #define PIE_3D_INCLINATION 45 #define PIE_3D_DEPTH 20 /* Custom messages. Olectra Chart defines WM_USER + 1,2... and WM_USER + 3000,3001... */ typedef struct { /* A CFW_INIT message takes a pointer to one of these as it's LPARAM. */ WNDPROC pfnBaseWndProc; CFQuarter quarter; CFMonth month; unsigned year; CFSummarySets type; XrtDataHandle hXrtData; }InitInfo; #define CFM_INIT (WM_USER + 100) #define CFM_3DON (WM_USER + 101) #define CFM_3DOFF (WM_USER + 102) /* Only define globals once, otherwise just declare. */ #ifdef EXTERN #undef EXTERN #endif #ifdef IN_CASHFLOW_C #define EXTERN #else #define EXTERN extern #endif /* Globals. */ EXTERN char* Months[]; EXTERN QuarterData* gpQuarterData; EXTERN HANDLE ghinstApp; EXTERN HWND ghwndMain; int WINENTRY WinMain(HINSTANCE hinstCur, HINSTANCE hinstPrev, LPSTR pCmdLine, int nCmdShow); LRESULT CALLBACK MainWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK SummaryChartWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK DetailFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK DetailChartWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); #endif /* ndef RC_INVOKED */ #define CASHFLOW_H_INCLUDED #endif /* ndef CASHFLOW_H_INCLUDED */