[GDI+] Part 1. GDI+ ์ค๋น ๋จ๊ณ
GDI+ ๋ GDI ์์ ํ์ฅ๋ ๊ฐ๋ ์ ๋๋ค. ๋ ๋ง์ ๊ธฐ๋ฅ์ ์ ๊ณตํ๋ฉฐ ์ฌ์ฉํ๊ธฐ ์ฝ๊ณ ์ฑ๋ฅ์ด ๋ฐ์ด๋ฉ๋๋ค.
์ํฐ ์์ผ๋ฆฌ์ด์ฑ(Anti-Aliasing), ๋ ์ ์ฒ๋ฆฌ, ํฌ๋ช ๋ ๋ฑ ๋ณด๋ค ์ฝ๊ฒ ๋ง์ ๊ธฐ๋ฅ๋ค์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
ํ๋ก์ ํธ์์ GDI+๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํด์๋ ์ค๋น๋จ๊ณ๊ฐ ํ์ํฉ๋๋ค.
stdafx.h ์ ๋ค์์ ์ฝ๋๋ฅผ ์ถ๊ฐํฉ๋๋ค.
// stdafx.h
#include <gdiplus.h>
#pragma comment(lib, "gdiplus.lib")
using namespace Gdiplus;
App header file์ ๋ค์์ ์ฝ๋๋ฅผ ์ถ๊ฐํฉ๋๋ค.
// Project Name : My_GDIPlus
class CMy_GDIPlusApp : public CWinApp
{
public:
CMy_GDIPlusApp();
//์๋ ๋ถ๋ถ์ ์ถ๊ฐ.
ULONG_PTR m_gdiplusToken;
// Overrides
public:
virtual BOOL InitInstance();
// Implementation
DECLARE_MESSAGE_MAP()
};
extern CMy_GDIPlusApp theApp;
App source file ์ ๋ค์์ ์ฝ๋๋ฅผ ์ถ๊ฐํฉ๋๋ค.
//xxxApp.cpp
BOOL CMy_GDIPlusApp::InitInstance()
{
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise, any window creation will fail.
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
// ๋ ์ค์ ์ถ๊ฐํฉ๋๋ค.
Gdiplus::GdiplusStartupInput gdiplusStartupInput;
Gdiplus::GdiplusStartup(&m_gdiplusToken, &gdiplusStartupInput, NULL);
// ์ฌ๊ธฐ๊น์ง.
AfxEnableControlContainer();
...
}
์ 3๋จ๊ณ๋ฅผ ๋ชจ๋ ์ถ๊ฐํ์ผ๋ฉด Project๋ฅผ Buildํฉ๋๋ค.
์ฌ๊ธฐ๊น์ง๊ฐ GDI+๋ฅผ ์ฌ์ฉํ๊ธฐ ์ํ ์ค๋น๋จ๊ณ ์์ต๋๋ค. ์ฐธ ์ฝ์ฃ ?
'Programming > MFC' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[GDI] ๋๋ธ ๋ฒํผ๋ง(Double Buffering) ์ฌ์ฉํ๊ธฐ (2) | 2019.02.26 |
---|---|
[GDI] ๋๋ธ ๋ฒํผ๋ง(Double Buffering) ์๊ฐ (0) | 2019.02.24 |
[GDI+] Part 2. ์๋ํจ์ (0) | 2019.01.27 |
[GDI] Part 2. ์๋ํจ์ #2 (0) | 2019.01.27 |
[GDI] Part 2. ์๋ํจ์ #1 (0) | 2019.01.27 |
[GDI] Part 1. GDI ๊ฐ๋ (0) | 2019.01.27 |
[MFC] Custom Button ๋ง๋ค๊ธฐ (5) | 2019.01.16 |
๋๊ธ
์ด ๊ธ ๊ณต์ ํ๊ธฐ
-
๊ตฌ๋
ํ๊ธฐ
๊ตฌ๋ ํ๊ธฐ
-
์นด์นด์คํก
์นด์นด์คํก
-
๋ผ์ธ
๋ผ์ธ
-
ํธ์ํฐ
ํธ์ํฐ
-
Facebook
Facebook
-
์นด์นด์ค์คํ ๋ฆฌ
์นด์นด์ค์คํ ๋ฆฌ
-
๋ฐด๋
๋ฐด๋
-
๋ค์ด๋ฒ ๋ธ๋ก๊ทธ
๋ค์ด๋ฒ ๋ธ๋ก๊ทธ
-
Pocket
Pocket
-
Evernote
Evernote
๋ค๋ฅธ ๊ธ
-
[GDI] ๋๋ธ ๋ฒํผ๋ง(Double Buffering) ์๊ฐ
[GDI] ๋๋ธ ๋ฒํผ๋ง(Double Buffering) ์๊ฐ
2019.02.24 -
[GDI+] Part 2. ์๋ํจ์
[GDI+] Part 2. ์๋ํจ์
2019.01.27 -
[GDI] Part 2. ์๋ํจ์ #2
[GDI] Part 2. ์๋ํจ์ #2
2019.01.27 -
[GDI] Part 2. ์๋ํจ์ #1
[GDI] Part 2. ์๋ํจ์ #1
2019.01.27