Refresh rate of directx Window was limited to main screen, but I have a higher rate second screen

崧玮 李 1 Reputation point
2020-11-09T03:31:01.37+00:00

Refresh rate of directx Window was limited to main screen, but I have a higher rate second screen,
I have a 240Hz second screen, and a 60Hz main screen.
and my program is based on C++, using directx to show some high refresh rate graphics.

the window was created by CreateWindowW, and I tryed many different styles, no help to the refresh rate.
Only if I change the 240Hz screen into main screen, the program will correctly show 240Hz graphics.
even I let the directx immediatly exchange the buffer, which means that the GPU send 7000+frames to windows, but the picture still change 60 times per second.
what should I do? If I want the 60Hz screen still be the main Screen, and the program refresh 240Hz correctly?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,613 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.