Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7619375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:40:19+00:00 2026-05-31T03:40:19+00:00

I have a non-fullscreen DirectX window displaying video, which I for application purposes need

  • 0

I have a non-fullscreen DirectX window displaying video, which I for application purposes need to both move around and sometimes change from hidden/visible programmatically.
When going from hidden to visible the window may sometimes need to be moved to a new position before it is shown.

I hide the window with ShowWindow(hWnd, SW_HIDE).
When I want to show the window again, at a new position, I first move it with SetWindowPos using the new coordinates and SWP_NOREDRAW and SWP_NOZORDER flags (I don’t want to mess with the Z-order).

Then I call ShowWindow(hWnd, SW_SHOW) for the window to appear at the new position. This works fine except for the window briefly appearing at the position where is was last visible before it appears at its new correct position.

I have tried using the alternatives MoveWindow (with repaint-option set to false) and GetWindowPlacement together with SetWindowPlacement (with appropriate flags), buth they give the same result.

How can I force the window to appear at the right position when going from hidden to visible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T03:40:20+00:00Added an answer on May 31, 2026 at 3:40 am

    Turns out the problem was not the fault of either the Windows API or DirectX, but a tricky bug in the way the decoder was handled.
    Placement of the window and its visibility status is based on a values in frame user-data passed through the video decoder. When the decoder stopped receiving input data, happening when the network connection to the encoder was broken, it would also stop giving callbacks for decoded frames, with data still in its “pipeline”. When input data arrived in the decoder again it spit out a few of the “stuck” frames, with user-data which was no longer valid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a way of controlling video non-fullscreen in my application. I've played around
I have a non-visual component which manages other visual controls. I need to have
We have a (non-web app) Spring application that throws a NoSuchBeanDefinitionException when running tests
Should I feel wary about creating clojure keywords which have non-existent namespaces? An example
We need to have non-developers create dozens of input forms with XAML. The best
I have about 100 fields I need to make sure have non-empty values. To
I have a non-fullscreen activity (the system notification bar is visible). In order to
I have a function which returns non-void. On the caller side, I want to
Is it possible to have non-type template parameter which is actually a pointer to
I am trying to find record with names which have non-alpha numeric characters. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.