본문 바로가기

windows.h

Windows에서의 문자셋(Character Sets) 1. 문자셋의 종류와 특성 SBCS(Single Byte Character Set) : 1바이트로 문자를 표현한다. 대표적으로 아스키 코드(ASCII CODE)가 있다. MBCS(Multi Byte Character Set) : 문자를 표현 하는데 있어서 ASCII CODE 는 1바이트로 그 외에는 2바이트로 처리한다. WBCS(Wide Byte Character Set) : 모든 문자를 2바이트로 표현한다. 대표적으로 유니코드(UNICODE)가 있다. 2. WBCS 기반 프로그래밍 기본적으로 운영체제에서는 문자열을 MBCS 기반으로 처리한다. 예) #include #include int main() { char str[] = "AB가나"; int len = strlen(str); printf("%d",.. 더보기
윈도우 프로그램 기본 틀 #include LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); HINSTANCE g_hInst; HWND hwnd; LPCTSTR lpszClass=TEXT("Formality"); int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nCmdShow) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst=hInstance; WndClass.cbClsExtra=0; WndClass.cbWndExtra=0; WndClass.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH.. 더보기
윈도우 기초 프로그래밍 #include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; LPCTSTR lpszClass=TEXT("Sample"); int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ,LPSTR lpszCmdParam,int nCmdShow) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst=hInstance; WndClass.cbClsExtra=0; WndClass.cbWndExtra=0; WndClass.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH); WndClass.hCursor.. 더보기