diff --git a/include/controls.cpp b/include/controls.cpp index 18493d32a..5be2bed28 100755 --- a/include/controls.cpp +++ b/include/controls.cpp @@ -1667,7 +1667,7 @@ void TButton_control::set_icon(unsigned int icon_up, unsigned int icon_dn) TPushbutton_control::TPushbutton_control(WINDOW win, short cid, short left, short top, short width, short height, const char* flags, const char* text, - short bmp_up, short bmp_dn) + int bmp_up, int bmp_dn) : _bmp_up(bmp_up), _bmp_dn(bmp_dn) { @@ -1695,7 +1695,7 @@ void TPushbutton_control::set_caption(const char* c) { TControl::set_caption(cap); set_icon(0); - set_bmp(short(0), short(0)); + set_bmp(0, 0); _obj->v.btn->drawable = false; _obj->v.btn->fore_color = color; xi_set_obj_font_id(_obj, xvtil_default_font(bold, big)); @@ -1719,9 +1719,9 @@ void TPushbutton_control::set_bmp(int bmp_up, int bmp_dn) XVT_IMAGE img_up = NULL, img_dn = NULL; if (bmp_up > 0) - img_up = _picture->image(bmp_up).xvt_image(); + img_up = _picture->image(_bmp_up).xvt_image(); if (bmp_dn > 0) - img_dn = _picture->image(bmp_dn).xvt_image(); + img_dn = _picture->image(_bmp_dn).xvt_image(); xvt_btn_set_images((WINDOW)_obj->v.btn->btnctl, img_up, img_dn); } else @@ -1781,7 +1781,7 @@ void TPushbutton_control::update() xvt_dwin_set_std_cpen(win, TL_PEN_HOLLOW); xi_draw_rect((XinWindow)win, &rct); - const short bmp = (_bmp_dn > 0 && _obj->v.btn->down) ? _bmp_dn : _bmp_up; + const int bmp = (_bmp_dn > 0 && _obj->v.btn->down) ? _bmp_dn : _bmp_up; if (bmp > 0) { const TImage& i = attrib & XI_ATR_ENABLED ? _picture->image(bmp) : _picture->disabled_image(bmp); diff --git a/include/controls.h b/include/controls.h index cf291717c..8727d8115 100755 --- a/include/controls.h +++ b/include/controls.h @@ -237,7 +237,7 @@ public: TPushbutton_control(WINDOW win, short cid, short left, short top, short width, short height, const char* flags, const char* text, - short bmp_up = 0, short _bmp_dn = 0); + int bmp_up = 0, int _bmp_dn = 0); virtual ~TPushbutton_control(); }; diff --git a/include/maskfld.h b/include/maskfld.h index be19dd223..489a2dc5f 100755 --- a/include/maskfld.h +++ b/include/maskfld.h @@ -94,8 +94,8 @@ protected: short _decimals; // Precision TString _prompt; // Prompt TString _flags; // Flags - short _bmp_up; // Bitmap up - short _bmp_dn; // Bitmap down + int _bmp_up; // Bitmap up + int _bmp_dn; // Bitmap down TToken_string _park; // Work string void reset(); }; diff --git a/xvaga/xvtctl.cpp b/xvaga/xvtctl.cpp index 60ad1793f..a1a733be9 100755 --- a/xvaga/xvtctl.cpp +++ b/xvaga/xvtctl.cpp @@ -17,7 +17,7 @@ static wxBitmap Image2Bitmap(XVT_IMAGE image, int maxx, int maxy, BOOLEAN trans) if (image == NULL) return wxNullBitmap; - wxImage& img = *(wxImage*)image; + wxImage img = *(wxImage*)image; int w = img.GetWidth(), h = img.GetHeight(); if (w > maxx || h > maxy)