Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 07-01-2005, 03:11 PM   #1
Member (2 bit)
 
Join Date: Jul 2005
Posts: 2
Unhappy Drag and drop of images

hi there this is my first time I post here, Ive taken some courses in C++ and Iam on my own now, but there are still alot of basic issues I need to work on so please do not mind the following question:

Iam working on a chess interface and I have an TBitmap for every stone, when a stone is to be moved it will be dragged onMouseUP I will check if hte new position is valid, if it is the stone will take its new position else it will return to its former position, the problem is that Iam not able to drag the image what I tried is the following :

1- on mouse down record initialX and initialY
2-While dragging change Top and Left of the TBitmap according to the X an Y coordinates of the event handler

3-OnMouseUp check for the validity of hte position of the TBitmap.

Any help please??
shakoush2001 is offline   Reply With Quote
Old 07-01-2005, 03:29 PM   #2
Professional gadfly
 
doctorgonzo's Avatar
 
Join Date: Jan 2002
Location: Minneapolis, MN
Posts: 6,364
Send a message via MSN to doctorgonzo
Knowing nothing else about what you are doing, I will take a shot: when you are dragging, after you change the X and Y coordinates of the TBitmap, you are going to need to redraw the screen to show the updated position of the TBitmap.
doctorgonzo is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:52 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2