|
-
Aug 2nd, 2007, 11:07 PM
#1
Thread Starter
Frenzied Member
Passing variable to the WindowProcedure
Without creating global variables, is there a way to pass variables to the WindowProcedure that handles the messages?
For example, if I create a variable and initialize it in WinMain, is there any way to use it in my WindowProcedure?
What I am doing is this. I have a class called Map. I also have a class called Texture and Window.
When I create Texture and Window, certain variables are created such as texWidth, texHeight, windowWidth, and WindowHeight inside of the class.
In my Window Procedure, I need to use those variables held inside of Texture and Window for some function calls.
Is there any way to do this easily? I would really like to keep it simple and try to avoid global variables if possible.
-
Aug 3rd, 2007, 01:33 PM
#2
Addicted Member
Re: Passing variable to the WindowProcedure
yes you can! Like the said to you here, you need to use the last param of CreateWindowEx.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|