Drawing pixels in a window in Windows

  • Thread starter chroot
  • Start date
  • #1
chroot
Staff Emeritus
Science Advisor
Gold Member
10,226
34

Main Question or Discussion Point

I need to implement a sort of "framebuffer in a window" for a digital video application I'm working on. I need the window to be displayed alongside other windows (running Windows XP) and get along nicely with other windows on the desktop. The window will display the pixel data in an arbitrary framebuffer. I need the solution to be as efficient as possible, as I'm hoping to display full-motion color standard-resolution TV.

I roughly know the terms "device context" and "overlay," but I'm not sure how to proceed, or even if I'm supposed to be using overlays, or DirectX, or what. MSDN.com provides inspiring glimpses, but I largely cannot make heads or tails of what to do. I know it can be done, because, well, lots of applications do it.

- Warren
 

Answers and Replies

  • #2
97
0
chroot said:
I need the window to be displayed alongside other windows (running Windows XP) and get along nicely with other windows on the desktop.
Create a Win32 or MFC application and the framework will take care of that for you.

chroot said:
I roughly know the terms "device context" and "overlay," but I'm not sure how to proceed, or even if I'm supposed to be using overlays, or DirectX, or what.
Have you considered integrating Windows Media Player into your application? That is the easiest way to accomplish what you want. Otherwise you'll have to write it from scratch and deal with DirectX, OpenGL or some video library.
 
  • #3
chroot
Staff Emeritus
Science Advisor
Gold Member
10,226
34
Wave,

Sorry, but both of those suggestions are very poor, as they do not even approach the efficiency I need. (Think high-end video game efficiency.)

I discovered that the correct way to go about doing this is to use DIB (device independent bitmaps) and blit the bitmaps to the primary surface.

- Warren
 
  • #4
97
0
chroot said:
Wave,

Sorry, but both of those suggestions are very poor, as they do not even approach the efficiency I need. (Think high-end video game efficiency.)

I discovered that the correct way to go about doing this is to use DIB (device independent bitmaps) and blit the bitmaps to the primary surface.

- Warren
I thought you wanted digital video playback. Consider DDB if efficiency is what you're looking for.
 

Related Threads for: Drawing pixels in a window in Windows

  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
2
Views
1K
  • Last Post
Replies
18
Views
5K
  • Last Post
Replies
4
Views
3K
Replies
21
Views
14K
  • Last Post
Replies
9
Views
764
  • Last Post
Replies
8
Views
3K
  • Last Post
Replies
2
Views
2K
Top