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 » ProperyGrid Loading problem Collapse All
Subject Author Date
Offer Har Nov 10, 2006 - 8:40 AM

Hi,

I have several property grids in my application, and i have noticed that the load time of the application is very long.
Whenever i break in the debugger during the long wait, i see that ProfUI is bussy doing a lot of initializations.

How can this be removed?

Thanks.

Find below a part of the stack when i break the application:

>    ProfUIS262md.dll!CExtPropertyStore::AssertValid() Line 3696    C++
    mfc71d.dll!AfxAssertValidObject(const CObject * pOb=0x03a42920, const char * lpszFileName=0x01b99cb8, int nLine=8621) Line 108    C++
    ProfUIS262md.dll!CExtPropertyGridCtrl::AssertValid() Line 8623    C++
    mfc71d.dll!AfxAssertValidObject(const CObject * pOb=0x039bfdd8, const char * lpszFileName=0x01b99cb8, int nLine=4082) Line 108    C++
    ProfUIS262md.dll!CExtPropertyGridWnd::AssertValid() Line 4084    C++
    ProfUIS262md.dll!CExtPropertyGridWndCategorized::AssertValid() Line 7154    C++
    mfc71d.dll!AfxAssertValidObject(const CObject * pOb=0x03a29cf0, const char * lpszFileName=0x01b85258, int nLine=44326) Line 108    C++
    ProfUIS262md.dll!CExtGridWnd::ExternalDataGet() Line 44327    C++
    ProfUIS262md.dll!CExtGridWnd::ColumnCountGet() Line 44889 + 0xe    C++
    ProfUIS262md.dll!CExtGridWnd::GridCellGet(long nColNo=1, long nRowNo=0, int nColType=0, int nRowType=-1, CRuntimeClass * pInitRTC=0x00000000, bool bAutoFindValue=true, bool bUseColumnDefaultValue=true) Line 45256 + 0x50    C++
    ProfUIS262md.dll!CExtGridWnd::GridCellGetOuterAtTop(long nColNo=1, long nRowNo=0, CRuntimeClass * pInitRTC=0x00000000, bool bAutoFindValue=true, bool bUseColumnDefaultValue=true) Line 44999 + 0x28    C++
    ProfUIS262md.dll!CExtPropertyGridWnd::_DoColumnLayout(const CRect & rcClient={...}) Line 5835 + 0x14    C++
    ProfUIS262md.dll!CExtPropertyGridWnd::_DoColumnLayout() Line 5759 + 0x14    C++
    ProfUIS262md.dll!CExtPropertyGridWnd::OnSize(unsigned int nType=0, int cx=32765, int cy=32765) Line 4115    C++
    mfc71d.dll!CWnd::OnWndMsg(unsigned int message=5, unsigned int wParam=0, long lParam=2147319805, long * pResult=0x0012c5e8) Line 2047    C++
    mfc71d.dll!CWnd::WindowProc(unsigned int message=5, unsigned int wParam=0, long lParam=2147319805) Line 1745 + 0x1e    C++
    ProfUIS262md.dll!CExtPropertyGridWnd::WindowProc(unsigned int message=5, unsigned int wParam=0, long lParam=2147319805) Line 4252    C++
    mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x03a29cf0, HWND__ * hWnd=0x005c1158, unsigned int nMsg=5, unsigned int wParam=0, long lParam=2147319805) Line 241 + 0x1a    C++
    mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x005c1158, unsigned int nMsg=5, unsigned int wParam=0, long lParam=2147319805) Line 389    C++
    mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x005c1158, unsigned int nMsg=5, unsigned int wParam=0, long lParam=2147319805) Line 209 + 0x15    C++

Technical Support Nov 10, 2006 - 11:24 AM

The call stack lists the sequence of calls made by the column alignment algorithm in a property grid window. This algorithm should be invoked only two times for each property grid at startup: first when the property grid is created and second when some property store is displayed in it. This algorithm may be slow only there are too many property items in each grid (e.g. 5000). If it is the case, displaying a splash window could be a good solution. Otherwise, simply analyze how many times the CExtPropertyGridCtrl::OnSize() method is invoked at startup and why the property is resized many times.

Offer Har Nov 27, 2006 - 8:25 AM

Dear support,

I have only two property grids with 20-30 rows in them.
Still this issue is very annoying, and i think that you are grinding something in the initialization phase of the property grids.

Please check it out.

Support - i asked several times already, it is impossible to keep track of old messages in the forum because only 20 or so messages are displayed per page. Please give us a way of displaying more messages/threads per page.

Technical Support Nov 28, 2006 - 12:00 PM

We changed the number of rows in the forum (Flat View) to 50 but we cannot make it customizable now.

Technical Support Nov 27, 2006 - 1:15 PM

To speed up the initialization of the property grid control, please try the following code:

CExtPropertyGridCtrl * pPGC = . . .
CExtPropertyStore * pPS = . . .
            pPGC->SetRedraw( FALSE );
            pPGC->PropertyStoreSet( pPS );
            pPGC->SetRedraw( TRUE );
            pPGC->RedrawWindow( NULL, NULL, RDW_INVALIDATE|RDW_ERASE|RDW_ALL_CHILDREN );
As for the forum, thank you for your suggestion. We will modify the code for the page generation as soon as possible.

Offer Har Nov 27, 2006 - 1:31 PM

It looks as it saves a couple of seconds... thanks.
You made a mistaker in the code it’s RDW_ALLCHILDREN and not RDW_ALL_CHILDREN.