piątek, 13 listopada 2009

Resizing browser window

How to resize a Gecko SDK browser window:

Native window handle:
nsIWebBrowserChrome -QI-> nsIEmbeddingSiteWindow ->GetSiteWindow(HWND**);
GetClientRect(hWnd, &rect);


nsIWebBrowserChrome ->GetWebBrowser(nsIWebBrowser**)
nsIWebBrowser -QI-> nsIBaseWindow ->SetPositionAndSize()/SetVisibility()

When resizing you have to do both: resize the native window (HWND) and resize the "virtual" browser window (nsIBaseWindow).

Example code: xulrunner-1.9.1.3-source\mozilla-1.9.1\embedding\tests\winEmbed\winEmbed.cpp, function ResizeEmbedding()

Brak komentarzy:

Prześlij komentarz