Thread: Cant find right Message handle.

  1. #1
    Registered User
    Join Date
    Mar 2008

    Cant find right Message handle.

    I want to display an image right after the dialog is drawn and keep it for like 3 secs (an intro).

    I know how to do everything but i can't find a message that is sent when the MFC dialog is displayed, "NOT" about to display.

    I can show messages and stuff after dialog has been created by calling this->ShowWindow(TRUE); in OnInitDialog(),
    but i cant display an image after the dialof has been displayed untill Return true has been called.

    so, is there a way to display an intro after the dialog has been created?

    so,can any one help xD?

    Help will be appreciated.

  2. #2
    Registered User
    Join Date
    Mar 2008

  3. #3
    Join Date
    Jan 2002
    Windows specific so moved to Window programming.

    Your dialog should get a WM_PAINT/OnPaint message when it needs to be drawn - perhaps initiating your timed image there may be of some use.

    If this is just intended as a 'splash screen' then you'd just generally show it and destroy/hide it once the time interval had elapsed. In this context, starting the display in OnInitDialog would be fine and terminating it in whatever timer you're using (eg WM_TIMER, SetTimer) would be sufficient.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  4. #4
    train spotter
    Join Date
    Aug 2001
    near a computer
    To show a splash/login screen in my apps I intercept the OnCreate() (OnInitDialog() for dialogs).

    Create the splash screen as a popup dialog, show the splash dlg on screen (while hiding the main window) and set a timer (or wait for login).

    When the timer elapses (or login is validated) I destroy the splash screen dlg and show the main window.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 12-18-2007, 02:51 PM
  2. Direct3D problem
    By cboard_member in forum Game Programming
    Replies: 10
    Last Post: 04-09-2006, 03:36 AM
  3. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  4. any way to get or find a window client are handle and capture it?
    By shukisnike in forum Windows Programming
    Replies: 1
    Last Post: 12-21-2005, 06:42 PM