Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ MT-multithreading and servers » Why ie cannt catch messages from keyboard and mouse
Re: Why ie cannt catch messages from keyboard and mouse [message #25548 is a reply to message #25533] Mon, 01 March 2010 10:02 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
jiuzhi wrote on Sun, 28 February 2010 07:01

I had try to overriding WindowProc and send message to ie's document handle,or setfocus to ie's document,but did not work.

Because I just want a control to browse a web page,I only spent a few hours to get this, so it is very simple. Embarassed


OK, found it.

The problem is that DHCtrl was originally designed for OpenGL widget - in that case, it was not desirable that widget would eat all event messages. That is why by default, DHCtrl is disabled (so that parent Ctrl can take over message processing, effectively returning it back to DHCtrl, because in U++, message dispatch to child widgets is done by CtrlCore).

So the one simple remedy is to:

	LRESULT hdIECtrl::WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
	{
		switch (message)
		{
		case WM_SIZE:
			wb.doResize();
			break;;
		case WM_CREATE:
			wb.attach(GetHWND());
			EnableWindow(GetHWND(), true);
                        break;
		}

		return DHCtrl::WindowProc(message, wParam, lParam);
	}


Now we have to fix those Heap leaks and we have one quite useful class... (what a pity that right now, there is no Linux counterpart).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: multi-threading slower than single thread
Next Topic: Exclusion of underline chars in UrlEncode function
Goto Forum:
  


Current Time: Thu Jun 06 07:48:16 CEST 2024

Total time taken to generate the page: 0.01414 seconds