Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Mouse and Keyboard help!

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Mouse and Keyboard help!
#3217
Posted by: 2004-01-12 01:12:24
Im very new to wxWindows, and for the past several hours Ive been attempting to figure out how to get the mouse and keyboard functions to work.  Could somebody PLEASE give me an example on how to use them.
Message2. Re: Mouse and Keyboard help!
#3218
Posted by: upCASE 2004-01-12 03:32:55
Hi!
Please be a little bit more specific. Judging from your post I could answer anything.
Maybe include a little describtion of what you want to do or if you get errors, add some code snippets.
If it's all about event handling: Be sure to read the tutorials for starters mentioned on the wxWindows homepage.

upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: Mouse and Keyboard help!
#3219
Posted by: 2004-01-12 10:43:15
Sorry, I was just looking for someone to make an example, or just tell me how to use the moues and keyboard functions.  I already tried deciphering the manual, but I cant figure anything out.  I dont need specific help with A problem, I need help with the topic, for example: where do you put the mouse and keyboard functions (ie m_leftDown)
Message4. Re: Mouse and Keyboard help!
#3221
Posted by: guidance 2004-01-12 11:46:02
Have you checked wx/samples?
Message5. Re: Mouse and Keyboard help!
#3222
Posted by: upCASE 2004-01-12 18:57:30
Hi!
The first of these links may be quite usefull:
http://www.wxwindows.org/docs.htm#tutorials

In fact there are a lot examples on event handling (I guess that's what you want). Follow Guidance advise and browse through the sample sources.

"where do you put the mouse and keyboard functions (ie m_leftDown)"
wxWindows uses event tables to set up event handling functions. If, for example, you derived a class from wxTextCtrl (or anything else) and now want a special event handler for it, you DECLARE_EVENT_TABLE() in the definition and BEGIN_EVENT_TABLE(...,...) event table entries END_EVENT_TABLE() in the source. Your event handling functions are normally a part of your class.
That's about everything I could say on this now.

What do you mean by mouse/keyboard functions??
What is m_leftDown? To me this notation looks like a member variable in one of your classes storing, let's say, a bool that's true when the left button was clicked. So you have something in mind you want to do, right? Explain it and we'll be happy to answer with a short example.
But I'm not willing to explain the whole event handling system to you, because this has allready been done. Check the manual, especially the section on event handling, and have a look at the link I posted. The first tutorial is really good as a start.

upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message6. Re: Mouse and Keyboard help!
#3230
Posted by: 2004-01-14 00:03:43
Thanks a lot for your help, sorry for the vague-ness.  I finally got it figured out, with your help.  And guidance, I couldn't find "wxsamples," it may have to do with the fact that I just dled the Dev-Package.
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0