Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Problems with mouse moving Collapse All
Subject Author Date
Andrew Cochran Jul 20, 2006 - 5:46 AM

>:) I’m in trouble again!

I’ve notice one more problem in my MDI application. When mouse is moving throw it’s window (any place) my CPU is loaded on 100%. I’ve already read topics about Idle in this forum, but none was helpfull.

As I have undestood, I have do insert the following lines into OnCreate function body of CMainFrame class ????

CExtControlBar::g_bEnableOnIdleCalls = true;
CExtGridWnd::g_bEnableOnIdleCalls = true;
CExtPopupBaseWnd::g_bEnableOnIdleCalls = true;
CExtTabWnd::g_bEnableOnIdleCalls = true;

.... But nothing changes :(

Please help! How can I resolve this?






Technical Support Jul 21, 2006 - 4:26 AM

This also depends on how heavy your command updating methods are. Please do the following test: comment out some message map entries for particular command updating method and run your application. This will help you find the bottlenecks. For instance, the CCmdUI::Enable() and CCmdUI::Set() check methods should depend on some flags which are known persistently. You should not perform any heavy actions like database access to enable/disable any command or set its checked state.

Andrew Cochran Jul 21, 2006 - 5:34 AM

I see, but sure that it’s not the reason. The problem is even if you create an empty MDI project using prof-uis application wizard. I’ve done the test you sugested - nothing changed. I’ve done another one, created empty MDI application by wizard - the result is the same.

I’ve noticed once more. If I override the OnIdle method and always return true in it, CPU capacity comes down to about 30%. But problems with MDITabs appear and I know that it’s not solution.

Need help!

Technical Support Jul 24, 2006 - 8:46 AM

We are sorry for the delay with this reply. We spent some time on testing the DRAWCLI sample. This sample is available in MFC and it also comes with Prof-UIS. The plain MFC version uses standard toolbars and built-in menu line in the window non-client area. Of course, it is an MDI project. Actually we do not see any performance differences in both cases. The CPU usage is caused by MFC’s command updating mechanism and does not bring any problems. We had the 100% usage only on old computers with CPU frequency less than 1 GHz.