/*乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗//
    bolgui.h
//乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗*/

#define  WINAPI  __stdcall
#define  WINAPIV __cdecl

#define  LOCALF  static __stdcall
#define  LOCALFV static __cdecl

#ifdef __cplusplus
extern "C" {
#endif

//乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗//

void WINAPI SetEITM(HWND hdlg, I4B id, rANY pv, rCOLI co);
void WINAPI GetEITM(HWND hdlg, I4B id, pANY pv, rCOLI co);

void WINAPI SetCITM(HWND hdlg, I4B id, rANY pv, rCOLI co);
void WINAPI GetCITM(HWND hdlg, I4B id, pANY pv, rCOLI co);

typedef struct {
  I4B   icv;
  I4B   icn;
  rSTR  cnd;
  rSTR  srt;
} TBBI;
typedef TBBI *pTBBI, *PTBBI;
typedef const TBBI *rTBBI, *PCTBBI;

void WINAPI SetCTBL(HWND hdlg, I4B id, I4B va, HTBL tb, rTBBI tt);
I4B  WINAPI GetCTBL(HWND hdlg, I4B id, HTBL tb, rTBBI tt);

#define  TTF_ADJUST       0x01
#define  TTF_HEADERWIDTH  0x02
#define  TTF_NOADJUST     0x04

#define  TTF_ADJ  TTF_ADJUST
#define  TTF_HDW  TTF_HEADERWIDTH
#define  TTF_NOA  TTF_NOADJUST

typedef struct {
  I4B   ns;
  rSTR  arr;
  rSTR  cnd;
  rSTR  srt;
  I4B   flg;
  I4B   ica;
  I4B   hdw;
} TBCI;
typedef TBCI *pTBCI, *PTBCI;
typedef const TBCI *rTBCI, *PCTBCI;

void WINAPI SetTTBL(HWND hdlg, I4B id, HTBL tb, rTBCI tt);
void WINAPI SetTSEL(HWND hdlg, I4B id, I4B ir, HTBL tb, rTBCI tt);
I4B  WINAPI GetTSEL(HWND hdlg, I4B id);
void WINAPI SetTINT(HWND hdlg, I4B id, I4B va, HTBL tb, rTBCI tt);
I4B  WINAPI GetTINT(HWND hdlg, I4B id);

#define  tbcsF   (TBCS_DSE|TBCS_UNM)
#define  tbcsFX  (TBCS_DSE|TBCS_HRH|TBCS_UNM)
#define  tbcsM   TBCS_UNM
#define  tbcsMX  (TBCS_HRH|TBCS_UNM)
#define  tbcsL   (TBCS_UNM|TBCS_LST)
#define  tbcsLX  (TBCS_HRH|TBCS_UNM|TBCS_LST)

#define  C_TTBF  "BOLTBL", wsCB | tbcsF
#define  C_TTBX  "BOLTBL", wsCB | tbcsFX
#define  C_TTBC  "BOLTBL", wsCBV | tbcsM
#define  C_TTBL  "BOLTBL", wsCBV | tbcsMX
#define  C_TSEC  "BOLTBL", wsCBV | tbcsL
#define  C_TSEL  "BOLTBL", wsCBV | tbcsLX

//乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗//

BOOL WINAPI CSVInfoDlgBox(HWND hwnd, pCSVI pa);

typedef struct {
  I1B   str[512];
  I4B   flg;
} STXP;
typedef STXP *pSTXP, *PSTXP;

BOOL WINAPI SearchTextDlgBox(HWND hwnd, pSTXP pa, BOOL sw);

BOOL WINAPI EditRowDlgBox(HWND hwnd, HBUF rb, rSTR tit);

#define  MND_DATE_YMD  0x00
#define  MND_DATE_YM   0x01
#define  MND_KANJI     0x02
#define  MND_MSG2RIGHT 0x04

#define  MND_YMD  MND_DATE_YMD
#define  MND_YMN  MND_DATE_YM
#define  MND_KNJ  MND_KANJI
#define  MND_RGT  MND_MSG2RIGHT

typedef struct {
  I4B   flg;
  I4B   idm;
  rSTR  txt;
  I4B   bid;
} MNDI;
typedef MNDI *pMNDI, *PMNDI;
typedef const MNDI *rMNDI, *PCMNDI;

typedef struct {
  pMNDI mi;
  I4B   ni;
  I4B   flg;
  I4B   ip;
  rSTR  msg1;
  rSTR  msg2;
} MNDS;
typedef MNDS *pMNDS, *PMNDS;
typedef const MNDS *rMNDS, *PCMNDS;

#define  IDREFRESH  30
#define  IDMANUAL   40
#define  IDJMP      70
#define  IDJMPMAX   90

I4B  WINAPI MenuDlgBox(HWND hwnd, pMNDS pa, rSTR tit);

//乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗//

#define  APPM_SETMODE          (WM_USER + 0x01)
#define  APPM_GETMODE          (WM_USER + 0x02)
#define  APPM_SETDATA          (WM_USER + 0x03)
#define  APPM_GETDATA          (WM_USER + 0x04)

#define  APPS_NOACTIVEWINDOW       0x00000000
#define  APPS_DISABLEEDITING       0x00000001
#define  APPS_DISABLESELECTING     0x00000002
#define  APPS_LINK                 0x00000010
#define  APPS_RANGESELECTED        0x00010000
#define  APPS_MOUSECAPTURED        0x00020000
#define  APPS_COMMONFLAGS          0x00030003
#define  APPS_BOLTXTWINDOWACTIVE   0x00100000
#define  APPS_BOLPRNWINDOWACTIVE   0x00200000
#define  APPS_BOLDIBWINDOWACTIVE   0x00300000
#define  APPS_BOLTBLWINDOWACTIVE   0x00400000
#define  APPS_UNKNOWNWINDOWACTIVE  0x00f00000
#define  APPS_MULTIPLEWINDOWS      0x01000000
#define  APPS_CFTEXTAVAILABLE      0x10000000
#define  APPS_CFRBLKAVAILABLE      0x20000000

#define  APPS_NON  APPS_NOACTIVEWINDOW
#define  APPS_DED  APPS_DISABLEEDITING
#define  APPS_DSE  APPS_DISABLESELECTING
#define  APPS_LNK  APPS_LINK
#define  APPS_SEL  APPS_RANGESELECTED
#define  APPS_CAP  APPS_MOUSECAPTURED
#define  APPS_COM  APPS_COMMONFLAGS
#define  APPS_TXT  APPS_BOLTXTWINDOWACTIVE
#define  APPS_PRN  APPS_BOLPRNWINDOWACTIVE
#define  APPS_DIB  APPS_BOLDIBWINDOWACTIVE
#define  APPS_TBL  APPS_BOLTBLWINDOWACTIVE
#define  APPS_ACT  APPS_UNKNOWNWINDOWACTIVE
#define  APPS_MUL  APPS_MULTIPLEWINDOWS
#define  APPS_CFT  APPS_CFTEXTAVAILABLE
#define  APPS_CFB  APPS_CFRBLKAVAILABLE

#define  APPN_SETFOCUS       1
#define  APPN_KILLFOCUS      2
#define  APPN_LBUTTONDOWN    3
#define  APPN_LBUTTONDBLCLK  4
#define  APPN_RBUTTONDOWN    5
#define  APPN_SELCHANGE      6
#define  APPN_CHANGE         7

#define  OPR_UPDATE  1
#define  OPR_INSERT  2
#define  OPR_DELETE  3

#define  MVC_LEFT      0x00000001
#define  MVC_RIGHT     0x00000002
#define  MVC_HOME      0x00000009
#define  MVC_END       0x0000000a
#define  MVC_LINEUP    0x00000100
#define  MVC_LINEDOWN  0x00000200
#define  MVC_PAGEUP    0x00000500
#define  MVC_PAGEDOWN  0x00000600
#define  MVC_TOP       0x00000900
#define  MVC_BOTTOM    0x00000a00
#define  MVC_SETSEL    0x00010000

#define  MVC_LFT  MVC_LEFT
#define  MVC_RGT  MVC_RIGHT
#define  MVC_HOM  MVC_HOME
#define  MVC_LUP  MVC_LINEUP
#define  MVC_LDN  MVC_LINEDOWN
#define  MVC_PUP  MVC_PAGEUP
#define  MVC_PDN  MVC_PAGEDOWN
#define  MVC_BTM  MVC_BOTTOM
#define  MVC_SEL  MVC_SETSEL

//乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗//

#define  TXCM_SETMODE           APPM_SETMODE
#define  TXCM_GETMODE           APPM_GETMODE
#define  TXCM_SETTEXT           APPM_SETDATA
#define  TXCM_GETTEXT           APPM_GETDATA
#define  TXCM_SETLINEPITCH     (WM_USER + 0x05)
#define  TXCM_GETLINEPITCH     (WM_USER + 0x06)
#define  TXCM_SETCUR           (WM_USER + 0x07)
#define  TXCM_GETCUR           (WM_USER + 0x08)
#define  TXCM_SETTOP           (WM_USER + 0x09)
#define  TXCM_GETTOP           (WM_USER + 0x0a)
#define  TXCM_SETSEL           (WM_USER + 0x0b)
#define  TXCM_GETSEL           (WM_USER + 0x0c)
#define  TXCM_UPDATE           (WM_USER + 0x0d)
#define  TXCM_MOVECUR          (WM_USER + 0x0e)
#define  TXCM_COPY             (WM_USER + 0x10)
#define  TXCM_INSERT           (WM_USER + 0x11)
#define  TXCM_DELETE           (WM_USER + 0x12)
#define  TXCM_SEARCH           (WM_USER + 0x13)

#define  TXCS_DISABLEEDITING        APPS_DED
#define  TXCS_DISABLESELECTING      APPS_DSE
#define  TXCS_USENEXTDLGCTLMSG      0x00001000
#define  TXCS_RANGESELECTED         APPS_SEL
#define  TXCS_MOUSECAPTURED         APPS_CAP

#define  TXCS_DED  TXCS_DISABLEEDITING
#define  TXCS_DSE  TXCS_DISABLESELECTING
#define  TXCS_UNM  TXCS_USENEXTDLGCTLMSG
#define  TXCS_SEL  TXCS_RANGESELECTED
#define  TXCS_CAP  TXCS_MOUSECAPTURED

iANY WINAPI DefBOLTXTProc(HWND hwnd, U4B umsg, uANY wpa, iANY lpa);

//乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗//

#define  PRCM_SETMODE           APPM_SETMODE
#define  PRCM_GETMODE           APPM_GETMODE
#define  PRCM_SETREPORT         APPM_SETDATA
#define  PRCM_GETREPORT         APPM_GETDATA
#define  PRCM_SETORIGIN        (WM_USER + 0x05)
#define  PRCM_GETORIGIN        (WM_USER + 0x06)
#define  PRCM_SETSCALE         (WM_USER + 0x07)
#define  PRCM_GETSCALE         (WM_USER + 0x08)
#define  PRCM_SETPAGE          (WM_USER + 0x09)
#define  PRCM_GETPAGE          (WM_USER + 0x0a)
#define  PRCM_NPAGES           (WM_USER + 0x0b)
#define  PRCM_PAPERWIDTH       (WM_USER + 0x0c)
#define  PRCM_PAPERHEIGHT      (WM_USER + 0x0d)
#define  PRCM_DRAWPAGE         (WM_USER + 0x0e)

iANY WINAPI DefBOLPRNProc(HWND hwnd, U4B umsg, uANY wpa, iANY lpa);

#define  DICM_SETMODE           PRCM_SETMODE
#define  DICM_GETMODE           PRCM_GETMODE
#define  DICM_SETIMAGE          PRCM_SETREPORT
#define  DICM_GETIMAGE          PRCM_GETREPORT
#define  DICM_SETORIGIN         PRCM_SETORIGIN
#define  DICM_GETORIGIN         PRCM_GETORIGIN
#define  DICM_SETSCALE          PRCM_SETSCALE
#define  DICM_GETSCALE          PRCM_GETSCALE
#define  DICM_NPAGES            PRCM_NPAGES
#define  DICM_PAPERWIDTH        PRCM_PAPERWIDTH
#define  DICM_PAPERHEIGHT       PRCM_PAPERHEIGHT
#define  DICM_DRAWPAGE          PRCM_DRAWPAGE

iANY WINAPI DefBOLDIBProc(HWND hwnd, U4B umsg, uANY wpa, iANY lpa);

//乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗//

#define  TBCM_SETMODE           APPM_SETMODE
#define  TBCM_GETMODE           APPM_GETMODE
#define  TBCM_SETTABLE          APPM_SETDATA
#define  TBCM_GETTABLE          APPM_GETDATA
#define  TBCM_SETNROWS         (WM_USER + 0x05)
#define  TBCM_GETNROWS         (WM_USER + 0x06)
#define  TBCM_SETNCOLUMNS      (WM_USER + 0x07)
#define  TBCM_GETNCOLUMNS      (WM_USER + 0x08)
#define  TBCM_SETCOLUMNWIDTH   (WM_USER + 0x09)
#define  TBCM_GETCOLUMNWIDTH   (WM_USER + 0x0a)
#define  TBCM_SETAVECHARWIDTH  (WM_USER + 0x0b)
#define  TBCM_GETAVECHARWIDTH  (WM_USER + 0x0c)
#define  TBCM_SETROWHEIGHT     (WM_USER + 0x0d)
#define  TBCM_GETROWHEIGHT     (WM_USER + 0x0e)
#define  TBCM_GETCELLRECT      (WM_USER + 0x0f)
#define  TBCM_GETRBLKRECT      (WM_USER + 0x10)
#define  TBCM_DRAWCELL         (WM_USER + 0x11)
#define  TBCM_DRAWCELLPTR      (WM_USER + 0x12)
#define  TBCM_MOVECELLPTR      (WM_USER + 0x13)
#define  TBCM_HITTEST          (WM_USER + 0x14)
#define  TBCM_DROPBUTTON       (WM_USER + 0x15)
#define  TBCM_OPENLINK         (WM_USER + 0x16)
#define  TBCM_OPENEDIT         (WM_USER + 0x17)
#define  TBCM_CLOSEEDIT        (WM_USER + 0x18)
#define  TBCM_SETCUR           (WM_USER + 0x19)
#define  TBCM_GETCUR           (WM_USER + 0x1a)
#define  TBCM_SETTOP           (WM_USER + 0x1b)
#define  TBCM_GETTOP           (WM_USER + 0x1c)
#define  TBCM_SETFIX           (WM_USER + 0x1d)
#define  TBCM_GETFIX           (WM_USER + 0x1e)
#define  TBCM_SETSEL           (WM_USER + 0x1f)
#define  TBCM_GETSEL           (WM_USER + 0x20)
#define  TBCM_UPDATE           (WM_USER + 0x21)
#define  TBCM_CALCSIZE         (WM_USER + 0x22)
#define  TBCM_EDITCELL         (WM_USER + 0x23)
#define  TBCM_COPYEDITCELL     (WM_USER + 0x24)
#define  TBCM_MOVECUR          (WM_USER + 0x25)
#define  TBCM_INPUTTEXT        (WM_USER + 0x26)
#define  TBCM_ASKNROWS         (WM_USER + 0x27)
#define  TBCM_ASKNCOLUMNS      (WM_USER + 0x28)
#define  TBCM_ASKCOLUMNLENGTH  (WM_USER + 0x29)
#define  TBCM_DEFCELLFORMAT    (WM_USER + 0x2a)
#define  TBCM_ASKCELLFORMAT    (WM_USER + 0x2b)
#define  TBCM_GETCELLFORMAT    (WM_USER + 0x2c)
#define  TBCM_SETCELLTEXT      (WM_USER + 0x2d)
#define  TBCM_GETCELLTEXT      (WM_USER + 0x2e)
#define  TBCM_CHANGEVIEW       (WM_USER + 0x2f)
#define  TBCM_GETVIEW          (WM_USER + 0x30)
#define  TBCM_SETCURROW        (WM_USER + 0x31)
#define  TBCM_GETCURROW        (WM_USER + 0x32)
#define  TBCM_INSERT           (WM_USER + 0x33)
#define  TBCM_DELETE           (WM_USER + 0x34)
#define  TBCM_CLEAR            (WM_USER + 0x35)
#define  TBCM_COPY             (WM_USER + 0x36)
#define  TBCM_CUT              (WM_USER + 0x37)
#define  TBCM_PASTE            (WM_USER + 0x38)
#define  TBCM_SEARCH           (WM_USER + 0x39)
#define  TBCM_NSEARCH          (WM_USER + 0x3a)
#define  TBCM_TRACKPOPUP       (WM_USER + 0x3b)

#define  TBCS_DISABLEEDITING        APPS_DED
#define  TBCS_DISABLESELECTING      APPS_DSE
#define  TBCS_DISABLECHANGINGVIEW   0x0008
#define  TBCS_DISABLEDROPDOWNLIST   0x0010
#define  TBCS_DISABLEEDITROWDIALOG  0x0020
#define  TBCS_HIDECOLUMNHEADER      0x0040
#define  TBCS_HIDEROWHEADER         0x0080
#define  TBCS_USECOLUMNNAME         0x0100
#define  TBCS_USECOLUMNINDEX        0x0200
#define  TBCS_ZEROBASEDINDEX        0x0400
#define  TBCS_ENTERKEYMOVEDOWN      0x0800
#define  TBCS_USENEXTDLGCTLMSG      0x1000
#define  TBCS_LISTBOX               0x2000
#define  TBCS_ADDSUMMARYROW         0x4000
#define  TBCS_RANGESELECTED         APPS_SEL
#define  TBCS_MOUSECAPTURED         APPS_CAP

#define  TBCS_DED  TBCS_DISABLEEDITING
#define  TBCS_DSE  TBCS_DISABLESELECTING
#define  TBCS_DCV  TBCS_DISABLECHANGINGVIEW
#define  TBCS_DDD  TBCS_DISABLEDROPDOWNLIST
#define  TBCS_DER  TBCS_DISABLEEDITROWDIALOG
#define  TBCS_HCH  TBCS_HIDECOLUMNHEADER
#define  TBCS_HRH  TBCS_HIDEROWHEADER
#define  TBCS_UCN  TBCS_USECOLUMNNAME
#define  TBCS_UCI  TBCS_USECOLUMNINDEX
#define  TBCS_ZBI  TBCS_ZEROBASEDINDEX
#define  TBCS_EMD  TBCS_ENTERKEYMOVEDOWN
#define  TBCS_UNM  TBCS_USENEXTDLGCTLMSG
#define  TBCS_LST  TBCS_LISTBOX
#define  TBCS_ASR  TBCS_ADDSUMMARYROW
#define  TBCS_SEL  TBCS_RANGESELECTED
#define  TBCS_CAP  TBCS_MOUSECAPTURED

typedef struct {
  I4B   ir;
  I4B   ic;
} POSI;
typedef POSI *pPOSI, *PPOSI;
typedef const POSI *rPOSI, *PCPOSI;

typedef struct {
  I4B   r1;
  I4B   r2;
} RBLK;
typedef RBLK *pRBLK, *PRBLK;
typedef const RBLK *rRBLK, *PCRBLK;

#define  DC_LEFT          DT_LEFT
#define  DC_CENTER        DT_CENTER
#define  DC_RIGHT         DT_RIGHT
#define  DC_INVALIDROW    0x00000100
#define  DC_INVALIDCOLUMN 0x00000200
#define  DC_DROPDOWNLIST  0x00000400
#define  DC_DROPDOWN      0x00000800
#define  DC_LINK          0x00001000
#define  DC_DISABLED      0x00002000
#define  DC_COLUMNHEADER  0x00004000
#define  DC_ROWHEADER     0x00008000
#define  DC_SELECTED      0x00010000
#define  DC_BLANK         0x00020000
#define  DC_CURRENTROW    0x00040000
#define  DC_CURRENTCOLUMN 0x00080000
#define  DC_CELLPTR       0x000c0000
#define  DC_FIXEDROW      0x00100000
#define  DC_FIXEDCOLUMN   0x00200000
#define  DC_SUMMARYROW    0x00400000
#define  DC_READONLY      0x00800000

#define  DC_LFT  DC_LEFT
#define  DC_CEN  DC_CENTER
#define  DC_RGT  DC_RIGHT
#define  DC_INR  DC_INVALIDROW
#define  DC_INC  DC_INVALIDCOLUMN
#define  DC_DDL  DC_DROPDOWNLIST
#define  DC_DDN  DC_DROPDOWN
#define  DC_LNK  DC_LINK
#define  DC_DED  DC_DISABLED
#define  DC_CHD  DC_COLUMNHEADER
#define  DC_RHD  DC_ROWHEADER
#define  DC_SEL  DC_SELECTED
#define  DC_BLA  DC_BLANK
#define  DC_CUR  DC_CURRENTROW
#define  DC_CUC  DC_CURRENTCOLUMN
#define  DC_PTR  DC_CELLPTR
#define  DC_FXR  DC_FIXEDROW
#define  DC_FXC  DC_FIXEDCOLUMN
#define  DC_SMR  DC_SUMMARYROW
#define  DC_RDO  DC_READONLY

#define  CST(tcid, bcid, hcid, vcid)  OCTVAL(tcid, bcid, hcid, vcid)
#define  PST(pcid, bcid, fcid, icid)  OCTVAL(pcid, bcid, fcid, icid)

U4B  WINAPI DefCST(I4B fmt);
U4B  WINAPI DefPST(I4B fmt);

typedef struct {
  pSTR  bf;
  I4B   fmt;
  I4B   cst;
  I4B   pst;
  HDC   hdc;
  pRECT pr;
} DRWI;
typedef DRWI *pDRWI, *PDRWI;
typedef const DRWI *rDRWI, *PCDRWI;

void WINAPI SetDRWI(pDRWI di, pSTR bf, HDC hdc, pRECT pr);

iANY WINAPI DefBOLTBLProc(HWND hwnd, U4B umsg, uANY wpa, iANY lpa);

//乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗//

typedef struct {
  rSTR  cls;
  I4B   sty;
  rSTR  tit;
  I4B   id;
  uANY  pa;
  U4B   rsv;
} CREI;
typedef CREI *pCREI, *PCREI;
typedef const CREI *rCREI, *PCCREI;

#define  FRMM_GETNCHILDREN     (WM_USER + 0x01)
#define  FRMM_GETCHILD         (WM_USER + 0x02)
#define  FRMM_GETINDEX         (WM_USER + 0x03)
#define  FRMM_GETACTIVE        (WM_USER + 0x04)
#define  FRMM_ARRANGE          (WM_USER + 0x05)
#define  FRMM_ACTIVATE         (WM_USER + 0x06)
#define  FRMM_CREATECHILD      (WM_USER + 0x07)
#define  FRMM_DESTROYCHILD     (WM_USER + 0x08)
#define  FRMM_GETNEWID         (WM_USER + 0x09)
#define  FRMM_GETCHILDBYNAME   (WM_USER + 0x0a)
#define  FRMM_SETFLAGS         (WM_USER + 0x0b)
#define  FRMM_GETFLAGS         (WM_USER + 0x0c)
#define  FRMM_SETEXTRA         (WM_USER + 0x0d)
#define  FRMM_GETEXTRA         (WM_USER + 0x0e)
#define  FRMM_GETPLACEMENT     (WM_USER + 0x0f)
#define  FRMM_STATMSG          (WM_USER + 0x10)
#define  FRMM_BUSYMSG          (WM_USER + 0x11)
#define  FRMM_ENDBUSY          (WM_USER + 0x12)
#define  FRMM_INITTOOL         (WM_USER + 0x13)
#define  FRMM_APPSTATUS        (WM_USER + 0x14)

#define  FRMS_TILE        0x04
#define  FRMS_VERTICAL    0x00
#define  FRMS_HORIZONTAL  0x02
#define  FRMS_LEFT        0x00
#define  FRMS_RIGHT       0x01
#define  FRMS_UPPER       0x00
#define  FRMS_LOWER       0x01

#define  FRMS_TIL  FRMS_TILE
#define  FRMS_VRT  FRMS_VERTICAL
#define  FRMS_HRZ  FRMS_HORIZONTAL
#define  FRMS_LFT  FRMS_LEFT
#define  FRMS_RGT  FRMS_RIGHT
#define  FRMS_UPR  FRMS_UPPER
#define  FRMS_LWR  FRMS_LOWER

#define  OPR_TILE      0
#define  OPR_ACTIVATE  1
#define  OPR_DESTROY   2

iANY WINAPI DefBOLFRMProc(HWND hwnd, U4B umsg, uANY wpa, iANY lpa);

typedef struct {
  I4B   wx, wy;
  I4B   ww, wh;
  BOOL  mx;
} WPOS;
typedef WPOS *pWPOS, *PWPOS;
typedef const WPOS *rWPOS, *PCWPOS;

typedef struct {
  rSTR  nam;
  pWPOS wp;
  pMNUS ms;
  I4B   tid;
  pTOBS ts;
  I4B   sid;
  pTOBS ss;
  uANY  ext;
} FRMI;
typedef FRMI *pFRMI, *PFRMI;
typedef const FRMI *rFRMI, *PCFRMI;

HWND WINAPI CreateBOLFRMWindow(HINSTANCE hinst, rFRMI fi);

//乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗//

U4B  WINAPI BOLGUIVer(void);

BOOL WINAPI InitBOLGUI(uANY pa);
void WINAPI TermBOLGUI(void);

#ifdef __cplusplus
}
#endif

//乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗乗//
