Announcement

Collapse
No announcement yet.

Common Dialog and DUAL Monitor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Patrice Terrier
    replied
    try centering it on the current location of your program's main window
    It is exactly what I want to do, center it in my program's main window.

    Note: A quick search on Google, shows that this is a knwon issue with MS common dialog and dual monitor.

    Leave a comment:


  • Eric Pearson
    replied
    This has worked well for me...

    Instead of centering the dialog on the desktop, try centering it on the current location of your program's main window. If your program is maximized the popup dialog will be centered on the same monitor. If your program is "restored" (various sizes) the dialog will still be centered logically.

    -- Eric

    Leave a comment:


  • Patrice Terrier
    replied
    The problem is that using either SetWindowPos or MoveWindow doesn't change anything, impossible to change x, y location, however width and height are working just fine...

    Leave a comment:


  • Pierre Bellisle
    replied
    Salut Patrice,

    Did you have a look at those 2 programs?
    Not sure about vista but they do well under XP with dual monitors.
    Last edited by Pierre Bellisle; 21 Sep 2007, 03:52 PM.

    Leave a comment:


  • Edwin Knoppert
    replied
    Hmm, i never center these dialogs, they appear on the same monitor as their owner hWnd.

    Though you mentioned Vista.. i know..

    Leave a comment:


  • Patrice Terrier
    replied
    The problem occures when trying to center common load/save dialog within the size of an application that is shown on the second monitor that could be on the left (negative coordinates) or on the right (positive coordinates) from the main monitor.

    I read an interresting article about using a WH_CBT hook that perhaps could help me to solve this Windows bug.
    http://www.vbaccelerator.com/home/VB...gs/article.asp

    Leave a comment:


  • Edwin Knoppert
    replied
    Is this different for XP?

    I never encountered an issue on XP.
    I don't have access to Vista with multiple monitors at home unf.

    I center my forms based on certain criteria, common dialogs follow fine (as should)

    Leave a comment:


  • Patrice Terrier
    started a topic Common Dialog and DUAL Monitor

    Common Dialog and DUAL Monitor

    Centering common dialog has always been a pain with Windows.

    But trying to do it with DUAL monitor is almost impossible even using a dialog hook procedure, and it is still broken on VISTA.

    Anybody aware of a work around?

    I read that VISTA uses the registry to store info about the common dialog positions there:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComDlg32\CIDSizeMRU

    and the positions are remembered for each application and can be forced to reset by deleting the key associated with the application.
    But I don't want to edit the registry and jump from Charybde to Scylla.

    Am I the only one struggling with this?
Working...
X
😀
🥰
🤢
😎
😡
👍
👎