CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2001
    Location
    ROMANIA
    Posts
    30

    Unhappy problem with the CSingleDocTemplate class.. HELP

    hi !
    i have a problem with the CSingleDocTemplate class..
    in the InitInstance() function, after ProcessShellCommand(...) i do some more processing, but i want to hide the window created after i call ProcessShellCommand(...)
    the problem is that i cannot hide the window (even if i hide it after i call ProcessShellCommand(...) it is still making a flash).i want to hide it, because i need to create it, but after i create i do some more processing that takes some time, and i don't want to see that nasty looking window in background...
    i think that is something in PreCreateWindow, but i'm not sure what style to use, and if that is a solution.
    thanx !

  2. #2
    Join Date
    May 1999
    Location
    ALABAMA, USA
    Posts
    9,917
    Is it nasty looking because you do processing?

    If yes the best guess is that this processing does not allow for window update while idle, since you are in some kind of a loop.

    If you allow idle processing your application will have time to repaint. It is undesirable to hide window since user may think application never started.

    You can use workers thread to process data or use local message loop.

    Search this forum for many examples how to allow idle processing.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

  3. #3
    Join Date
    Dec 2001
    Location
    ROMANIA
    Posts
    30

    solved

    thanx but i already solved the problem...
    i had a splash screen as topmost and in back i have the window exactly the same size as the image
    thanx again !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured