SolarStorm
Programmer
Anyone know how to get the hwnd of the web browser control in VB 6.0?<br><br>I want to replace the winproc of the web browser control with my own. But<br>if I use the Webbrowser.hWnd property of the control, I always get the<br>message<br><br>Method 'HWND' of object 'IWebBrowser2' failed #-2147467259<br><br>What I really want to do is suppress the standard popup menu for the<br>Webbrowser control with my own. My intention was to replace the<br>webbrowser's winproc with<br><br>Function WindowProc(ByVal hw As Long, _<br> ByVal uMsg As Long, _<br> ByVal wParam As Long, _<br> ByVal lParam As Long) As Long<br> Select Case uMsg<br> Case WM_RBUTTONUP<br> frmBrowser.PopupMenu frmBrowser.mnuKidsmenu<br> Case Else<br> WindowProc = CallWindowProc(lpPrevWndProc, hw, _<br> uMsg, wParam, lParam)<br> End Select<br>End Function<br><br>But in order to replace the Winproc, I need the hwnd of the of the web<br>browser.<br><br>Any help here would be appreciated.<br><br>Bob Bryenton<br><A HREF="mailto:bbryenton@solstorm.com">bbryenton@solstorm.com</A><br><br>