hi all i am having a problem mouse move event . i created a control with width 40,0000 .now in mouse move event handler e.x returns value upto 32767 units ,beyond it returns negative values , what to do .actually i am using panel control , as i have to do a lot of drawing on it . say i have to draw rectangles . then i want to move these rectangles , now when i try to move these rectangle in mousemove event by changing the coordinates of rectangles as given by e.X all works fine upto 32767 but afetr tht e.X returns neagtive values , n moving of rectangles halts ,how to handle tht ..
--
amit bharadwaj
VC++(ATL,MFC) developer 2 1806
Amit,
This is just a guess, but maybe casting the result to an unsigned Int16
(ushort) might give you the correct number.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"amit bharadwaj" <am***********@ discussions.mic rosoft.com> wrote in message
news:7E******** *************** ***********@mic rosoft.com... hi all i am having a problem mouse move event . i created a control with width 40,0000 .now in mouse move event handler e.x returns value upto 32767 units ,beyond it returns negative values , what to do .actually i am using panel control , as i have to do a lot of drawing on it . say i have to draw rectangles . then i want to move these rectangles , now when i try to move these rectangle in mousemove event by changing the coordinates of rectangles as given by e.X all works fine upto 32767 but afetr tht e.X returns neagtive values , n moving of rectangles halts ,how to handle tht ..
-- amit bharadwaj VC++(ATL,MFC) developer
Hi amit,
I'm really curious, how do you make a control with size 40,000? The size is
limited to 32767 and this limitation comes, as far as I know, from the
Windows OS itself.
Can you post some sample that creates such a huge control?. Then we might
workout something.
--
Stoitcho Goutsev (100) [C# MVP]
"amit bharadwaj" <am***********@ discussions.mic rosoft.com> wrote in message
news:7E******** *************** ***********@mic rosoft.com... hi all i am having a problem mouse move event . i created a control with width 40,0000 .now in mouse move event handler e.x returns value upto 32767 units ,beyond it returns negative values , what to do .actually i am using panel control , as i have to do a lot of drawing on it . say i have to draw rectangles . then i want to move these rectangles , now when i try to move these rectangle in mousemove event by changing the coordinates of rectangles as given by e.X all works fine upto 32767 but afetr tht e.X returns neagtive values , n moving of rectangles halts ,how to handle tht ..
-- amit bharadwaj VC++(ATL,MFC) developer This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ganesh |
last post by:
hi pals,
I like to know ,how to generate a mouse event through the java program
..
the user should not need to trigger the mouse event.the program should
control the mouse to generate a mouse event.
plz give me a solution........
|
by: amit bharadwaj |
last post by:
hi all i am having a problem mouse move event .
i created a control with width 40,0000 .now in mouse move event handler e.x
returns value upto 32767 units ,beyond it returns negative values , what to
do ..please help
thanks in advance
--
amit bharadwaj
|
by: Bsiang Tan |
last post by:
Hi all,
I have a few PictureBox in my windows form...
The PictureBox mouse event likle MouseLeave work fine..
But the problem occured when I minimize my form into System Tray, and then
restore back to normal windows,
I found ALL the PictureBox's mouse event didn't fire when my mouse enter or
leave the PictureBox..
|
by: MrNobody |
last post by:
Say I want to do a specific action if the user holds down the CTRL key while
clicking something in my UI- how can I determine if this key is currently
pressed within the mouse event?
|
by: scott_gui |
last post by:
I am creating a Windows application:
The mouse event <Double-Button-1> has a conflict when the <Button-1>
event also has a binding. Double clicks will first perform the single
click action. This seems a little silly.
Anyone know how to circumvent this? Right now I am having the function
that is bound to the double click event undo the action the single
click event performs. This is annoying and it flashes the single click
event for a...
| |
by: Ryan Liu |
last post by:
Hi,
I need the MouseDown event be trigged everytime when you press mouse in a
datagrid (System.Windows.Forms).
But seems mouse event will only fire once, and it seems changed to edit mode
for the cell (even the cell is read). The mouse event won't fire again
until I click on some other cell and come back and click on the original
again.
|
by: lechatthierry |
last post by:
Is it possible to block a mouse event on an Hyperlink with a general
script event?
This is quite troublesome for me. I am trying to find a way to block
the windows shortcut SHIFT + MOUSE LEFT BUTTON that open the Hyperlink
in a new window for a Web application. I just want to capture the Shift
click event and prevent it from opening a new page.
Mouse Wheel didn't pose any problems but the other mouse buttons seems
to ignore the...
|
by: Neko |
last post by:
Is it possible to block a mouse event on an Hyperlink with a general
script event?
This is quite troublesome for me. I am trying to find a way to block
the windows shortcut SHIFT + MOUSE LEFT BUTTON that open the Hyperlink
in a new window for a Web application. I just want to capture the Shift
click event and prevent it from opening a new page.
Mouse Wheel didn't pose any problems but the other mouse buttons seems
to ignore the...
|
by: wanwan |
last post by:
I made a game with a window form that needs to record the mouse
position to an array at 100 samples per second, so I use the mouse
move event to do the job.
The problem is the mouse move event is raised by my software at max 30
times per second. I have determined I should use a timer event on
every 10 msec to raise the mouse event, but then I need the same mouse
event that is sent to the mouse move function in the mouse move event
how...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |