[Win32] How to render on a window while it is in idle?

kwikc 131 Reputation points
2021-11-04T21:58:16.683+00:00

That window is in idle here means the window received WM_ENTERIDLE message, like after Alt key was pressed then released.

[Edited]
The rendering is to use DirectX to draw on HWND. While holding on the title bar of the window, all animations were paused.

[Edited]
It is under Windows 7.

Thanks a lot.

Kwik C.

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,422 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,527 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Xiaopo Yang - MSFT 11,496 Reputation points Microsoft Vendor
    2021-11-05T06:55:23.377+00:00

    I have reproduced the behavior with directx sdk Collision sample. It seems the Pause behavior is normal. DXUTPause traces the behavior.

    1 person found this answer helpful.
    0 comments No comments

  2. RLWA32 40,286 Reputation points
    2021-11-05T07:23:35.957+00:00

    When clicking on the window caption and holding the mouse button down Windows enters a modal loop for window dragging. The system's modal loop will dispatch messages but your message loop is not called. Consequently, any code for DirectX drawing that it contains will not be executed. Windows also enters a modal loop for menu processing.

    1 person found this answer helpful.
    0 comments No comments