¾È³çÇϼ¼¿ä.
ªÀº °æ·Âµµ ¾Æ´Ñµ¥ Áú¹® ¿Ã¸®·Á´Ï Á¤¸» ¾¦½º·´³×¿ä..
À̹ÌÁö ¹öÆ۷ΠȸéÀÇ Static control¿¡ À̹ÌÁö¸¦ Ç¥½ÃÇÏ·Á°í Çϴµ¥¿ä.
int length;
CFile f;
f.Open(L"D:\\sample.bmp", CFile::shareDenyNone);
length = f.GetLength();
test = new byte[length];
memset(test, 0x00, length);
f.Read(test, length);
HBITMAP hBmp = ::CreateBitmap(800, 600, 1, 24, test);
m_Picture.ModifyStyle(SS_CENTER, SS_BITMAP | SS_CENTERIMAGE, 0);
m_Picture.SetBitmap(hBmp);
m_Picture.Invalidate();
ÀÌ·¸°Ô ÇÏ´Ï À̹ÌÁö Ç¥½Ã°¡ ¾È µË´Ï´Ù.
Å×½ºÆ® ¸ñÀûÀÌ ÆÄÀÏÀº ¾øÀÌ À§ÀÇ test ¹öÆÛ¸¦ ´Ù¸¥ °÷¿¡¼ ¹Þ¾Æ¼ Ç¥½ÃÇÏ·Á°í Çϴµ¥.. ÆÄÀÏ ¹öÆÛ¸¸ °¡Áö°í
À̹ÌÁö¸¦ Ç¥½ÃÇÏ·Á´Ï Àß ¾È µÇ³×¿ä..
À§ÀÇ test ¹öÆÛ·Î m_Picture¿¡ À̹ÌÁö¸¦ Ç¥½ÃÇÒ ¼ö ÀÖ´Â ¹æ¹ý Á» ¾Ë·ÁÁÖ½Ã¸é °¨»çÇÏ°Ú½À´Ï´Ù.
±¸±Û¸µµµ Çغ¸°í ÀÌ°ÍÀú°Í Çغ¸°í Àִµ¥ ¹æ¹ýÀ» ¸ø ã°Ú¾î¿ä.¤Ð¤Ð
ºÎŹ µå¸³´Ï´Ù. |
Àú°°À¸¸é gdi+ ¿¬°áÇÏ°í dc ¹Þ¾Æ¼ Á÷Á¢ ±×¸®°Ú½À´Ï´Ù.