Solved

Detect Resolution Change

Posted on 2000-05-09
3
332 Views
Last Modified: 2013-11-20
How do I detect when the user changes the color resolution?  I tried WM_DISPLAYCHANGE, but couldn't get it to work.  I also thought WM_SYSCOLORCHANGE might do the trick, but I'm not sure.

Does anybody know what I should use?
0
Comment
Question by:poohbear_68
3 Comments
 
LVL 86

Expert Comment

by:jkr
Comment Utility
Did you try WM_SETTINGSCHANGE?
0
 
LVL 1

Author Comment

by:poohbear_68
Comment Utility
My application doesn't seem to be receiving that message.
0
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
Comment Utility
BEGIN_MESSAGE_MAP(CMyFrameWnd, CFrameWnd)
    ...
    ON_MESSAGE(WM_DISPLAYCHANGE, OnDisplayChange)
    ...
END_MESSAGE_MAP()


LRESULT CMyFrameWnd::OnDisplayChange(WPARAM wParam, LPARAM lParam)
{
    // cBitsPerPixel = wParam;
    // cxScreen = LOWORD(lParam);
    // cyScreen = HIWORD(lParam);

    return CFrameWnd::OnDisplayChange(wParam, lParam);
}
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 47
if loop error 4 76
Best tools for Backup and restore of Wordpress site 6 53
unix example issues 18 44
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now