Home > Back-end >  Win32 inside how can can change while drawing to create window size
Win32 inside how can can change while drawing to create window size

Time:09-18

When I was in the drawing, will always be a picture, but when pull the window size, appear problem, the window cannot be widened; Then I thought a method, is to write a single thread, the thread is dedicated to draw, this thread I try on the WM_SIZE, such as the WM_PAINT message, but when I pull the window on the desktop before painting figure has been erased, new pictures, change the window size when I want to keep before painting figure, in the previous figure painting directly, which bosses can guide

CodePudding user response:

Drawing should not be on the thread on the inside, directly in the onpaint, the content of the painting to save up and refresh from the saved data are read out when, can at any time

CodePudding user response:

Personal think the way the SDK pure API writing Windows programs have been out of date, efficiency is too low, it is ok to understand the principle, main is message mechanism,

A graphical user interface (GUI) programming can learn c + + Builder, advanced architecture (and c # drag controls), introduction to more easily,

C + + Builder is a real visual Development tool, c + + Builder can use the mouse to drag controls followed by a "design" set properties of a graphical user interface of the program, using the visual components/controls like "building blocks", built in the form of "wysiwyg" Application interface, which is the name of c + + Builder in the concept of the Builder, in this way, only needs to be written in c + + language business logic code, similar to the text interface programming under DOS, just concentrate on the business logic function, the code is very concise, data input and performance, in a graphical user interface, intuitive, and easy to use, this is RAD (Rapid Application Development, Rapid Application Development),

Book recommendation:
"C + + Builder 6 program design course (second edition)" (such as loyal lu, wen-liang liu/2011-04-01/science press) (dangdang)
"C + + Builder 6 programming examples of fine solution" (Zhao Mingxian), PDF, is a digital version, a scan version, there is also a complete implementation of tetris game,
"Wonderful" c + + Builder 6 programming Wu Yixian (Taiwan), there are a few simple little game, 10 can read later rewrite, is their mastery of the,
"C + + Builder 5 senior programming examples of fine solution" (written by Liu Bin) are larger practical program,

C + + Builder 6.0 several sample program project source code download:






C + + Builder first program (analog chat room) v1.11
C + + Builder analog to digital double clock sample (unfinished) v0.2.1
C + + Builder card game Demo v0.03
C + + Builder of irregular image transparent texture (transparent display bitmap) three methods and simple animation v1.3
Written by c + + Builder "ZEC, arithmetic exercise program" sea starfish scene v0.9.2
C + + Builder simple example phone book Demo v1.11

CodePudding user response:

reference 1/f, Simple, Soft reply:
drawing should not be on the thread on the inside, directly in the onpaint, the content of the painting to save up and refresh from the saved data are read out when painting, anytime

But when I was painting in the WM_PAINT, would have been stuck in the WM_PAINT inside, because I will be a while loop inside the WM_PAINT, will have been painting inside, it was not until the end of the would break out, so I zoom window, or tear the window when the corner of the window I didn't respond to my message

CodePudding user response:

refer to the second floor ooolinux response:
personal think the way the SDK pure API writing Windows programs have been out of date, the efficiency is too low, it is ok to understand the principle, main is message mechanism,

A graphical user interface (GUI) programming can learn c + + Builder, advanced architecture (and c # drag controls), introduction to more easily,

C + + Builder is a real visual Development tool, c + + Builder can use the mouse to drag controls followed by a "design" set properties of a graphical user interface of the program, using the visual components/controls like "building blocks", built in the form of "wysiwyg" Application interface, which is the name of c + + Builder in the concept of the Builder, in this way, only needs to be written in c + + language business logic code, similar to the text interface programming under DOS, just concentrate on the business logic function, the code is very concise, data input and performance, in a graphical user interface, intuitive, and easy to use, this is RAD (Rapid Application Development, Rapid Application Development),

Book recommendation:
"C + + Builder 6 program design course (second edition)" (such as loyal lu, wen-liang liu/2011-04-01/science press) (dangdang)
"C + + Builder 6 programming examples of fine solution" (Zhao Mingxian), PDF, is a digital version, a scan version, there is also a complete implementation of tetris game,
"Wonderful" c + + Builder 6 programming Wu Yixian (Taiwan), there are a few simple little game, 10 can read later rewrite, is their mastery of the,
"C + + Builder 5 senior programming examples of fine solution" (written by Liu Bin) are larger practical program,

C + + Builder 6.0 several sample program project source code download:






C + + Builder first program (analog chat room) v1.11
C + + Builder analog to digital double clock sample (unfinished) v0.2.1
C + + Builder card game Demo v0.03
C + + Builder of irregular image transparent texture (transparent display bitmap) three methods and simple animation v1.3
Written by c + + Builder "ZEC, arithmetic exercise program" sea starfish scene v0.9.2
C + + Builder simple example phone book Demo v1.11


I now is doing a demo, with Windows API function of my first painting behind the interface, I will refer to the third party libraries duilib paintings

CodePudding user response:

A new version of c + + Builder is RAD Studio can also write android, apple app,
  • Related