'Programming > C Win32 MFC' 카테고리의 다른 글
| MFC 모달리스(modaless) 다이얼로그 (0) | 2017.08.01 |
|---|---|
| MFC에서 richedit 때문에 실행이 안돼? (0) | 2017.08.01 |
| MFC 다중문서 / 단일문서 (0) | 2017.07.21 |
| MFC 다이얼로그 숨기기 (0) | 2017.07.13 |
| 2차원 배열에 대한 포인터 (0) | 2017.06.21 |
| MFC 모달리스(modaless) 다이얼로그 (0) | 2017.08.01 |
|---|---|
| MFC에서 richedit 때문에 실행이 안돼? (0) | 2017.08.01 |
| MFC 다중문서 / 단일문서 (0) | 2017.07.21 |
| MFC 다이얼로그 숨기기 (0) | 2017.07.13 |
| 2차원 배열에 대한 포인터 (0) | 2017.06.21 |
항상 다이얼로그로만 짜봐서
한번 다른 방법도 해봐야지..
예전에 영상처리 프로그램 학교에서 배울때 MDI로 짠적은 있는데
그냥 책보고 따라친 수준이라 다시 봐야 할듯.. 기억도 안남 ㅠㅠ
[링크 : http://blog.naver.com/chaose21c/150133862259]
[링크 : http://nenunena.tistory.com/66]
[링크 : http://www.tipssoft.com/bulletin/board.php?bo_table=FAQ&wr_id=534]
| MFC에서 richedit 때문에 실행이 안돼? (0) | 2017.08.01 |
|---|---|
| MFC 다이얼로그 - 탭 (0) | 2017.07.21 |
| MFC 다이얼로그 숨기기 (0) | 2017.07.13 |
| 2차원 배열에 대한 포인터 (0) | 2017.06.21 |
| slider control / settic (0) | 2017.06.12 |
아직은 구현해보지 않았음..
조만간 쓸 예정
[링크 : https://linsoo.co.kr/archives/13725]
[링크 : http://phiru.tistory.com/128]
[링크 : http://frostguy.tistory.com/39]
| MFC 다이얼로그 - 탭 (0) | 2017.07.21 |
|---|---|
| MFC 다중문서 / 단일문서 (0) | 2017.07.21 |
| 2차원 배열에 대한 포인터 (0) | 2017.06.21 |
| slider control / settic (0) | 2017.06.12 |
| mfc 파일 경로 얻기 (0) | 2017.05.30 |
| MFC 다중문서 / 단일문서 (0) | 2017.07.21 |
|---|---|
| MFC 다이얼로그 숨기기 (0) | 2017.07.13 |
| slider control / settic (0) | 2017.06.12 |
| mfc 파일 경로 얻기 (0) | 2017.05.30 |
| MFC CHttpConnection timetout 설정 (0) | 2017.05.29 |
SetTicFreq()는 Tick Marks True / Auto Ticks True로 해야 한다면
SetTic()은 Tick Marks True / Auto Ticks False로 해야 한다
[링크 : https://msdn.microsoft.com/ko-kr/library/5tw28355(v=vs.100).aspx]
| MFC 다이얼로그 숨기기 (0) | 2017.07.13 |
|---|---|
| 2차원 배열에 대한 포인터 (0) | 2017.06.21 |
| mfc 파일 경로 얻기 (0) | 2017.05.30 |
| MFC CHttpConnection timetout 설정 (0) | 2017.05.29 |
| win32 외부 프로그램 실행 (0) | 2017.05.29 |
GetCurrentDirectory() - 작업 디렉토리
GetModuleFileNameW() - 현재 실행중인 파일의 경로+파일명
[링크 : http://egloos.zum.com/katalog/v/4637907]
[링크 : http://ds3evx.tistory.com/entry/MFC-Tip-실행-파일-폴더-구하기]
망할유니코드랑 썪이면서 혼돈의 카오스 ㄷㄷ
WCHAR pathstr[256]; GetModuleFileNameW(NULL, pathstr, 256); PathRemoveFileSpec(pathstr); // 실행파일의 경로만 받아옴 // 실행파일과 동일 디렉토리내의 test.exe를 /h 옵션으로 실행 CString exec("test.exe"); Cstring opt("/h"); CString path(pathstr); path = _T("\"") + path + _T("\""); cmd.AppendFormat(_T("%s\\%s %s"),path, exec, opt); m_ret.SetWindowTextW(cmd); _wsystem(cmd); |
| 2차원 배열에 대한 포인터 (0) | 2017.06.21 |
|---|---|
| slider control / settic (0) | 2017.06.12 |
| MFC CHttpConnection timetout 설정 (0) | 2017.05.29 |
| win32 외부 프로그램 실행 (0) | 2017.05.29 |
| cstring 'null' append 문제? (0) | 2017.05.18 |
이것저것 찾아서 해보는데 영 안되네...
[링크 : http://forums.codeguru.com/...48863-How-to-set-timeout-value-for-CHttpFile-SendReqeust()]
[링크 : https://stackoverflow.com/questions/14986898/how-to-set-connection-timeout]
BOOL InternetSetOption( _In_ HINTERNET hInternet, _In_ DWORD dwOption, _In_ LPVOID lpBuffer, _In_ DWORD dwBufferLength ); |
[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa385114(v=vs.85).aspx]
INTERNET_OPTION_CONNECT_TIMEOUT 2 Sets or retrieves an unsigned long integer value that contains the time-out value, in milliseconds, to use for Internet connection requests. Setting this option to infinite (0xFFFFFFFF) will disable this timer. If a connection request takes longer than this time-out value, the request is canceled. When attempting to connect to multiple IP addresses for a single host (a multihome host), the timeout limit is cumulative for all of the IP addresses. This option can be used on any HINTERNET handle, including a NULL handle. It is used by InternetQueryOption and InternetSetOption. |
[링크 : https://msdn.microsoft.com/en-us/library/windows/desktop/aa385328(v=vs.85).aspx]
cIntSession.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 3000); |
2007년 글이긴 한데, 해당 함수 버그로 인해 정상 작동을 하지 않는다고?
[링크 : http://soonsin.com/80]
[링크 : https://social.msdn.microsoft.com/.../cinternetsession-openurl-timeout-problem?forum=vcmfcatl]
[링크 : https://support.microsoft.com/en-us/help/177190/bug-error-12019-when-calling-internetwritefile]
+
일단 헤더에서 찾은건 아래와 같은 timeout들인데 멀 설정하던 어떤 값을 하던 7초 정도 되어야 타임아웃 된다 ㅠㅠ
// timetout for HTTP socket pHttpFile->SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 100); pHttpFile->SetOption(INTERNET_OPTION_SEND_TIMEOUT, 100); pHttpFile->SetOption(INTERNET_OPTION_RECEIVE_TIMEOUT, 100); pHttpFile->SetOption(INTERNET_OPTION_DATA_SEND_TIMEOUT, 100); pHttpFile->SetOption(INTERNET_OPTION_DATA_RECEIVE_TIMEOUT, 100); pHttpFile->SetOption(INTERNET_OPTION_LISTEN_TIMEOUT, 100); |
| slider control / settic (0) | 2017.06.12 |
|---|---|
| mfc 파일 경로 얻기 (0) | 2017.05.30 |
| win32 외부 프로그램 실행 (0) | 2017.05.29 |
| cstring 'null' append 문제? (0) | 2017.05.18 |
| MFC 시간측정(msec) (0) | 2017.04.18 |
system(""); |
win32에서도 지원 (유닉스 계열 전용이 아니었군)
[링크 : http://rockdrumy.tistory.com/483]
다만, system()에서 실행되는 동안 멈추는 단점이 있다.
[링크 : https://msdn.microsoft.com/en-us/library/277bwbdz.aspx]
그리고 얘.. 공백 문자 경로 해결을 못하겠네?
[링크 : https://stackoverflow.com/.../how-to-overcome-spaces-in-the-path-while-passing-to-system]
[링크 : https://stackoverflow.com/.../c-system-not-working-when-there-are-spaces-in-two-different-parameters]
WinExec(cmd, SW_SHOW); |
독립된 프로세스로 구동함.
공백문자 문제 없음(따옴표 하나로 해결)
ShellExecute(NULL, _T("open"), _T("cmd"), NULL, NULL, SW_SHOW); |
얘도 독립된 프로세스로 구동
STARTUPINFO StartupInfo = {0}; PROCESS_INFORMATION ProcessInformation; BOOL ret; ret = CreateProcess(_T("c:\\windows\\system32\\cmd.exe"),NULL,NULL,NULL,FALSE,0,NULL,NULL,&StartupInfo, &ProcessInformation); if(!ret) return ; WaitForSingleObject(ProcessInformation.hProcess, INFINITE); |
독립된 프로세스 이나 종료대기
STARTUPINFO 구조체 초기화 안해주면 오류남
+
[링크 : http://mafa.tistory.com/entry/WinExec-프로세서에서-외부-프로세스-실행하기]
[링크 : http://karfn84.tistory.com/entry/MFC-프로그램-안에서-외부-파일을-실행시키기...CreateProcess]
[링크 : http://zodd.tistory.com/322]
얘는 종료시키는 애
[링크 : https://stackoverflow.com/questions/13193719/kill-process-started-with-shellexecuteex]
| mfc 파일 경로 얻기 (0) | 2017.05.30 |
|---|---|
| MFC CHttpConnection timetout 설정 (0) | 2017.05.29 |
| cstring 'null' append 문제? (0) | 2017.05.18 |
| MFC 시간측정(msec) (0) | 2017.04.18 |
| MFC 다이얼로그 자세히(접기) (0) | 2017.04.14 |
솔찍히 무슨 문제가 있을지 모르겠지만
구조상으로는 CString이니까 null 로 끝나도록 하니
되도록이면 null을 추가하는건 안좋지 않을까 싶은데
msdn 문서는 안보이네
[링크 : http://stackoverflow.com/questions/5042894/is-a-cstring-always-null-terminated]
| MFC CHttpConnection timetout 설정 (0) | 2017.05.29 |
|---|---|
| win32 외부 프로그램 실행 (0) | 2017.05.29 |
| MFC 시간측정(msec) (0) | 2017.04.18 |
| MFC 다이얼로그 자세히(접기) (0) | 2017.04.14 |
| mfc ccombobox 문자열 받아오기 (0) | 2017.04.05 |
여러가지 함수들이 있는데 msec 단위라면 이정도로 충분할 듯
typedef long clock_t; #define CLOCKS_PER_SEC 1000 _Check_return_ _CRTIMP clock_t __cdecl clock(void); |
[링크 : http://ohpotato.tistory.com/30]
다른건 lib 링크해주고 별별 이상한걸 include 해야 하니 귀찮...
| win32 외부 프로그램 실행 (0) | 2017.05.29 |
|---|---|
| cstring 'null' append 문제? (0) | 2017.05.18 |
| MFC 다이얼로그 자세히(접기) (0) | 2017.04.14 |
| mfc ccombobox 문자열 받아오기 (0) | 2017.04.05 |
| MFC 라디오버튼 사용하기 (0) | 2017.04.05 |