#include "bmp.h"
#include "memory.h"
#include "math.h"
#include "stdio.h"
//owner defined stack
typedef struct{
HGLOBAL hMem;
POINT *lpMyStack;
LONG ElementsNum;
LONG ptr;
}MYSTACK;
//macro definition
#define WIDTHBYTES(i) ((i+31)/32*4)
#define PI 3.1415926535
//function declaration
int PASCAL WinMain (HANDLE, HANDLE, LPSTR, int);
LRESULT CALLBACK MainWndProc(HWND , UINT,WPARAM, LPARAM);
BOOL LoadBmpFile (HWND hWnd,char *BmpFileName);
BOOL TemplateOperation(HWND hWnd, int TemplateType);
BOOL Outline(HWND hWnd);
BOOL Hough(HWND hWnd);
BOOL LapOfGauss(HWND hWnd);
BOOL Contour(HWND hWnd);
BOOL IsContourP(LONG x,LONG y, char *lpPtr);
BOOL SeedFill(HWND hWnd);
BOOL InitStack(HWND hWnd,LONG StackLen);
void DeInitStack();
BOOL MyPush(POINT p);
POINT MyPop();
BOOL IsStackEmpty();
//global variable declaration
BITMAPFILEHEADER bf;
BITMAPINFOHEADER bi;
1