본문 바로가기

[+] Information

API GraphOut 예제 #include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; LPSTR lpszClass="GraphOut"; 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=LoadC.. 더보기
API DrawText 예제 #include /* 기본적인 데이터 타입, 함수 원형, 매크로 상수 정의 헤더파일 */ LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; LPSTR lpszClass="DrawText"; int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ,LPSTR lpszCmdParam,int nCmdShow) /* 윈도우즈 프로그램의 시작점은 Main이 아닌 WinMain이다. EP(Entry Point) */ /* hInstance : 프로그램의 인스턴스 핸들이다. */ /* hPrevInstance : 바로 앞에 실행된 현재 프로그램의 인스턴스 핸들이다. 없을 경우는 NU.. 더보기
API TextOut 예제 #include /* 기본적인 데이터 타입, 함수 원형, 매크로 상수 정의 헤더파일 */ LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; LPSTR lpszClass="TextOut"; int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ,LPSTR lpszCmdParam,int nCmdShow) /* 윈도우즈 프로그램의 시작점은 Main이 아닌 WinMain이다. EP(Entry Point) */ /* hInstance : 프로그램의 인스턴스 핸들이다. */ /* hPrevInstance : 바로 앞에 실행된 현재 프로그램의 인스턴스 핸들이다. 없을 경우는 NUL.. 더보기
두번째 연습문제. 1. spam and egg 문자열을 슬라이싱을 이용하여 spam egg로 변경하여라. s = 'spam and egg' >>> s = s[:5] + s[9:] 출력 결과: 'spam egg' 2. 인덱싱과 슬라이싱을 이용하여 s = 'spam and ham'을 'ham spam'으로 바꾸시오. s = 'spam and ham' >>> s = s[9:] + ' ' + s[:4] 출력 결과: 'ham spam' 3. 파이썬 경로명 s = '/usr/local/bin/python'에서 각각의 디렉토리 경로명을 분리하여 출력하시오. s = '/usr/local/bin/python' for a in s.split('/'): if a == '': print a, 출력 결과 : usr local bin python.. 더보기
첫번째 예제 #include /* 기본적인 데이터 타입, 함수 원형, 매크로 상수 정의 헤더파일 */ LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; LPSTR lpszClass="First"; int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ,LPSTR lpszCmdParam,int nCmdShow) /* 윈도우즈 프로그램의 시작점은 Main이 아닌 WinMain이다. EP(Entry Point) */ /* hInstance : 프로그램의 인스턴스 핸들이다. */ /* hPrevInstance : 바로 앞에 실행된 현재 프로그램의 인스턴스 핸들이다. 없을 경우는 NULL이.. 더보기