Home > database > Pb use advanced GUI interface screen problem
Pb use advanced GUI interface screen problem
Time:10-09
I application framework for the advanced GUI, the earlier, the occasional users reflect the problem, there will be flowers screen I originally has been considered to be use too much memory, or leak, later also ruled out the two problems, also the memory DLL using optimized, and the monitoring results, proved to be no leak, but occasionally there are flowers or screen now, flowers screen when the memory is not very high, now, my theory is that my program have to interact with the DLL, have to interact with HTTP, in the case of frequent interaction with external resources, existing interface changing again at the same time, the GUI has been redrawn, each process is out of sync, redrawn interface out of the problem, I want to consult everybody: 1, whether redraw problems 2, what method can avoid this kind of problem
CodePudding user response:
Is indeed a memory leak and re-paint bug, the framework, the early works from kodiga mainly is the canvas. The PBD buggy, originally implemented, is to use pbni overloading on a series of drawing functions such as paint, inside the redirection of the paint in the message, the source code after getdc did not release, kodiga have the original canvas. The PBX code, but I can't find it, but you can make a replace, canvas code is overloaded each paint, including ncpaint, nccalcsize etc., in the absence of any code, directional, don't draw the background and the message is very simple