Hello,
In an MFC application I want to draw a line which should move around after the drawing what can I do?
Thanks,
john
3 4181
Hi,
Very wild guess is you keep invalidating the area where the line is and inside your WM_PAINT handler draw it again at another position. Alternatively you may switch your draw mode, so that when you draw the same line, it is actually erased, and then switch back to normal mode and draw it again at another position.
Once again, just a guess, correct me if I am wrong!
Cheers,
Lini
What do you want the line to do? What is the purpose of the line? You could manually redraw the line at a different location in the OnPaint function. You could also create a new window without a border and form it to the size of the line you want. This would allow you to move the "line" as you would a window. This would also give you the option to allow the user to move around the line.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Remon Huijts |
last post by:
Hi there,
For a very specific service, I have created a PHP script that uses the GD
library functions to create a PNG image from a few lines of XML data
describing a simple diagram/drawing. It's cool and works, writing the XML
data in a text editor is straightforward for me because I designed the
format. I have no idea however how I can make a simple online drawing
program that creates this XML code. The code is realy simple, just...
|
by: Steve Long |
last post by:
Hello, (total GDI newbie)
I'm having trouble drawing just a simple line to display in a picturebox. I
just want a straight, dotdash line.
I have two methods, one works and one doesn't (it cause an exception to be
thrown):
This one works but it's not the results I want.
private void CreateImage1()
{
|
by: Rene |
last post by:
I tried searching the newsgroups to see how do you draw a dotted line but I
was unable to find an answer, drawing a straight line is very easy but not a
dotted one.
So the question is, how do I draw a dotted line?
Thank you.
|
by: Champika Nirosh |
last post by:
Hi,
I want to create drawing board application that can draw Line, rectagle,
circle and free hand drawing.
Each drawing need to be transparent, moveable (draggable), have bring to
front and send to back feature etc.
How can I do this .. where should I start?
|
by: Galaxia |
last post by:
Hi,
I'm using C# in VS .Net 2003. How can I build movable toolbars as that in VS IDE, dragging and arranging them? More, how can the moveable toolbar be put into the same line of Menu, as that in IE.
Can anyone introduce some articles or source codes? Thanks.
--
"Forward Galaxia"
| |
by: davetelling |
last post by:
I am not a programmer, I'm an engineer trying to make an interface to a
product I'm designing. I have used C# to make a form that interrogates the
unit via the serial port and receives the data. I want to be able to draw
lines in a picturebox based upon certain data points I have received. I
dragged a picturebox from the toolbar onto my form, but after having gone
through the help files, looking online and trying a variety of things, I...
|
by: ll |
last post by:
Hi,
I'm currently working with a 'classic ASP' intranet site which uses a
SQL server and am looking for possible ways to market it as an
application for certain medical fields. Where would be a good place
to start with this?
Thanks for any help,
Louis
|
by: olseni |
last post by:
Hi,
i am trying to make a report which consists of many subreports, and I need to make the subreports moveable and not show when the subreport has no data.
I use an event procedure in the 'On no data' property:
Private Sub Report_NoData(Cancel As Integer)
Cancel = True
End Sub
but when i try to set the 'moveable' property on the subreport, I can select 'yes' but it pops back to 'No' and i cannot change that....
Do you...
|
by: Macias |
last post by:
Hi,
Please help me, how I can make a line drawing on PictureBox similar to
MS paint. I thinking about this: click and hold button, move mouse and
relase button.
I'm trying useing this g.DrawLine(..), but I have a lot of line.
In C++ is a parameter XORPUT, but in C# I can't find it.
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |