CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2007
    Posts
    5

    Closing Mainframe window

    Hi,
    My mainframe window has close,mini amd maxi buttons.
    But it does not work.
    I cannot close or minimize the window.
    Whats the reason.
    My Precreatewindow codes like

    BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
    {
    cs.style = WS_POPUP | WS_OVERLAPPED | WS_CAPTION | FWS_ADDTOTITLE
    | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_MAXIMIZE;

    return CMDIFrameWnd::PreCreateWindow(cs);
    }
    Whats the reason?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: Closing Mainframe window

    The code you posted show nothing except the CMainFrame window styles you want to supply by creating it.
    Do you handle some of the WM_SYSCOMMAND options?
    Do you change window style somewhere after window have been created?
    Could you post a small text project demonstrating your problem? (please, post a zip archive but don't insert .ncb, .aps, .opt files nor Debug/Release folders).
    Victor Nijegorodov

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured