Re: Modeles dialog box in sdi

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Jack wrote:

I create and show a modeless dialog box in the View::OnInitial function. In
Debug mode everything looks fine but in Release mode the look of the dialog
box seems missing of some details. I display the dialog box at the beginning
of the function and later on there some some processing.
May questions-

Why should be any difference between the modes regarding the look?

If I pass the dialog box code (and the processing code) to a later stage of
the application, say in the OnPaint could that improve something?

Jack:

You mean CView::OnInitialUpdate(), no?

I don't know if this is your problem, or why you see different behavior in debug and release, but the MFC startup code in SDI is rather messed up, IMHO.

For example, I think you will find that in OnInitialUpdate(), AfxGetMainWnd() returns NULL, which can certainly cause assertion failures in some situations. One way to get around this is to do

AfxGetApp()->m_pMainWnd = this;

in your CMainFrame constructor.

Another thing you might try is having CVIew::OnInitialUpdate() post a custom message to the view, and open the modeless dialog in the handler. This would be better than doing it in OnPaint(), IMHO.

David Wilkinson



.



Relevant Pages

  • Re: Modeles dialog box in sdi
    ... Debug mode everything looks fine but in Release mode the look of the ... I display the dialog box at the ... If I pass the dialog box code (and the processing code) to a later stage ... say in the OnPaint could that improve something? ...
    (microsoft.public.vc.mfc)
  • Modeles dialog box in sdi
    ... I create and show a modeless dialog box in the View::OnInitial function. ... Debug mode everything looks fine but in Release mode the look of the dialog ... If I pass the dialog box code (and the processing code) to a later stage of ... say in the OnPaint could that improve something? ...
    (microsoft.public.vc.mfc)
  • Re: Agoracgi v3.3e Cross Site Scripting Vulnerability
    ... the cart_id that showed when the site was in debug mode. ... We are probably going to escape out the javascript display even in debug ... cart used must have been 4.0x as 'stock' version 3.3e did not have the diagnostic code ...
    (Bugtraq)
  • Re: VBA Debug Mode : How to I enter it after executing the nth data row.
    ... Please remind me how do I enter automatically in VBA Debug Mode after ... An alternative is to display a Msgbox when the row count is n and as ...
    (microsoft.public.excel.programming)
  • Re: UPDATE problem
    ... doesn't display any exception. ... David Funez ... Try to run it in debug mode and see what is ...
    (microsoft.public.dotnet.framework.compactframework)