Home > Back-end >  Implementation of the principle of the win32 player
Implementation of the principle of the win32 player

Time:09-18

First of all, I created a HWND of 1024 * 768 size, and then to draw graphics, on the HWND bitmap data read from a file, each drawing bitmap is based on the last on the basis of the painting, so along with the time, the series looks like in the animation, the code and I have achieved good effect, but now I have such a demand: when I was pushing the edge of the window the size of the window has changed, I want to draw the bitmap data changes as the proportion of the window, drag the window size is like a player can freely, and the content is as variable and narrow,

CodePudding user response:

After your Windows bosses to see this post, to help, think it over, thank you

CodePudding user response:

Zooming the inside of the code can be reference function to

CodePudding user response:

The original poster is must use c + + oh, if not, can consider to WPF, good-looking, and also not the problem,

CodePudding user response:

1.
 
//the size of the current
Width0=1024;
Height0=768;
//after the change the size of the
Width1=1400;
Height1=900;
Float fScaleH=width1/width0;//horizontal scaling
Float fScaleV=height1/height0;//vertical scaling

FScaleH ontouch function * and * fScaleV

CodePudding user response:

Why can't use a c + + third-party picture gallery, save trouble is much more than yourself

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
  • Related