Dialog in Frame: Buttons disabled

This is a discussion on Dialog in Frame: Buttons disabled within the Windows Programming forums, part of the Platform Specific Boards category; Bassically I have a MFC app in which I have a MainFrame with a childWindow being a dialog. My problem ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,659
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    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, 05: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, 04: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21