Click here to Skip to main content
15,900,725 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRestrict Collapsing items in tree control Pin
Super Hornet6-Apr-07 10:46
Super Hornet6-Apr-07 10:46 
AnswerRe: Restrict Collapsing items in tree control Pin
Michael Dunn6-Apr-07 11:44
sitebuilderMichael Dunn6-Apr-07 11:44 
GeneralRe: Restrict Collapsing items in tree control Pin
Super Hornet7-Apr-07 0:47
Super Hornet7-Apr-07 0:47 
QuestionClass Member Declaration Problem Pin
all_in_flames6-Apr-07 10:18
professionalall_in_flames6-Apr-07 10:18 
AnswerRe: Class Member Declaration Problem Pin
David Crow6-Apr-07 10:45
David Crow6-Apr-07 10:45 
AnswerRe: Class Member Declaration Problem Pin
Michael Dunn6-Apr-07 11:46
sitebuilderMichael Dunn6-Apr-07 11:46 
JokeRe: Class Member Declaration Problem Pin
all_in_flames6-Apr-07 15:08
professionalall_in_flames6-Apr-07 15:08 
QuestionCreateCompatibleBitmap out of memory - capturing 30 images/sec Pin
pnok6-Apr-07 6:37
pnok6-Apr-07 6:37 
Hello.
I am trying to write a program that stores a LOT of bitblits (a lot of images) in memory for later processing. I want to capture some motion on the screen so I'm bitblitting 30 times a second to an array of HBITMAPS. Before blitting I'm doing a CreateCompatibleBitmap on every HBITMAP, but it returns error code 8 ERROR_NOT_ENOUGH_MEMORY when it reaches the 145 element in the HBITMAP array. How can this be?

I'm not trying to display motion, I'm trying to capture motion. Imagine you have a game running; I want to capture 5 minutes of "screenshots", let's say 30 screenshots pr second; 30 bitblits pr second. I want to do some processing on those images - example do some edge detection. I can't do it in real-time because I would have to do the edge detection between each image capture, which delays the next image (we need 30 pr second). And I can't save them on disk since writing 30 bmps pr second is way too slow. So naturally I have to capture all the images in memory, then process them afterwards. Get where I am going?

I don't know if bitblt is the most optimal way of doing this. The game I want to capture from is OpenGL, and I want to capture the game action without hooking anything in the game (so naturally I can't hook the opengl functions and get images directly from the buffers, right?) - Do you know other ways of capturing 30 images per second and storing them than using bitblt etc?

I'm still wondering why windows limits me to a certain amount of HBITMAPS at a time though - My program only uses 1,448kb memory when the 145 HBITMAPS are Created so I'm definitely not out of memory. Perhaps it's a number restriction?

Any help would be greatly appreciated!
AnswerRe: CreateCompatibleBitmap out of memory - capturing 30 images/sec Pin
Mark Salsbery6-Apr-07 6:51
Mark Salsbery6-Apr-07 6:51 
GeneralRe: CreateCompatibleBitmap out of memory - capturing 30 images/sec Pin
led mike6-Apr-07 7:15
led mike6-Apr-07 7:15 
GeneralRe: CreateCompatibleBitmap out of memory - capturing 30 images/sec Pin
Mark Salsbery6-Apr-07 7:21
Mark Salsbery6-Apr-07 7:21 
GeneralRe: CreateCompatibleBitmap out of memory - capturing 30 images/sec Pin
led mike6-Apr-07 7:47
led mike6-Apr-07 7:47 
AnswerRe: CreateCompatibleBitmap out of memory - capturing 30 images/sec Pin
Chris Losinger6-Apr-07 9:33
professionalChris Losinger6-Apr-07 9:33 
QuestionDisplay Series of numbers in an edit box of MFC Pin
SamPrem6-Apr-07 6:05
SamPrem6-Apr-07 6:05 
AnswerRe: Display Series of numbers in an edit box of MFC Pin
houari_id6-Apr-07 6:08
houari_id6-Apr-07 6:08 
AnswerRe: Display Series of numbers in an edit box of MFC Pin
prasad_som6-Apr-07 6:42
prasad_som6-Apr-07 6:42 
AnswerRe: Display Series of numbers in an edit box of MFC Pin
David Crow6-Apr-07 6:44
David Crow6-Apr-07 6:44 
AnswerRe: Display Series of numbers in an edit box of MFC Pin
krmed7-Apr-07 9:14
krmed7-Apr-07 9:14 
QuestionHow to use IMediaSeeking in filter's pin? Pin
houari_id6-Apr-07 5:58
houari_id6-Apr-07 5:58 
AnswerRe: How to use IMediaSeeking in filter's pin? Pin
Mark Salsbery6-Apr-07 7:04
Mark Salsbery6-Apr-07 7:04 
GeneralRe: How to use IMediaSeeking in filter's pin? Pin
houari_id6-Apr-07 10:45
houari_id6-Apr-07 10:45 
GeneralRe: How to use IMediaSeeking in filter's pin? Pin
Mark Salsbery7-Apr-07 6:45
Mark Salsbery7-Apr-07 6:45 
QuestionCHM files Pin
shiraztk6-Apr-07 4:18
shiraztk6-Apr-07 4:18 
QuestionRe: CHM files Pin
David Crow6-Apr-07 4:57
David Crow6-Apr-07 4:57 
AnswerRe: CHM files Pin
Mark Salsbery6-Apr-07 6:37
Mark Salsbery6-Apr-07 6:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.