본문 바로가기

개발자이야기/VC++

VC++ HWND 윈도우 핸들로 새로고침 하기

반응형

HWND hWnd = ::FindWindow("IEFrame", NULL);

 

if(hWnd) {

    HWND hWnd = NULL;

    for(int i = 0; ; i++) {

        if((hWnd = ::FindWindowEx(hWnd, hChild, NULL, NULL)) == NULL)

            break;

        char szClassName[MAX_PATH];

        int n = GetClassName(hWnd, szClassName, 100);

        buf[n] = '\0';

        if(strcmp(szClassName, "Shell DocObject View") == 0) {

            PostMessage(hWnd, WM_KEYDOWN, VK_F5, NULL);

            break;

        }

    }

}

[출처] IE 새로고침|작성자 띠깜

반응형