Thread: Loading Screen

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    112

    Loading Screen

    Hey, how can I make my loading screen stay in the forground even if you maximize or restore another program after I open my program with the loading screen?

  2. #2
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    Post some code. You're most likely not handling WM_PAINT messages, or not redrawing your loading screen when your application recieves a WM_PAINT message.

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    112
    The code is simple it just opens a dialog. There is no message handling or anything for the dialog cause i just want it to be displayed. All i want to do is keep the dialog in the forground.

  4. #4
    Registered User Dual-Catfish's Avatar
    Join Date
    Sep 2001
    Posts
    802
    You're most likely not handling WM_PAINT messages, or not redrawing your loading screen when your application recieves a WM_PAINT message.
    Yes, I'm quoting myself

    There is no message handling or anything for the dialog cause i just want it to be displayed.
    Well you need to handle WM_PAINT messages if you want your loading screen to be redrawn each time the window needs to be redrawn.

  5. #5
    Registered User
    Join Date
    Mar 2002
    Posts
    112
    ok, but what can I put in the WM_PAINT message to make it stay in the forground?

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Use

    SetWindowPos()

    specify the style

    HWND_TOPMOST
    "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

  7. #7
    Registered User
    Join Date
    Mar 2002
    Posts
    112
    Thanks, I can't seem to find a function to tell me what the window pos is though, so I can leave the window in the same position. You wouldn't happen to know one would you?
    Last edited by pinkcheese; 05-20-2002 at 12:17 AM.

  8. #8
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    use as the flags

    SWP_NOSIZE|SWP_NOMOVE
    "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

  9. #9
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Don't put this in the WM_PAINT.

    Do it on init / create.

    Sorry I did not realise that may be implied by the previous posts.
    "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. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 04:56 PM
  2. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 10:18 PM
  3. i am not able to figure ot the starting point of this
    By youngashish in forum C++ Programming
    Replies: 7
    Last Post: 10-07-2004, 02:41 AM
  4. loading map and rendering to the screen???
    By werdy666 in forum Game Programming
    Replies: 4
    Last Post: 10-26-2002, 03:09 AM
  5. Loading Screen
    By pinkcheese in forum Windows Programming
    Replies: 2
    Last Post: 04-06-2002, 11:48 PM