본문 바로가기

Windows/Windows API

드래그 (drag, ImageList_BeginDrag, ClientToScreen, ImageList_DragEnter, ImageList_DragMove, ImageList_DragLeave, ImageList_EndDrag) #include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; HWND hWndMain; LPSTR lpszClass="DragImage"; 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); WndCla.. 더보기
오버레이 이미지 (overlay) #include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; LPSTR lpszClass="OverlayImage"; int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ,LPSTR lpszCmdParam,int nCmdShow) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst=hInstance; if(!hPrevInstance) { WndClass.cbClsExtra=0; WndClass.cbWndExtra=0; WndClass.hbrBackground=(HBRUSH)GetStockObject(LTGRAY_BRUS.. 더보기
이미지 리스트 (image list, ImageList_LoadBitmap, ImageList_Create, ImageList_AddMasked, LoadBitmap, ImageList_SetBkColor, ImageList_Draw, ImageList_DrawEx) #include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; LPSTR lpszClass="MaskedImage"; int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ,LPSTR lpszCmdParam,int nCmdShow) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst=hInstance; if(!hPrevInstance) { WndClass.cbClsExtra=0; WndClass.cbWndExtra=0; WndClass.hbrBackground=(HBRUSH)GetStockObject(LTGRAY_BRUSH.. 더보기
프로퍼티 스타일 (property style, PROPSHEETPAGE,PROPSHEETHEADER) #include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; HWND g_MainWnd; LPSTR lpszClass="PropSheet"; int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ,LPSTR lpszCmdParam,int nCmdShow) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst=hInstance; if(!hPrevInstance) { WndClass.cbClsExtra=0; WndClass.cbWndExtra=0; WndClass.hbrBackground=(HBRUSH)GetStockObjec.. 더보기
상태바 (status) #include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; LPSTR lpszClass="MyState"; int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ,LPSTR lpszCmdParam,int nCmdShow) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst=hInstance; if(!hPrevInstance) { WndClass.cbClsExtra=0; WndClass.cbWndExtra=0; WndClass.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH); Wn.. 더보기
툴바 버튼 스타일 (Toolbar Control and Button Styles) Toolbar Control and Button Styles The following window styles are specific to toolbars. They are combined with other window styles when the toolbar is created. Note For Common Controls version 6.00, if a visual style is being used with the toolbar, buttons are always transparent regardless of the style setting. Otherwise, transparency behavior is normal as indicated by the use of the TBSTYLE_FLA.. 더보기
툴바버튼 구조체 (Toolbar Button States) Toolbar Button States This section lists the states a toolbar button can have. Constants TBSTATE_CHECKED 체크된 상태 즉 버튼이 눌러져 있는 상태 The button has the TBSTYLE_CHECK style and is being clicked. TBSTATE_ELLIPSES Version 4.70. The button's text is cut off and an ellipsis is displayed. TBSTATE_ENABLED 사용가능한 상태 The button accepts user input. A button that doesn't have this state is grayed. TBSTATE_HIDDEN.. 더보기
툴바 (Toolbar) #include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; LPSTR lpszClass="MyToolBar"; int APIENTRY WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance ,LPSTR lpszCmdParam,int nCmdShow) { HWND hWnd; MSG Message; WNDCLASS WndClass; g_hInst=hInstance; if(!hPrevInstance) { WndClass.cbClsExtra=0; WndClass.cbWndExtra=0; WndClass.hbrBackground=(HBRUSH)GetStockObject(WHITE_BRUSH); .. 더보기
데이트 타입 (Date and Time Picker Control Styles) Date and Time Picker Control Styles The window styles listed here are specific to date and time picker controls. Constants DTS_APPCANPARSE Allows the owner to parse user input and take necessary action. It enables users to edit within the client area of the control when they press the F2 key. The control sends DTN_USERSTRING notification messages when users are finished. DTS_LONGDATEFORMAT 긴 날짜 .. 더보기
시간 설정 (INITCOMMONCONTROLSEX, SYSTEMTIME, ICC_DATE_CLASSES, DATETIMEPICK_CLASS, DateTime_GetSystemtime, DateTime_SetSystemtime) // // IE 3.0 이상에서 실행 가능 // #include LRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM); HINSTANCE g_hInst; HWND hWndMain; LPSTR lpszClass="DTP"; 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.. 더보기