Home > Software engineering >  How to insert images or animation in the dialog box, make it become the background of the picture or
How to insert images or animation in the dialog box, make it become the background of the picture or

Time:09-27

Is the dialog background changed

CodePudding user response:

In the dialog box OnPaint, show your photos, or, jia a Cpicture window to display

CodePudding user response:

The simplest is directly draw a Picture static control in your dialog box, choose you want to display a bitmap resources, and then covered the entire dialog box, and then from the above layout button or something, the disadvantage is that the TAB order should do well, or window to redraw might cover the button images,

The normal methods should override onPaint function,

CodePudding user response:

Map in the onPaint directly to stick it out, animation never get,,,

CodePudding user response:

Direct onpaint stick stick stick stickers please

CodePudding user response:

The
reference 3 floor yuhaouestc response:
map in the onPaint directly to stick it out, animation never get,,,

I am a little white, can you tell me how to stick?

CodePudding user response:

reference 4 floor vcttyys response:
direct onpaint stickers post you want to post

Can you tell me how to stick? I am a little white

CodePudding user response:

reference 5 floor qq_38512899 reply:
Quote: refer to the third floor yuhaouestc response:
map in the onPaint directly to stick it out, never get, animation, and

I am a little white, can you tell me how to stick?

You stick to the first figure added to the Bitmap resources, change the ID
Then in the Onpaint function
 void Dlg: : OnPaint () 
{
CPaintDC dc (this);//device context for painting
//TODO: add message handler code here
//no message calls for drawing CDialogEx: : OnPaint ()
CBitmap bitmap.
Bitmap. LoadBitmap (IDB_BITMAP_XXX);//to post pictures of the ID of the

//double buffer map
The CDC comdc;
Comdc. CreateCompatibleDC (& amp; Dc);
Comdc. SelectObject (& amp; Bitmap);
//generated BITMAP
BITMAP bit;
Bitmap. GetBitmap (& amp; Bit);
//client area
CRect rect;
GetClientRect (the rect);
//the DC of the client area are used to draw the generated BITMAP, and adapt to the window size
Dc. StretchBlt (0, 0, the rect. Width (), the rect. Height (), & amp; Comdc, 0, 0, bit bmWidth, bit. BmHeight, SRCCOPY);
}

CodePudding user response:

Diagram need to set a timer, and regularly update the pictures

CodePudding user response:

refer to the second floor sdhexu response:
the simplest is to pull a Picture directly static control in your dialog box, choose you want to display a bitmap resources, and then covered the entire dialog box, and then from the above layout button or something, the disadvantage is that the TAB order should do well, or window to redraw might cover the button images,

Normal method should override onPaint function,

When you use the controls how to improve our order, my pictures covered buttons, please break down!

CodePudding user response:

Dialog box in the onpaint function drawing, the view in ontouch drawing, drawing functions are upstairs, want to animation can be invoked by the timer of different pictures, show come out, first specific flicker problem you check double cache

CodePudding user response:

Sets the position of the canvas, with CBITIMAGE images, a frame of a frame
  • Related