Grid for image

Posted on 2004-08-04
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.
Question by:nk2003
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
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.

Author Comment

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

Author Comment

ID: 11718376
Sorry, I forgot to write, that the grids also work for muliple-selection
Industry Leaders: 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.

Author Comment

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

Is there no component like this?

LVL 55

Accepted Solution

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.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Best tools for Backup and restore of Wordpress site 6 58
java ^ examples 8 75
Sed question 2 140
c++  placing data into a form and an editbox 5 50
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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…
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.

752 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