divyang4481 / firebreath

Automatically exported from code.google.com/p/firebreath
0 stars 0 forks source link

IE ActiveX will reset window size to (0,0) during WM_MOUSEACTIVATE #106

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Change control size in javascript 
2. Click anywhere on the control 
3. Control window size is changed to (0,0) (disappeared)

What version of FireBreath are you using? On what operating system and
browsers?
Latest 2010.11.10(default branch), Windows 7, IE 6/7/8. (Firefox and chrome are 
fine)

Please provide any additional information below.
----------------------------
Using SPY++, it is easy to fix this issue by overriding the default window 
handler like below:

case WM_MOUSEACTIVATE:

            // Fixed by LiXizhi, 2010.11.15. This will prevent Window resizing of (0,0) to occur (I am not sure why, but since the latest release. 
            // WM_WINDOWPOSCHANGING is always called during each WM_MOUSEACTIVATE under IE. Chrome and Firefox does not have this problem.  

            lRes = DefWindowProc(hWnd,uMsg, wParam, lParamm);
            return true;
---------------------

The cause of the problem is that: you are using the old  winproc to process the 
WM_MOUSEACTIVATE msg, where the default ATL activeX window implemenation will 
reset window size during WM_MOUSEACTIVATE. A fix will be let the 
DefWindowProc() to process it instead of the old winproc(which you have 
replaced)

-----------------

Thanks,
Xizhi,

Original issue reported on code.google.com by xizhi...@gmail.com on 16 Nov 2010 at 3:31

GoogleCodeExporter commented 8 years ago
Ahh!  This explains another issue we have seen.  thank you for not only 
reporting this, but supplying a fix!  I've been dreading trying to track this 
one down myself.

I'll make sure this goes into 1.3.1.

Original comment by taxilian on 16 Nov 2010 at 4:15

GoogleCodeExporter commented 8 years ago
Fixed in 1.3.1

Original comment by taxilian on 20 Nov 2010 at 12:27