Example #1
0
static void modifyitem (DLGTEMPLATEEX *d, DLGTEMPLATEEX_END *d2, DLGITEMTEMPLATEEX *dt, int id)
{
	bool noyscale = false;
	int wc = 0;

	if (dt->windowClass[0] != 0xffff && (!_tcsicmp (dt->windowClass, WC_LISTVIEWW) || !_tcsicmp (dt->windowClass, WC_TREEVIEWW)))
		listviews[listviewcnt++] = dt->id;

	if (dt->windowClass[0] == 0xffff)
		wc = dt->windowClass[1];

	if (multy >= 89 && multy <= 111) {

		if (wc == 0x0080 && dt->cy <= 20) { // button
			noyscale = true;
		}
		if (wc == 0x0085) {// combo box
			noyscale = true;
		}
		if (wc == 0x0081 && dt->cy <= 20) { // edit box
			noyscale = true;
		}
	}

	if (!noyscale)
		dt->cy = mmy (dt->cy);

	dt->cx = mmx (dt->cx);
	dt->y = mmy (dt->y);
	dt->x = mmx (dt->x);

}
Example #2
0
static void modifytemplate (DLGTEMPLATEEX *d, DLGTEMPLATEEX_END *d2, int id, int fullscreen)
{
	if (fullscreen) {
		d->cx = scaleresource_width;
		d->cy = scaleresource_height;
	} else {
		d->cx = mmx (d->cx);
		d->cy = mmy (d->cy);
	}
}
Example #3
0
File: LR6.cpp Project: Serg-i/asm
int main(int argc, char* argv[])
{
int h_bmp1, h_bmp2, h_bmp3;
errno_t err_file1 = _sopen_s(&h_bmp1,"man.bmp", _O_RDONLY, _SH_DENYNO,_S_IREAD | _S_IWRITE);
errno_t err_file2 = _sopen_s(&h_bmp2,"background.bmp", _O_RDONLY, _SH_DENYNO,_S_IREAD | _S_IWRITE);
h_bmp3 = _creat( "res.bmp", _S_IREAD | _S_IWRITE );
   if( err_file1||err_file2||(h_bmp3==-1))
      exit( 1 );
unsigned char * buf_bmp1, * buf_bmp2, * man, * background;
unsigned long len_bmp1, len_bmp2;
len_bmp1 = _filelength(h_bmp1);
len_bmp2 = _filelength(h_bmp2);

man = buf_bmp1 = new unsigned char[len_bmp1];
background = buf_bmp2 = new unsigned char[len_bmp2];
buf_bmp1=background;//
_read(h_bmp1, man, len_bmp1);
_read(h_bmp2, background, len_bmp2);

BITMAPFILEHEADER bmp_fh1, bmp_fh2;
BITMAPINFO bmp_inf1, bmp_inf2;
bmp_fh1 = *((BITMAPFILEHEADER*)man);
bmp_fh2 = *((BITMAPFILEHEADER*)background);
man = man + sizeof(BITMAPFILEHEADER);
background = background + sizeof(BITMAPFILEHEADER);
bmp_inf1 = *((BITMAPINFO*)man);
bmp_inf2 = *((BITMAPINFO*)background);
man = man + sizeof(BITMAPINFO);
background = background + sizeof(BITMAPINFO);
mmx(man,background, bmp_inf1.bmiHeader.biSizeImage);
_write(h_bmp3,buf_bmp1/*man*/, len_bmp1);

_close(h_bmp1);
_close(h_bmp2);
_close(h_bmp3);

return 0;
}