Solved

Grid for image

Posted on 2004-08-04
6
176 Views
Last Modified: 2013-11-20
I need component that work like excel's grid,
which can drag-drop, copy-paste-cut, etc
but the data are not character or number, but images
Actualy, I am going to create small game that the main job is
to arrange the image into correct possition.
0
Comment
Question by:nk2003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11718228
I think you don't need a grid component for that. You will work less if you start your app from zero, because it has a few requirements.
0
 

Author Comment

by:nk2003
ID: 11718281
So how should I do it? Can you guide me?
0
 

Author Comment

by:nk2003
ID: 11718376
Sorry, I forgot to write, that the grids also work for muliple-selection
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 11718410
It is like a puzzle. Will be easy with MFC. But is a long answer.

Start creating an MFC based application, SDI type,  with Doc/view support.
I don't have the details of how you will store your data, but you will need to manage a bidimensional array of CBitmap objects, to draw them on screen, just do it inside your view's OnDraw function with a for (...) loop.
To implement drag-and-drop, just have to intercept WM_LBUTTONDOWN, WM_MOUSEMOVE and WM_LBUTTONUP events.
 
0
 

Author Comment

by:nk2003
ID: 11743270
How to intercept WM_LBUTTONDOWN, WM_MOUSEMOVE and WM_LBUTTONUP events? (because I'm newbie in VC++)
Or maybe you can give me sample program for it? If you can, send it to efsignup@yahoo.com

Is there no component like this?

thanks
0
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 125 total points
ID: 11743319
Ok, once you have created your application succefully, go to ClassWizard (with Ctrl-W), select your "view" class (CSomethingView) in the combobox (top-right of dialog). Then select your view class again in the listbox at the middle-left, to the right will appear many "messages types", select WM_LBUTTONDOWN, etctera, and create a function for everyone pression the "Add function.." button. Finally press "Edit code..." and you will see the code that ClassWizard have created. But as I said you, it is a long question, can't write an entire book here.
 
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
repeatEnd java challenge 42 85
Change owner from userA to server Local Administrators 7 71
only14 challenge 19 84
Path of Workbook 3 86
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question