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

Thread: Keep CDialog in 16:9 Format?

  1. #1
    Join Date
    Jun 2006
    Location
    Germany
    Posts
    103

    Keep CDialog in 16:9 Format?

    Hi,
    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
    Location
    Florida
    Posts
    12,206

    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
    Location
    New York, NY, USA
    Posts
    5,546

    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] - www.FeinSoftware.com
    Convenience and productivity tools for Microsoft Visual Studio:
    FeinViewer - an integrated GDI objects viewer for Visual C++ Debugger, and more...

  4. #4
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,442

    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 CodeGuru survey question.


Featured


HTML5 Development Center