|
From: Declan McMullen on 21 Apr 2008 14:15 Hey guys, Is it possible to call native windows calls inside wxwidgets? I'm trying to restrict the mouse cursor to my application. Ive tried the following code RECT rcClip; wxPoint point = GetPosition(); wxSize size = GetSize(); rcClip.top = (long)point.x; rcClip.left = (long)point.y; rcClip.bottom = (long)(point.x + size.GetWidth()); rcClip.right = (long)(point.y + size.GetHeight()); ClipCursor(&rcClip); But its having no affect on my program. I'm managed to use com object for text to speech with wxwidgets so I presumed this would work. Has anyone done it before? Any information very much appreciated. -- http://www.computing.dcu.ie/~dmcmullen declan.mcmullen(a)computing.dcu.ie School of Computing Postgrad Bay A
From: Declan McMullen on 21 Apr 2008 14:39 Just spotted the maths were slightly out, fixed now but still not locking the mouse into the frame rcClip.left = (long)(point.x); rcClip.top = (long)(point.y); rcClip.bottom = (long)((point.y) + size.GetHeight()); rcClip.right = (long)((point.x) + size.GetWidth()); On Mon, Apr 21, 2008 at 7:15 PM, Declan McMullen <declan.mcmullen(a)gmail.com> wrote: > Hey guys, > Is it possible to call native windows calls inside wxwidgets? > > I'm trying to restrict the mouse cursor to my application. Ive tried the > following code > > RECT rcClip; > > wxPoint point = GetPosition(); > wxSize size = GetSize(); > > rcClip.top = (long)point.x; > rcClip.left = (long)point.y; > rcClip.bottom = (long)(point.x + size.GetWidth()); > rcClip.right = (long)(point.y + size.GetHeight()); > > ClipCursor(&rcClip); > > But its having no affect on my program. > > I'm managed to use com object for text to speech with wxwidgets so I > presumed this would work. > Has anyone done it before? > > Any information very much appreciated. > > > -- > http://www.computing.dcu.ie/~dmcmullen<http://www.computing.dcu.ie/%7Edmcmullen> > declan.mcmullen(a)computing.dcu.ie > School of Computing > Postgrad Bay A -- http://www.computing.dcu.ie/~dmcmullen declan.mcmullen(a)computing.dcu.ie School of Computing Postgrad Bay A
|
Pages: 1 Prev: wxYield called recursively Next: application not finalizing when top window closes |