동적으로 폰트 파일 읽어서 컨트롤에 적용하기 DarkKaiser, 2010년 3월 6일2023년 9월 6일 PrivateFontCollection fonts; FontFamily family = LoadFontFamily(@"F:\azuki.ttf", out fonts); theFont = new Font(family, 20.0f); // when done: theFont.Dispose(); family.Dispose(); family.Dispose(); ///////////////////////////////////////////////////////////////////////////////////////// public static FontFamily LoadFontFamily(Stream stream, out PrivateFontCollection fontCollection) { var buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); return LoadFontFamily(buffer, out fontCollection); } //public static unsafe FontFamily LoadFontFamilyUnsafe(byte[] buffer, out PrivateFontCollection Continue Reading
투명 PNG 파일 로드하고 화면에 그리기… DarkKaiser, 2010년 3월 3일2023년 9월 4일 GDI+를 이용하여 PNG 파일을 로드하고 화면에 그리는 방법… // PNG 드로잉 Graphics G2(dc.GetSafeHdc()); G2.DrawImage( m_bitmap, 60, 60 , m_bitmap-GetWidth(), m_bitmap-GetHeight() ); // PNG 파일 로드 Bitmap* Cpng_test1Dlg::PngFromResource(IN HINSTANCE hInst, IN const LPTSTR pName, IN const LPTSTR pType ) { Bitmap* bitmap = NULL; HRSRC hResource = ::FindResource(hInst, pName, Continue Reading