home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 5 / ctrom5b.zip / ctrom5b / PROGRAM / DIVERSEN / FI21 / MSGBOX.H_ / MSGBOX
Text File  |  1995-02-01  |  2KB  |  55 lines

  1. #define __MSGBOX_H
  2.  
  3.  
  4. #ifndef __DLGBOX_H
  5. #include "dlgbox.h"
  6. #endif
  7.  
  8.  
  9. class cthelpobj;
  10.  
  11.  
  12. class msgboxobj:dlgboxobj
  13. {
  14.    int ctid;                                                  /* help topic id */
  15.    int nobtns;             /* no of buttons excluding the possible help button */
  16.    int idbtnesc;                      /* id for the escape button. -1 for none */
  17.    int iscenter;                                         /* center the dlg box */
  18.    int isdelicon;           /* did we load the icon & thus should del it later */
  19.    HICON hicon;                                     /* icon handle. 0 for none */
  20.    char title[40];
  21.    char txt[1024];                                                      /* msg */
  22.    char btntxts[3][20];
  23.    cthelpobj *ctobj;                                /* online help. 0 for none */
  24.  
  25.    int cmd(WPARAM wp);
  26.    void free();
  27.    void init();
  28.    void clricon();
  29.    void setbtnsvar(int nobtnsx, ...);
  30.  
  31.    public:
  32.  
  33.    msgboxobj();
  34.  
  35.   ~msgboxobj()
  36.    {
  37.       clricon();
  38.    }
  39.  
  40.    int go(HWND owner, char title[], int iscenter = 1);
  41.    int getnobtnsall();
  42.    void settext(char fmt[], ...);
  43.    void seticon(HICON hicon);
  44.    void seticon(UINT iconid);
  45.    void seticon(char iconname[]);
  46.    void setbtns(UINT btnsid);
  47.    void setbtns(char *btntxt1);
  48.    void setbtns(char *btntxt1, char *btntxt2);
  49.    void setbtns(char *btntxt1, char *btntxt2, char *btntxt3);
  50.    void sethelp(cthelpobj *ctobj, int ctid);
  51.    void setescbtn(int btnno);
  52.    BOOL onmsg(UINT msg, WPARAM wp, LPARAM lp);
  53. };
  54.  
  55.