Thread: Dialog in Frame: Buttons disabled

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    15

    Dialog in Frame: Buttons disabled

    Bassically I have a MFC app in which I have a MainFrame with a childWindow being a dialog.
    My problem is that buttons on this window are disabled and I can't seem to re-enable them.
    Is the dialog designed to only work fully when you DoModal()? Or should I be able to use it normally as a child to a frame?

    Thanks in advance.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Moved to windows forum, since this is all win32 specific.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

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

    MFC disables any controls without a message handler (entry in the frames(?) MESSAGE_MAP section).

    Are you using a dialogbar (CDialogbar) or CDialog as a base class?




    I also put child dlgs as members of the view. (EDIT: which could be totally the wrong place......)

    Test for a valid (check not NULL) HWND with GetSafeHwnd()
    If valid
    call ShowWindow() to make them visible again.
    else
    call Create()
    "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. Radio Buttons in a dialog box
    By Swarvy in forum Windows Programming
    Replies: 3
    Last Post: 01-02-2009, 06:46 PM
  2. make Child Dialog not Popup?
    By Zeusbwr in forum Windows Programming
    Replies: 5
    Last Post: 04-08-2005, 02:42 PM
  3. Animation not working....
    By aquinn in forum C Programming
    Replies: 7
    Last Post: 02-19-2005, 05:37 AM
  4. Enable/Disable Frame Buttons :: MFC
    By kuphryn in forum Windows Programming
    Replies: 6
    Last Post: 06-24-2002, 08:14 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM