"Win API"의 두 판 사이의 차이

jjuiddong
이동: 둘러보기, 찾기
(새 문서: * 더블 버퍼링 ** https://github.com/jjuiddong/wxMemMonitor 의 Target프로젝트의 target.cpp 파일에 구현되어 있다. ** http://msdn.microsoft.com/en-us/library/ms969905...)
 
 
(한 사용자의 중간의 편집 10개 숨겨짐)
2번째 줄: 2번째 줄:
 
** https://github.com/jjuiddong/wxMemMonitor 의 Target프로젝트의 target.cpp 파일에 구현되어 있다.
 
** https://github.com/jjuiddong/wxMemMonitor 의 Target프로젝트의 target.cpp 파일에 구현되어 있다.
 
** http://msdn.microsoft.com/en-us/library/ms969905 사이트를 참조해서 구현했다.
 
** http://msdn.microsoft.com/en-us/library/ms969905 사이트를 참조해서 구현했다.
 +
* 실행인자값 가져오기
 +
int nArgs;
 +
LPWSTR *szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
 +
if (nArgs > 1)
 +
{
 +
configFileName = wstr2str(szArglist[ 1]);
 +
SetConfigFileName( configFileName );
 +
}
 +
* 마우스 이벤트, 키보드 이벤트 처리
 +
** mouse_event()
 +
*** mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);
 +
** keybd_event()
 +
*** keybd_event(VK_ESCAPE, 0, KEYEVENTF_EXTENDEDKEY, 0);
 +
 +
* 프로세스 실행, 끝날 때까지 대기
 +
STARTUPINFOA si = {0};
 +
PROCESS_INFORMATION pi;
 +
ZeroMemory(&si,sizeof(si));
 +
ZeroMemory(&pi,sizeof(pi));
 +
si.cb = sizeof(STARTUPINFOA);
 +
si.dwFlags=STARTF_USESHOWWINDOW;
 +
si.wShowWindow=SW_SHOW;
 +
 +
if (!::CreateProcessA(NULL, "WebExtractor.exe", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
 +
{
 +
wxMessageBox( "Not Found WebExtractor" );
 +
return;
 +
}
 +
 +
WaitForSingleObject( pi.hProcess, INFINITE );
 +
  CloseHandle( pi.hProcess );
 +
CloseHandle( pi.hThread );
 +
* [[Drag & Drop]]
 +
* [[Windows API 클립보드 복사,저장]]
 +
* [[Find Window]]
 +
* [[Window Screen Capture]]
 +
* [[Main Loop]]
 +
* [[스크린 캡쳐]]
 +
* [[FileOpen]]

2018년 8월 8일 (수) 09:42 기준 최신판

int nArgs;
LPWSTR *szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
if (nArgs > 1)
{
	configFileName = wstr2str(szArglist[ 1]);
	SetConfigFileName( configFileName );
}
  • 마우스 이벤트, 키보드 이벤트 처리
    • mouse_event()
      • mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0);
    • keybd_event()
      • keybd_event(VK_ESCAPE, 0, KEYEVENTF_EXTENDEDKEY, 0);
  • 프로세스 실행, 끝날 때까지 대기
		STARTUPINFOA si = {0};
		PROCESS_INFORMATION pi;
		ZeroMemory(&si,sizeof(si));
		ZeroMemory(&pi,sizeof(pi));
		si.cb = sizeof(STARTUPINFOA);
		si.dwFlags=STARTF_USESHOWWINDOW;
		si.wShowWindow=SW_SHOW;

		if (!::CreateProcessA(NULL, "WebExtractor.exe", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi))
		{
			wxMessageBox( "Not Found WebExtractor" );
			return;
		}

		WaitForSingleObject( pi.hProcess, INFINITE );
 		CloseHandle( pi.hProcess );
		CloseHandle( pi.hThread );
개인 도구
이름공간

변수
행위
둘러보기
도구모음