Thread: always on top style?

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    465

    always on top style?

    im trying to make a button but my program is drawing to the screen and the button is getting erased. i know its being created because i turned off the program code and the button is there and functioning.

    is there a style with the CreateWindow function that specifies always on top? i looked through the docs and couldnt find one.
    I came up with a cool phrase to put down here, but i forgot it...

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    there is the style for dialogs

    DS_SETFOREGROUND

    but for a control ? The parent dialogs z-order is important not the controls.

    try

    SetWindowPos() and modify the z-order, HWND_TOPMOST will put the dialog on top of ALL other windows even if the focus changes.

    HWND_TOP just puts it there temporarily.

    EDIT::

    I have dialogs covered with a skin (texture) and the controls show thru without need to do anything.
    "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

  3. #3
    mustang benny bennyandthejets's Avatar
    Join Date
    Jul 2002
    Posts
    1,401
    Post your code.
    [email protected]
    Microsoft Visual Studio .NET 2003 Enterprise Architect
    Windows XP Pro

    Code Tags
    Programming FAQ
    Tutorials

  4. #4
    Registered User
    Join Date
    Feb 2002
    Posts
    465
    i got it taken care of.
    I came up with a cool phrase to put down here, but i forgot it...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Button handler
    By Nephiroth in forum Windows Programming
    Replies: 8
    Last Post: 03-12-2006, 06:23 AM
  2. Why only 32x32? (OpenGL) [Please help]
    By Queatrix in forum Game Programming
    Replies: 2
    Last Post: 01-23-2006, 02:39 PM
  3. OpenGL, loading BMP Textures?
    By Zeusbwr in forum Game Programming
    Replies: 12
    Last Post: 12-09-2004, 05:16 PM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  5. Stack functions as arrays instead of node pointers
    By sballew in forum C Programming
    Replies: 8
    Last Post: 12-04-2001, 11:13 AM