Solved

Grid for image

Posted on 2004-08-04
6
169 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
Comment Utility
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
Comment Utility
So how should I do it? Can you guide me?
0
 

Author Comment

by:nk2003
Comment Utility
Sorry, I forgot to write, that the grids also work for muliple-selection
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 55

Expert Comment

by:Jaime Olivares
Comment Utility
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
Comment Utility
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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

728 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now