GUI
-
PCXGUI/GDI 2009. 4. 8. 22:19
Run Length Encoding typedef struct PCX_HEADER { char manufacturer; // 1 char version; // 2 char encoding; // 3 char bits_per_pixel; // 4 short int xmin,ymin; // 5 , 6, 7, 8 short int xmax,ymax; // 9 10, 11, 12 short int hres; // 13, 14 short int vres; // 15, 16 char palette16[48]; // 17-64 char reserved; // 65 char color_planes; // 66 short int bytes_per_line; // 67, 68 short int palette_type; /..
-
날짜/시간 선택(date and time picker; DTP) 컨트롤 - MFCGUI/컨트롤 2009. 4. 6. 17:06
CDateTimeCtrl on DTN_DATETIMECHANGE .GetTime() .SetTime() class CDateTimeDlg : public CDialog { // Construction public: CDateTimeDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CDateTimeDlg) enum { IDD = IDD_DATETIME_DIALOG }; COleDateTime m_Date1; .. //}}AFX_DATA .. // Generated message map functions //{{AFX_MSG(CDateTimeDlg) virtual BOOL OnInitDialog(); afx_msg v..
-
IP 주소 컨트롤 - MFCGUI/컨트롤 2009. 4. 6. 17:00
CIPAddressCtrl .GetAddress() class CIPAddressDlg : public CDialog { // Construction public: CIPAddressDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CIPAddressDlg) enum { IDD = IDD_IPADDRESS_DIALOG }; CIPAddressCtrl m_ctrlIPAddress; //}}AFX_DATA .. }; void CIPAddressDlg::OnConnect() { BYTE nField0, nFiled1, nField2, nField3; m_ctrlIPAddress.GetAddress(nField0, nFi..
-
스핀 컨트롤 - MFCGUI/컨트롤 2009. 4. 6. 16:53
Edit 컨트롤 Spin 컨트롤 .[Auto Buddy] .[Set Buddy Integer] CSpinButtonCtrl on UDN_DELTAPOS .SetRange() class CPractice9_2Dlg : public CDialog { ... // Dialog Data //{{AFX_DATA(CPractice9_2Dlg) ... int m_nData; //}}AFX_DATA ... // Generated message map functions //{{AFX_MSG(CPractice9_2Dlg) ... afx_msg void OnDeltaposSpinData(NMHDR* pNMHDR, LRESULT* pResult); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; CPract..
-
슬라이더(트랙바) 컨트롤 - MFCGUI/컨트롤 2009. 4. 5. 00:04
CSliderCtrl ON_WM_HSCROLL TB_THUMBTRACK TB_ENDTRACK on NM_RELEASEDCAPTURE .SetRange() .SetPos() .GetPos() class CPractice9_1Dlg : public CDialog { // { void HandleSeekbar(UINT nSBCode); ... // } // Construction public: CAudioboxDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CPractice9_1Dlg) enum { IDD = IDD_PRACTICE9_1_DIALOG }; CSliderCtrl m_sliderBlue; ... //}}A..
-
텍스트 그리기 - Win32GUI/GDI 2009. 3. 26. 21:51
SetBkMode() GetBkMode() SetBkColor() GetBkColor() SetTextColor() GetTextColor() DrawText() TextOut() SetTextColor() GetTextMetrics() TEXTMETRIC .tmHeight // 폰트 높이 GetTextExtentPoint32() #include void FormattedTextOut(HDC hDC, int x, int y, LPCTSTR fmt, ...) { char buf[2048]; va_list vlist; va_start(vlist, fmt); int nRet = _vsnprintf(buf, sizeof(buf), fmt, vlist); /* this is safe */ // int nRet =..
-
GUI 제어 - WindowsGUI/컨트롤 2009. 3. 22. 23:01
int WINAPI WinMain( HINSTANCE hInstance, // handle to current instance HINSTANCE hPrevInstance, // handle to previous instance LPSTR lpCmdLine, // pointer to command line int nCmdShow // show state of window)GetCommandLine()WM_CREATEWM_DESTROYWM_QUITWM_PAINTWM_KEYDOWNWM_CHARWM_LBUTTONDOWNWM_CONTEXTMENUWM_HELPGetMessage()TranslateMessage()DispatchMessage()WaitMessage()PeekMess..