473,394 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

how to draw somthing (e.g. a line or pixel) on a dialog box?

I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot

May 6 '07 #1
18 3487
sadegh wrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
You'd be better of asking in a VC group.

--
Ian Collins.
May 6 '07 #2
sadegh skrev:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
Access the Windows SDK Documentation and read about the GDI.

--
OU
May 6 '07 #3
On May 6, 11:20 am, sadegh <sadegh...@yahoo.comwrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
Get the DC of the dialog then draw.

--
Generic Window Handler - easy dialogs & MDI - no MFC
www.beotel.net/~gwh

May 6 '07 #4
On May 6, 3:56 pm, aleksa <aleks...@gmail.comwrote:
On May 6, 11:20 am, sadegh <sadegh...@yahoo.comwrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot

Get the DC of the dialog then draw.
Could you please tell me what should I do to get the DC of the Dialog?
for example I have a button on the dialog and I want to show a line on
the Dialog by clicking on the button.

May 6 '07 #5
"sadegh" <sa*******@yahoo.comwrote in message
news:11*********************@h2g2000hsg.googlegrou ps.com...
On May 6, 3:56 pm, aleksa <aleks...@gmail.comwrote:
>On May 6, 11:20 am, sadegh <sadegh...@yahoo.comwrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot

Get the DC of the dialog then draw.

Could you please tell me what should I do to get the DC of the Dialog?
for example I have a button on the dialog and I want to show a line on
the Dialog by clicking on the button.
Please, this question is off topic for this newsgroup. This newsgroup deals
with the standard C++, not extentions (linux, windows, etc...). Please ask
in a windows newsgroup
May 6 '07 #6
sadegh wrote:
On May 6, 3:56 pm, aleksa <aleks...@gmail.comwrote:
On May 6, 11:20 am, sadegh <sadegh...@yahoo.comwrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
Get the DC of the dialog then draw.

Could you please tell me what should I do to get the DC of the Dialog?
for example I have a button on the dialog and I want to show a line on
the Dialog by clicking on the button.
You are off-topic in this newsgroup. Go find the correct one.


Brian
May 6 '07 #7
aleksa wrote:
On May 6, 11:20 am, sadegh <sadegh...@yahoo.comwrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot

Get the DC of the dialog then draw.
Stop giving out off-topic advice.


Brian
May 6 '07 #8
On May 6, 11:51 am, Ian Collins <ian-n...@hotmail.comwrote:
sadegh wrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
You'd be better of asking in a VC group.
One comment that might be vaguely on topic here: he'd also be
better off getting a more recent version of VC++. VC++ 6 is
close to ten years old, and the language has changed
considerably since then.

--
James Kanze (Gabi Software) email: ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

May 6 '07 #9
James Kanze wrote:
On May 6, 11:51 am, Ian Collins <ian-n...@hotmail.comwrote:
>sadegh wrote:
>>I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
>You'd be better of asking in a VC group.

One comment that might be vaguely on topic here: he'd also be
better off getting a more recent version of VC++. VC++ 6 is
close to ten years old, and the language has changed
considerably since then.
It's strange isn't it? Most platform vendors now have a free version of
their latest tools, but people still use the old ones.

--
Ian Collins.
May 6 '07 #10
On Mon, 07 May 2007 09:32:02 +1200, Ian Collins wrote:
James Kanze wrote:
>On May 6, 11:51 am, Ian Collins <ian-n...@hotmail.comwrote:
>>sadegh wrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
>>You'd be better of asking in a VC group.

One comment that might be vaguely on topic here: he'd also be better
off getting a more recent version of VC++. VC++ 6 is close to ten
years old, and the language has changed considerably since then.
It's strange isn't it? Most platform vendors now have a free version of
their latest tools, but people still use the old ones.
Not so strange really.

Since Microsoft's free compiler version comes with optimisation disabled
it is unusable for anything except toy projects.

Also VC++ 7.0 which was VC++ 6 with a different GUI was current until
2003.

--
Markus
May 6 '07 #11
Ian Collins wrote:
James Kanze wrote:
On May 6, 11:51 am, Ian Collins <ian-n...@hotmail.comwrote:
sadegh wrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
You'd be better of asking in a VC group.
One comment that might be vaguely on topic here: he'd also be
better off getting a more recent version of VC++. VC++ 6 is
close to ten years old, and the language has changed
considerably since then.
It's strange isn't it? Most platform vendors now have a free version
of their latest tools, but people still use the old ones.
It's still our Windows development platform at work, because everything
we use has to be certified by our internal tools group. It has
problems, but those are known and documented.

Brian
May 6 '07 #12
Default User wrote:
Ian Collins wrote:
>James Kanze wrote:
>>On May 6, 11:51 am, Ian Collins <ian-n...@hotmail.comwrote:
sadegh wrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
You'd be better of asking in a VC group.
One comment that might be vaguely on topic here: he'd also be
better off getting a more recent version of VC++. VC++ 6 is
close to ten years old, and the language has changed
considerably since then.
It's strange isn't it? Most platform vendors now have a free version
of their latest tools, but people still use the old ones.

