Thread: couldn't remove dialog styles

  1. #1
    Unregistered
    Guest

    couldn't remove dialog styles

    I can add styles to a dialog runtime with GWL_STYLE,GetWindowLong,SetWindowLong APIs. But I couldn't remove dialog styles in the same manner. Can anybody give an example how to do this? I want to remove minimizebox style from a modeless dialog runtime.

  2. #2
    Unregistered
    Guest
    Hey,
    I didn't supposed this is a hard or long question. I'm asking different,
    Code:
    static DWORD oldStyle;
    
    oldStle=GetWindowLong(hwnd,GWL_STYLE);
    SetWindowLong(hwnd,GWL_STYLE,oldStyle|WS_MINIMIZEBOX);
    this is adding styles good. But I'm trying ! operator for removing. What is is the true way?

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    Have you tried the '~' operator?
    "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

  4. #4
    Unregistered
    Guest
    Thank you for give your time. Yes tried it later but did not. Later, I tried a funny thing, means tried minus("-") and this was best Anyway, I was working on changing a dialog style modal <-> nonmodal while initializing for a propertysheet and some different things. Lately, minus can do some but not changing modal etc. styles. Now, I suppose it is impossible. At least, this experiance teach me a different side of minus sign

    Regards

  5. #5
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    modal is not a style and can not be changed.
    "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

  6. #6
    Unregistered
    Guest
    Is it? Peh, you really saved my time. Thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 9
    Last Post: 02-13-2008, 02:59 PM
  2. Remove dialog button border
    By RedZone in forum Windows Programming
    Replies: 4
    Last Post: 08-21-2006, 01:20 PM
  3. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 02:42 PM
  4. Remove Dialog and Replace
    By kybert in forum Windows Programming
    Replies: 0
    Last Post: 09-14-2002, 02:28 PM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM