Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Control.Created question

Posted on 2006-11-04
3
Medium Priority
?
177 Views
Last Modified: 2010-04-16
Right now I'm messing around with the DirectX SDK and there is a program in it which it get mouse data.  The question I have has nothing to do with DirectX, but with a part of code I dont seem to understand.  The function below is called from a delagate.

        public void MouseEvent()
        {
            // This is the Mouse event thread.
            // This thread will wait until a
            // Mouse event occurrs, and invoke
            // the delegate on the main thread to
            // grab the current Mouse state and update
            // the UI.
            while(Created)                
            {
                eventFire.WaitOne(-1, false);
               
                try
                {
                    applicationDevice.Poll();
                }
                catch(InputException)
                {
                    continue;
                }
                this.BeginInvoke(new UIDelegate(UpdateUI));
            }
        }

The part I don't understand is the while(Created).  I've done some web searches on it and it's pretty vague.  If this function is executed on  a different thread so what Control is it referring to?  Also, if I were to create a separate mouse class, how would I refer to this control?

Thanks!
0
Comment
Question by:bramsquad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 2000 total points
ID: 17875904
Created property belongs to class where MouseEvent function is placed. If this is Control-derived class, this is Control.Created property. While loops continues pooling while control exists, and exits when control is destroyed.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question