일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 알고리즘
- Python
- install
- dataframe
- RNN
- Numpy
- Lotto
- GitHub
- synology
- CNN
- LSTM
- GT-S80
- 삼성소프트웨어멤버십
- SciPy
- index
- mariadb
- DFS
- mean
- keras
- Button
- E-P1
- pip
- javascript
- SPL
- Splunk
- imread
- pycharm
- pandas
- Series
- ipad
Archives
- Today
- Total
잠토의 잠망경
하나의 Process에서 새로운 Process를 실행시키는 경우 본문
코드 입니다.
LRESULT FAR WINAPI WndProc(HWND hwnd, UINT message, UINT wParam, LONG lParam) { HDC hdc; PAINTSTRUCT ps; RECT rect; HWND hiwnd; //실행시키고자하는 program의 이름이다. 절대경로 상대경로 모두 사용가능 TCHAR *command= TEXT("c:\\ForMobileToKimGM"); HWND child; switch (message) { case WM_PAINT: hdc=BeginPaint(hwnd, &ps); GetClientRect(hwnd,&rect); DrawText(hdc,TEXT("hello, windows!"), -1, &rect, DT_SINGLELINE|DT_CENTER|DT_VCENTER); EndPaint(hwnd, &ps); return 0; case WM_LBUTTONDOWN: //Program을 실행시키기는 API이다. ShellExecute(NULL,TEXT("open"), command,NULL, NULL, SW_HIDE); return 0; case WM_RBUTTONDOWN: // 클래스 이름을 통해서 Handle을 얻어오고 있다. child=FindWindow(TEXT("WonJaeClass"),NULL); // 실행시킨 나의 Process를 정지시키는 API이다. 인자값으로는 handle 값을 주었다. TerminateProcess(child,0); return 0; case WM_DESTROY: PostQuitMessage(0); return 0; } return DefWindowProc(hwnd,message,wParam,lParam); }
Comments