View Full Version : Objective Grid Asserts when Application starts - OnDraw

04-16-2013, 01:25 PM
I have been using Objective Grid for 13 years.

Normally in a Dialog or mfc Doc/View - multi-docs --- but never as main (first) view.

VS2010 on a Win7 computer.
Objective Grid 10.4 --- I have had no need to upgrade from 10.4

I started a new application - mfc - doc/view - single document.

I changed the main View from CView to CGXGridView

When the App starts - from within Apps::InitInstance() - a call is placed to ProcessShellCommand(cmdInfo);

This in turns calls CGXGridView::OnDraw().

Please note .... the View's OnInitialUpdate() has not been called yet.

Objective Grid's code within OnDraw asserts because CGXGridView::OnInitialUpdate() has not yet been called.

It is a pain in DEBUG mode because every time the App starts --- it goes thru the Assert - breaks and complains -- ignore eventually displays the grid and all is well.

Why is ProcessShellCommand() resulting in a call to CGXGridView::OnDraw() when OnInitialUpdate() has yet to be called?

Any insight as how to fix this?

I can always start the App with CView and then flip to a CGXGridView but that is a lot of work just to get around a startup issue.

Any comments are welcomed.