Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i have to draw an x-axis and y-axis generated after the user specifying the area width and length ,
then to get all restaurant tables from database and plot them according to their coordinates in data base ..
can anyone help in the drawing of graph and how it can be modified if resizing of main dialog takes place ?

the language is mfc c++
visual studio 2012

being thankfull

What I have tried:

i don't have a lot of experience in drawing and still i didn't reach a satisfiable solution
Posted
Updated 8-May-16 21:16pm
Comments
Richard MacCutchan 7-May-16 8:52am    
You need to show what you have done up to now, and where you are stuck. Drawing using GDI is just the same as using a ruler and pencil. Calculate the dimensions and location of each item that you need to draw, using the information you have been given. If necessary scale your drawings to fit your screen or window size.
Sergey Alexandrovich Kryukov 7-May-16 11:49am    
Read carefully:
What have you tried so far?
—SA

1 solution

You need to understand the draw process: it is a function call in which all your stuff is drawn on a so called device context which you can imagine as piece of paper. It can be the screen or a printer.

For that there a lot of of API-functions and objects in Windows and the MFC.

Here is a fine article which shows the basics of GDI Drawing
.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900