Imitation of the message driver mechanism of Windows has been successful

xiaoxiao2021-03-06  42

Imitate the message driver mechanism of Windows, the management window, handle the event with the callback function, has been successful. Now in the UI, the window has been able to deal, activate the focus, loss of focus, etc., and also set the callback function to process the message, the message is completely Windows standard WM message, and the parameters are also two WPARAMs. And LPARAM, of course, news I just used a few few, which saved the time and the usage habits. The parameters are defined by themselves. According to this basic framework, there is no big problem in the UI of the game, and the remaining work is to write the UI control. Because there is only two classes of CFORM and CLabel, I also need CButton, CinputBox, CScrollBar, Clistbox, CMessageBox ..., and more.

Of course, I can first put the attention to the game itself. When the UI control needs it, it is not too late. Let's say that the UI itself is a trouble, with Skin, and N more Coordinate judgment, then handle messages, and so on. These boring things happened to do games, just like class and graduation, cumbersome but can't skip, depressed!

After taking out from the control, take some time to perfect the Csurface class, let it read the JPG file. Use Intel's library, ready-made, very good. Now that the finished product is the final product, it takes time to take a time to make up the file format.

Then, with a few simple controls, I can start doing the rpg map editor. At this time, it is also looking for a beautiful business. When the editor is finished, it will start to find someone to help. Write the script what. Then, the completed port model was completely learned once, starting to do the server / client module section. Finally, it is a packaging of a large amount of data, as well as a server script interpreter, find someone to write scripts ... etc. . .

It seems to see the bright future. .

In fact, the road is still very far ... Many things are very simple. .

Remarks:

1. Take some time to replace the CCursor class with two implementations, one is BMP, one is an ANI. Generally, use an ANI.

2. Look at the article about the reference count, if two windows appear simultaneously, multiple release will have an error.

转载请注明原文地址:https://www.9cbs.com/read-54979.html

New Post(0)