It's still our Windows development platform at work, because everything
we use has to be certified by our internal tools group. It has
problems, but those are known and documented.
Also, some third party toolsets only work with VC6 (stupid MODSIM tookits).
May 6 '07 #13
Markus Schoder wrote:
On Mon, 07 May 2007 09:32:02 +1200, Ian Collins wrote:
>James Kanze wrote:
>>On May 6, 11:51 am, Ian Collins <ian-n...@hotmail.comwrote:
sadegh wrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
You'd be better of asking in a VC group.
One comment that might be vaguely on topic here: he'd also be better
off getting a more recent version of VC++. VC++ 6 is close to ten
years old, and the language has changed considerably since then.
It's strange isn't it? Most platform vendors now have a free version of
their latest tools, but people still use the old ones.

Not so strange really.

Since Microsoft's free compiler version comes with optimisation disabled
it is unusable for anything except toy projects.
Ah, I didn't know that, typical of them I suppose.

--
Ian Collins.
May 7 '07 #14
On May 6, 11:32 pm, Ian Collins <ian-n...@hotmail.comwrote:
James Kanze wrote:
On May 6, 11:51 am, Ian Collins <ian-n...@hotmail.comwrote:
sadegh wrote:
I am using VC++6. I want to draw some simple shapes (e.g. line,
circle, pixel) on a dialog box. How can I do this? Thanks a lot
You'd be better of asking in a VC group.
One comment that might be vaguely on topic here: he'd also be
better off getting a more recent version of VC++. VC++ 6 is
close to ten years old, and the language has changed
considerably since then.
It's strange isn't it? Most platform vendors now have a free version of
their latest tools, but people still use the old ones.
I've often wondered about that myself. I don't think you should
rush to always use the latest version, and you generally
shouldn't switch versions in the middle of a project. But 10
years is a long time in this industry; in that length of time,
either the vendor has come out with something that really is
better, and justifies the switch, or he's got no future in the
industry.

--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

May 7 '07 #15
On 7 Maj, 00:10, Markus Schoder <a3vr6dsg-use...@yahoo.dewrote:
On Mon, 07 May 2007 09:32:02 +1200, Ian Collins wrote:
[snip]
It's strange isn't it? Most platform vendors now have a free version of
their latest tools, but people still use the old ones.

Not so strange really.

Since Microsoft's free compiler version comes with optimisation disabled
it is unusable for anything except toy projects.
No - that is incorrect. You have the same optimiser in the free
edition as in the "professional" one. What you don't get is stuff like
profile guided optimisation (PGO).

/Peter

May 7 '07 #16
On Mon, 07 May 2007 05:58:42 -0700, peter koch wrote:
On 7 Maj, 00:10, Markus Schoder <a3vr6dsg-use...@yahoo.dewrote:
>On Mon, 07 May 2007 09:32:02 +1200, Ian Collins wrote:
[snip]
It's strange isn't it? Most platform vendors now have a free version
of their latest tools, but people still use the old ones.

Not so strange really.

Since Microsoft's free compiler version comes with optimisation
disabled it is unusable for anything except toy projects.

No - that is incorrect. You have the same optimiser in the free edition
as in the "professional" one. What you don't get is stuff like profile
guided optimisation (PGO).
That was an older version I was thinking about which had no optimization
-- .NET Standard or something like that. It was also not free but much
cheaper than the optimizing version.

Instead Microsoft seems to now not include MFC and ATL with the current
free version.

--
Markus
May 7 '07 #17
Markus Schoder wrote:

That was an older version I was thinking about which had no
optimization -- .NET Standard or something like that. It was also not
free but much cheaper than the optimizing version.

Instead Microsoft seems to now not include MFC and ATL with the
current free version.

Ah. So they improved it.


Brian
May 7 '07 #18
"Markus Schoder" <a3*************@yahoo.deha scritto nel messaggio
news:pa*********************@yahoo.de...

Instead Microsoft seems to now not include MFC and ATL with the
current free version.
In order to develop native Win32 applications with Visual C++ Express, you
have to download and install (separately) the Platform SDK, which instead is
already included with the full Visual Studio.
Massimo

May 7 '07 #19

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Rolf Brauser | last post by:
Hello, is it possible to draw a one pixel line around every cell in a table? with "border: 1px solid; " just the outer tableborder ist concerned ? thanks for any help rolf
6
by: R | last post by:
Hello everybody! I'm newbie to JavaScript and I have a basic question. I have X and Y coordinates of A and B points. How can I draw a line connecting A and B? thanks in advance cheers
5
by: Matt | last post by:
I am writing a recursive program to draw the lines recursively, given the range and number of intervals (n) between the range. The problem is I don't know how to draw the line in point 0.375, as...
3
by: ClearWater | last post by:
Please explain in detail include needed code.
1
by: John | last post by:
How can I draw single 1x1 pixel "dot" in window? Not a line, I really mean "dot".
1
by: Pat Keel | last post by:
Hi there, I'm looking for a solution to draw a one pixel sized point to a graphics control. E.g. DrawLine(10,10, 11,11) draws 2 pixels, DrawLine(10,10, 10,10) has no effect. How to do? Thanks...
4
by: Jason Huang | last post by:
Hi, In my C# Windows Form, how do I draw a Line? Thanks for help. Jason
1
by: Sonic | last post by:
I want draw a line for saperate form, how do i do? thx
2
by: cty0000 | last post by:
I need to draw only 1 pixel but I can not found out the way... I tried to use like following in some function (point1 is Point instance) Graphics gB = Graphics.FromImage(gBmp); ...
2
complete
by: complete | last post by:
How do you draw a line on a canvas in WPF that is 1 pixel thick? This is the method I am using for drawing a line on a canvas in WPF that uses the line class set to 1 pixel thick but it actually...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.