GUI/컨트롤
-
커스텀 컨트롤 - MFCGUI/컨트롤 2009. 8. 27. 15:15
CWnd 참조 사이트: http://www.codeproject.com/KB/miscctrl/customcontrol.aspx?display=Print http://www.codeproject.com/KB/static/CustomControl.aspx?display=Print http://www.codeproject.com/KB/miscctrl/subclassdemo.aspx?display=Print http://myhome.hanafos.com/~kukdas/doc/mfc/gridctrl.html http://www.codeproject.com/KB/miscctrl/crangeslider.aspx?display=Print
-
전화 번호 입력 검증 - CGUI/컨트롤 2009. 8. 20. 11:57
bool VerifyPhoneNo(const char *sTelNo_) { bool bRet = true; char *sTelNo=NULL; sTelNo = replaceAll2(sTelNo_, "- ", ""); if (0 == strncmp(sTelNo, "011", 3) || 0 == strncmp(sTelNo, "016", 3) || 0 == strncmp(sTelNo, "017", 3) || 0 == strncmp(sTelNo, "018", 3) || 0 == strncmp(sTelNo, "019", 3) || 0 == strncmp(sTelNo, "010", 3) ) { if (10 > strlen(sTelNo) || 11 < strlen(sTelNo)) { bRet = false; goto ..
-
IP 주소 컨트롤 - Win32GUI/컨트롤 2009. 8. 19. 23:53
공통 컨트롤 4.71 버전부터 지원 IE 4.0 IPM_GETADDRESS IPM_SETADDRESS IPN_FIELDCHANGE LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM wParam,LPARAM lParam) { static HWND hIP; switch (iMessage) { case WM_CREATE: { INITCOMMONCONTROLSEX icex; hWndMain=hWnd; icex.dwSize=sizeof(icex); icex.dwICC=ICC_INTERNET_CLASSES; InitCommonControlsEx(&icex); hIP=CreateWindow(WC_IPADDRESS, NULL,WS_BORDER | WS_CHILD | W..
-
공통 컨트롤GUI/컨트롤 2009. 8. 19. 23:13
날짜/시간 선택(DTP) 컨트롤 Microsoft Internet Explorer Version 3.0 (commctrl.dll version 4.70) 달력(month calendar) 컨트롤 Microsoft Internet Explorer Version 3.0 (commctrl.dll version 4.70) ReBar 윈도우 컨트롤 Microsoft Internet Explorer Version 3.0 (commctrl.dll version 4.70) IP 주소 컨트롤 Microsoft Internet Explorer Version 4.0 (commctrl.dll version 4.71) 페이저 컨트롤 Microsoft Internet Explorer Version 4.0 (commctrl.dll..
-
달력(month calendar) 컨트롤 - MFCGUI/컨트롤 2009. 8. 19. 22:47
CMonthCalCtrl on MCN_SELCHANGE .GetCurSel() // 초기화 버그 class CDateTimeDlg : public CDialog { // Construction public: CDateTimeDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CDateTimeDlg) enum { IDD = IDD_DATETIME_DIALOG }; .. COleDateTime m_Date3; //}}AFX_DATA .. // Generated message map functions //{{AFX_MSG(CDateTimeDlg) virtual BOOL OnInitDialog(); .. afx_msg vo..
-
달력(month calendar) 컨트롤 - Win32GUI/컨트롤 2009. 8. 19. 22:46
MCM_GETCURSEL WM_NOTIFY MCN_SELECT void GetSelectedDate(HWND hwndMonthCal, HWND hwndLabel) { SYSTEMTIME time; TCHAR date[50]; ZeroMemory(&time, sizeof(SYSTEMTIME)); SendMessage(hwndMonthCal, MCM_GETCURSEL, 0, (LPARAM) &time); _stprintf(date, _T("%d/%d/%d"), time.wMonth, time.wDay, time.wYear); SetWindowText(hwndLabel, date); } LRESULT CALLBACK WndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM ..
-
날짜/시간 선택(date and time picker; DTP) 컨트롤 - Win32GUI/컨트롤 2009. 8. 19. 22:23
IE 3.0과 함께 제공 공통 컨트롤 버전 4.70 이후부터 제공 DateTime_GetSystemtime() DateTime_SetSystemtime() #include LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM wParam,LPARAM lParam) { static HWND hDtp; switch (iMessage) { case WM_CREATE: { INITCOMMONCONTROLSEX icex; icex.dwSize=sizeof(icex); icex.dwICC=ICC_DATE_CLASSES; InitCommonControlsEx(&icex); hDtp=CreateWindow(DATETIMEPICK_CLASS, "DTP",WS_BORDER |..
-
콤보 박스 - Win32GUI/컨트롤 2009. 8. 19. 18:05
"COMBOBOX"CBS_DROPDOWN|CBS_DROPDOWNLIST CB_RESETCONTENTCB_ADDSTRINGCB_SETCURSELCB_GETCURSELCB_GETLBTEXT CBN_SELCHANGECBN_EDITCHANGE LRESULT CALLBACK WndProc(HWND hWnd,UINT iMessage,WPARAM wParam,LPARAM lParam){ static HWND hCombo; static TCHAR *Items[]={TEXT("Apple"),TEXT("Orange"),TEXT("Melon"),TEXT("Grape"), TEXT("Strawberry")}; switch (iMessage) { case WM_CREATE: { int i; hCombo=CreateWindow(..