visual studio - Repainting image after going to full screen and back in C++/CLI -


i'm building application, paints raw bitmap images on label's hdc using strechdibits.

ptr = g->gethdc(); dc = (hdc)ptr.toint32 (); setstretchbltmode (dc, coloroncolor); stretchdibits (dc, 0, 0, (int) (labelpictureshow->width), (int) (labelpictureshow->height), 0, 0, width, height, data, bitmapinfo, dib_rgb_colors, srccopy);      g->releasehdc (ptr); 

this way draw whole videostream, 1 picture stream after another, works perfect. have function resize form , label on whole screen realizing full screen, wchich works great when playing video.

but, when stop video or send 1 picture , call full scren function. not repaint image , that's problem. tried use paint event, resize event both of form , label painting image again after resizing, nothing works. when fullscreen or normal size, image flashes short moment it's repainted control's color , dissappears. i've tried put painting code stretchdibits everywhere both nothing works. or advice appreciated.

edit:the sad thing me is, when put painting code in, example, click event of label, works fine...

solved using custom paintbox control used in other project. control uses overwritten onpaint method image redrawn. somehow solution works, previous same solution not.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -