Keep CDialog in 16:9 Format?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 4 of 4

Thread: Keep CDialog in 16:9 Format?

  1. #1
    Join Date
    Jun 2006

    Keep CDialog in 16:9 Format?

    i need Help again with my Problem.
    I have a Dialog with a Browser Control and load a Site with a Video, as the Title says, is there any Way to keep a Dialog in the
    Format of 16:9 Format, in eg. if someone change the Width or Height of a Dialog, the Height/Width should be changed to?
    To keep this Format permanent?

    My first try was in a OnSizing(UINT fwSide, LPRECT pRect) Function but this is not the best way, because any Time i want to resize my Dialog it flickers terribly and i know i make it in a wrong way.
    So if someone can help?
    Thanks in advance

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003

    Re: Keep CDialog in 16:9 Format?

    OnSizing seems like the right place. Perhaps you could call SetRedraw(FALSE) on the browser control to prevent flickering.

  3. #3
    Join Date
    Aug 2000
    New York, NY, USA

    Re: Keep CDialog in 16:9 Format?

    OnSizing is more like notification: there is no way to prevent that sizing.
    I would use WM_WINDOWPOSCHANGING message and modify WINDOWPOS structure to maintain aspect ratio.
    Vlad - MS MVP [2007 - 2012] -
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinWindows - replacement windows manager for Visual Studio, and more...

  4. #4
    Arjay's Avatar
    Arjay is online now Moderator / MS MVP Power Poster
    Join Date
    Aug 2004

    Re: Keep CDialog in 16:9 Format?

    Look at the deferwindowpos functions.

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center