problem a, own drawing background is hiding the interface on the original control, in order to solve this problem, but get me hanging silk maxed out.
a, painted a background, and then the area of access to all controls, make it invalid. So the problem was solved, but a new problem came, is the flash screen problem. This problem is caused by overwriting the background and control color. In other words, this scheme is eunuch.
> For this kind of scheme, I just thought, should be OK. But it’s too difficult. I don’t have the ability to do it.
> Set the dialog’s clipChildren property to true. When you draw a window, you cut out the area of the control and copy it back when it is finished. This property is customized for the drawing, so the above problem is solved with just one click. The solution turned out to be so simple.
if draw refresh frequently, this there is no doubt that the splash screen will appear.
Scheme 1, the use of double buffer, no pressure. So every time I draw it, I just paste it on.
2, in painting background brush set for NULL_BRUSH background before you leave. The system could not draw.
3, to draw the background of function (OnEraseBkgnd (pDC) CDC *) content to watch out, with the return true replacement, and then system, there is no way to use the default brush to draw the background. However, the latter two methods solve the flicker, but the interface can be a mess.
using GDI resource summary:
first of all, we all know this law have borrow have also, so when learning c + + so follow this rule, otherwise you will hit a wall.
when using handle with H, for example: the HBITMAP etc, after using DeleteObject remember;
For GDI wrapped classes with C, this is not necessary because the system has already freed them during object destructing. If you leave the system resource handle with the class Detach, then you need to take over the management of the system resource, otherwise the system resource leak will occur.
when using CDC, if the memory DC created after running out also need DeleteDc…..
- Solution of flash screen caused by OpenGL in MFC environment
- Solution of OpenGL window flicker in MFC framework
- The solution of flicker and no refresh caused by OpenGL + MFC
- Solution for error 7 in lineage OS brush
- GPU hardware acceleration related problems, solve flash screen
- Failed to load viewstate.The control tree into which viewstate is being loaded must match the contro…
- Solution of vs program flashback problem
- Screen Overlay Detected
- 0xc0000005: an access conflict occurred while reading location 0x00000020
- Solution for flash back of vs2015 running interface
- Matlab realization of user-defined curve and legend
- Solve the problem that the value in the disabled tag cannot be passed to the server
- Solve the problem of flash back in VS2010
- Common problems of shadow map in OpenGL
- How to solve the problem that lightningchart is completely black
- Link: fatal error lnk1123: failure during conversion to coff: file in
- Tainted canvases may not be exported
- Idle line number setting and linenumbers modification
- Swift fatal error: unexpectedly found nil while unwrapping an Optional value？
- Common problems and basic concept knowledge of OpenGL