Win32 Programming Why Register Window Classes? What exactly does the registration window class do?

Updated on technology 2024-08-07
9 answers
  1. Anonymous users2024-02-15

    After registering a window class, a set of windowproc will be used for the same type of window. There is a uniform behavior.

    You don't have to do it once for every window in the future.

    After we construct a window class structure, we need to add this class structure pointer to the System Atom Table (i.e., sat), so that the system can find the user-defined window class by looking up this table, and the window predefined window class pointer is also in the sat. SAT actually implements a kind of mapping for queries, and the ATOM actual type is short, i.e. 16-bit data. Only the system can access the table directly, but when you call some API functions, such as RegisterClass, you can tell the system to access the table.

    Of course, there are also local and global atomic tables, which are directly accessible to the application.

  2. Anonymous users2024-02-14

    Mainly for message handling functions.

    Let's start by looking at the structure of the message.

    typedef struct _msg(

    hwnd hwnd;

    uint message;

    wparam lparam;

    lparam lparam;

    void* pdata;

    msg;When the main thread obtains the message from the message queue, it will get a window pointer according to the handle (hwnd), which points to a node of the window tree (the system will represent all windows with a tree linked list), this node contains the information of the window (how the class name of the window), and the system will maintain a hash table, which is to find the corresponding message processing function pointer for each window class. The system then executes this message handler for that window.

  3. Anonymous users2024-02-13

    It's window style. WS (Window Style) is defined in CreateWindow.

  4. Anonymous users2024-02-12

    In general, relatively large applications are jointly completed in several languages, such as VB design interface, C C++ core part, database with SQL server, etc., different languages have different emphasis, VB's drag and drop is very convenient, and has good support for multi**, but VB does not have C C's execution efficiency, especially C language, it is process-oriented, and involves address operations and hardware interfaces. They all have different emphasis on the division of labor, but that doesn't mean they can't do anything else, it's just that it's not a specialty.

    Storm Video can be achieved with its practical VB or Delphi, but the key is the "stream" decoding algorithm, which solves the rest and is easy to do.

    The key to Super Bunny is the API function of Windows, and the key to modifying and "optimizing" Windows is API.

  5. Anonymous users2024-02-11

    In each version of VC or VS, create a new win32 non-console non-empty project is what you want.

  6. Anonymous users2024-02-10

    Today I copied a paragraph of Bi Ruined Stove to get the ** of the left click double-click, but there was no response. After a long time, I found the reason that win32 does not respond to wm lbuttondblclk, and provides a workaround:

    The form does not respond to the WM Lbuttondblclk message, just add the CS dblclks style to the style member of the wndclass when registering the window class.

    But I don't know how to register the window class...

    Find some functions public declare function registerclass lib"user32" alias "registerclassa" (class as long) as long

    I don't know how to use it. Solving! My current afterglow form name is form1

  7. Anonymous users2024-02-09

    I regret the technical route you have chosen.

    Now that you've read these books and want to move on, why do you have to struggle with Microsoft's tech circles? If you think about it, is it a master who can use VC to make a few MFC interface programs?

    For example, you can start reading books like "Linux Programming" and "Advanced Programming in UNIX Environment", as well as Hou Jie's "STL Source Code Analysis" and CMU's "In-depth Understanding of Computer Systems", these books can let you understand a lot of the essence of programming, so that you have the ability to solve problems in depth, these are the right way to learn programming.

    Next, you can read "UNIX Network Programming" and "Introduction to Algorithms", as well as books such as "Design Patterns in Simple Terms" and "Agile Software Development", in short, try to broaden your technical horizons.

    Now that you're proficient in the previous books, you can take a look at great works like The Art of Computer Programming and The Construction and Interpretation of Computational Programs. I admit that Microsoft is a big software company, but Microsoft's status in the computer programming industry is not high, and it is not yet as good as Shaolin Wudang in the martial arts. Stanford University, CMU, and MIT are the Shaolin Wudang in the computer programming world, and following their technical route is the right direction to enter the hall of masters.

    A lot of the real masters I've seen are T-shaped talents. What is a T-shaped talent, that is, to be very in-depth in a certain aspect, to be able to study and solve essential problems, and at the same time to have certain achievements in many technical aspects.

  8. Anonymous users2024-02-08

    c Data Structure C++ MFC Window Core Programming Driver This is the order in which we learned at that time.

    In the case of databases, learning an Orcal or SQL Server is pretty much the same.

  9. Anonymous users2024-02-07

    Please give me an answer.,Thank you.,I heard that the system is also made up with C.,Why do you feel like Tan Haoqiang's book is the foundation at all.,But the foundation is also the most important.,It's difficult to improve after this foundation is not good.,yxkfbk

Related questions
9 answers2024-08-07

3.Right-click on the folder, add resources, and then select Dialogs to add a dialog. Then the dialog box and toolbar will automatically appear, you can click on the toolbar on the right to click on the desired control (such as a button), then click on the middle dialog box to hold on, and then drag the mouse to "draw" the control on the dialog box. >>>More

3 answers2024-08-07

Register company in India:

Step 1: Legal registration. >>>More

9 answers2024-08-07

There are many advantages to registering a Singapore company, which are as follows: >>>More

23 answers2024-08-07

Programming may gradually develop into a basic skill for ordinary people to master, just like English and computers, children's programming cultivates children's logical thinking and problem-solving skills from an early age, which is good from this point. At the same time, everyone's interests and hobbies are different, if you just look at the current high salary of programmers, it is not necessary to insist on cultivating children in this area, it is best to cultivate some other interests and hobbies of children at the same time.

9 answers2024-08-07

A domain name, abbreviated as a domain name or domain name, is the name of a computer or group of computers on the Internet composed of a string of names separated by dots, which is used to identify the electronic location of the computer during data transmission. >>>More