Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Grid for image

Posted on 2004-08-04
6
Medium Priority
?
186 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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

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 …
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.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

971 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