Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Grid for image

Posted on 2004-08-04
6
Medium Priority
?
185 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
Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

 
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 375 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

705 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