Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / dislpay a large bitmap and getting mouse event

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. dislpay a large bitmap and getting mouse event
#8188
Posted by: 2006-04-28 18:42:44
Hi!

I've got a probleme since many days :

in my app., I trie to display a bitmap taht is larger than the windows diplaying it, so I tried to implement a wxScrolledWindow, in order to have an efficient scroll.

but, now, I can't get the mouse events happening over it...

I've got to know wich kind of click it was, and the coordinates.

my event handler do not acces to event happening in this windows.

this is like it :
------------------------------
class myFrame : wxFrame
------------------------------
and, in void myFrame ::CreateGUIControls(void) {
 MywxScrolledWindow = = new wxScrolledWindow(this, ID_WXSCROLLEDWINDOW1, wxPoint(4,39), wxSize(560,220), wxVSCROLL | wxHSCROLL | wxWS_EX_PROCESS_UI_UPDATES | wxRETAINED );
}
------------------------------
BEGIN_EVENT_TABLE(vncPeuThreadeFrm,wxFrame)

    //pour les clicks souri
    EVT_MOUSE_EVENTS(          vncPeuThreadeFrm::OnMouseChange)

END_EVENT_TABLE()
------------------------------
myFunction OnMouseChange() is called uniquely when I'm not over MywxScrolledWindow .

How could I display a large bitmap and get the event associted to the mouse over it?


thanks :)

ps : I'm french, pliz escuse my bad english...
Message2. Re: dislpay a large bitmap and getting mouse event
#8189
Posted by: 2006-04-28 18:44:34
erf, i mde a mistake, in my code, it's not
MywxScrolledWindow = = new wxScrolledWindow(this, ID_WXSCROLLEDWINDOW1, wxPoint(4,39), wxSize(560,220), wxVSCROLL | wxHSCROLL | wxWS_EX_PROCESS_UI_UPDATES | wxRETAINED );

but
MywxScrolledWindow = new wxScrolledWindow(this, ID_WXSCROLLEDWINDOW1, wxPoint(4,39), wxSize(560,220), wxVSCROLL | wxHSCROLL | wxWS_EX_PROCESS_UI_UPDATES | wxRETAINED );

sorry :'(
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2017-6-23  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0