hwnd and variables in them
Hey, (im new to this forum, hi all :) )
I'm quite accustomed with C programming, but rather new to win32 API. Just recently I started learning it, and although I now have good understanding of how window procedures work, the message queue etc etc, some question which answer is hard to find always comes.
The question, is how are you supposed to store variables for windows? Say your program consists of many different windows of the same window class, and users can interact with any of them. Of course this means that those windows will have different "states" (for lack of a better word). How do you store them?
You only have a hwnd (window handle), and if you want multiple windows of the same class, you can't just use a single global variable for it..
Since hwnd is just an integer (or so I think), I could make a table for it which has pointers to some structures and look up the variables through the table, but it would be inefficient, and it would be much better if we can store the variables (or a pointer to the variables) in the HWND.
So yeah, can someone enlighten me? Thanks in advance!