|
Hi
Is there any method of drawing circles and points with float values.
I am drawing a series of circles and points on my view. (A scientific application)
I am using SetPixel and Ellipse methods to draw point and circles respectively.
Every thing is working fine, but to the application context when we analyse further that series of holes have to be closer i.e. at one end all holes circumference must overlap and just give a shape like all circles are connected at that point.
Circles are generally one inside other. i.e. bigger outside and then smaller inside.
But it instead of showing holes closer it shows them somewhat wider.
I thought this might be due to holes i am plotting with int values.
Thats why this thought that if holes drawn with float to check whetehr it corrects the problem i am facing.
Sandeep
Leave your mark wherever you go
|
|
|
|
|
Is there a simple way intercept all keyboard messages sent to buttons in my dialog and process them myself? I really don't want any keyboard input in my dialog, and I want the dialog to be able to recieve arrow key presses. Is there a simple way to do this without subclassing each control?
Joel Holdsworth
|
|
|
|
|
Have you looked at OnSysKeyDown() , OnKeyDown() , and OnChar() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yes... Problem is that when my dialog controls have the focus, then they seem to eat all the keyboard messages!
Joel Holdsworth
|
|
|
|
|
I got a simple DOS app. primary school slash hello world slash newb kind of app.
So the thing is, an ofstream opens a file then writes a string, just a word derived from user thru cin >> word; then closes it.
Now I need this file to be reopened later in the loop and writen to again while preserving the old data. Tried outFile.open("filename", ios::ate) to force the file pointer to the eof, but can't make work. I am prety sure that is wrong anyhow.
What is the right way to do it?
Oh, by the way, there must be a way to keep user inputs in some sort of list inside the program code without rellying on ofstreams. Can someone tell me what parts of C++ handles that sort of stuff, just a name would be OK.
Thanks for reading this long ass post!
|
|
|
|
|
How can I view a file with an external viewer from within my application? I know I could use the "system" command, but then I have to give the path to the external viewer, but what when I don't know the path? I mean if my application needs to view a html page I could give a path to netscape or IE, but what if there is not one of them at the system because the user only installed opera? Is there a quick and easy way to access the windows default viewer for the different fileformats? You know if you doubleclick on a file windows starts an application for viewing or editing that fileformat. Is there a command to do that easiely in a VC++ project?
|
|
|
|
|
Have a read of ShellExecute on MSDN. Or do a google for some examples.
Michael
CP Blog [^]
|
|
|
|
|
Thanks a lot! I managed to solve my problem.
|
|
|
|
|
Hello all,
I have a problem figuring out how to start a service more than once at a time.
it seems to be posible, but all my tries to date have failed.
Could anyone help me with this problem?
in advance, thanks
Michael Olsen
|
|
|
|
|
Michael Olsen wrote:
Could anyone help me with this problem?
A Windows service by its very nature can only be run once. You'd have to have a different service name for each instance you want to run.
Why do you want to have multiple instances of a service?
Michael
CP Blog [^]
|
|
|
|
|
Thanks for the reply.
The service is a kind of router, and with multiple instances more customers could be serviced (on diferent ports) without mixing. like acidentialy sending data to another customer.
I had hoped this could be done by starting the same service multiple times listening to different ports.
Michael Olsen
|
|
|
|
|
Michael Olsen wrote:
I had hoped this could be done by starting the same service multiple times listening to different ports.
I'm no expert on this, but I think the "correct" way would be to have one service that has multiple threads. One thread per port.
Michael
CP Blog [^]
|
|
|
|
|
There is a question about the API fuctions,which are CreatePolygonRgn() and PtInregin().
When I used CreatePolygonRgn() to create a closed regin, which is surrounded by any closed curve, and then used PtInregin() to judge the points whether in the closed regin, there is a question arised. the left edge of regin is judged out of then regin,and the right edge is judged in the regin. they are contrary. I want to ask this question whether caused by the CreatePolygonRgn(). SOS ! Waits!
go on,next...
|
|
|
|
|
|
help!
go on,next...
|
|
|
|
|
HI ,
I want ot set Hot keys in my Application .
example as when press Ctrl+P = Play a file method call.
I think use Accelerator here.. is it ..
But how , and where i can trap these keys .
to do action that i want
any sample??
thanx
Regards.
|
|
|
|
|
Yes you use accelerators for this. You set message handlers to accelerator in the same way you set message handlers to menu items.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
i did that but ...........
can u send me any sample ..
thanx
Regards.
|
|
|
|
|
|
I'm creating the CEdit control dynamically using Create() in my dialog.
I need this edit box to use default dialog font, not that ugly big font.
Is this clean way to do this ?
BOOL CMyDialog::OnInitDialog()
{
....
m_myedit.Create(....);
m_myedit.SetFont(GetFont());
...
It is working, and no memory leaks are reported, but I'm unsure about how CFont works - do I need to keep instance of CFont I've used for whole life time of edit box ?
Thank you !
rrrado
|
|
|
|
|
Since the edit box will only live for the lifetime of the dialog then it is perfectly acceptable to do what you have done.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Thank you !
rrrado
|
|
|
|
|
Hi y'all
I really hope there an SQL guru out there, because I'm trying to do one of the simplest SQL queries but no luck
In my MFC-DAO application, I want to lauch this query:
SELECT * FROM Songs WHERE Title LIKE '%D'
And I cannot make it work at all... any other WHERE query works ok, but the LIKE queries just make me crazy...
Any ideas?
Regards
Daniel
|
|
|
|
|
What wildcard does the databasae you are targetting use? I seem to recall that ms-access uses "*" whereas ansi-SQL uses "%"...
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
Danoo wrote:
SELECT * FROM Songs WHERE Title LIKE '%D'
What do you want the statement to return ? This is a valid SQL statement, but I suspect your search string is formatted incorrectly.
If you want to search for all names beginning with "PAL", then you would use:
select * from [mytable] where [field] like 'PAL%'
It might be worth mentioning as well that I'm using ADO to format my queries. I think that DAO, and ACCESS uses '*' instead of '%'. (don't quote me on that though)
I Dream of Absolute Zero
|
|
|
|