 |
|
|
 |
|
 |
if i want to make a class derived from CSTATIC,which method should i overwrite?who can tell me? I have puzzled for many days, thanks!!
haifeng
|
|
|
|
 |
|
 |
thank you a.riazi for your interesting job
it did help very much .but why the graphic so LOW .
except of grafic realy nice work .
i'm suprised why the guys didn't like it
|
|
|
|
 |
|
 |
_____________
stefan bornuz
|
|
|
|
 |
|
 |
My fault!!
|
|
|
|
 |
|
 |
When I clicked on CDateTimeCtrl drop down arrow it shows
me Month calendar, when I do select date or cancels on
calendar control, focus gets dissappear . Now if I press
tab the focus goes to next subsequent control and when
come back to the same CDateTimeCtrl control th'r tab, it
doesn't get selected.
If anybody of you know the solution please reply me.
Thanks & Regards,
- Vijay
God is Great
|
|
|
|
 |
 | So ...  |  | Anonymous | 19:29 7 Jan '03 |
|
 |
Ok, thats not bad. but you better describe how to write such codes in steps.
|
|
|
|
 |
|
 |
Hi every body!
OK, It's right. I used Jeff's source code in my project but did you know differnce of his source code with mine?
Did you know he wrote code for CView derived class and I changed it to CStatic derived class?
Did you know my source code is an enhanced version of Jeff's? If you change time (Control panel, Data/Time) Jeff's clock dont show time right but my clock chaned at fly and show corrected time!
I wrote a code for beginners to learn how to make a CStatic Derived class and how use CStatic related windows messages. I want to teach beginners how to embedd new CStatic derived controls to their project not to teach how make an analog clock! Understand?
As you saw, I mark this article as Beginner not Advanced!
My GPS Article is part of my professional work not copy & paste other code!
I will add new articles about other Hardware/Software projects like, adding Radio Support to your desktop PC, How to use Data Acqusition Cards like AXIOM Data Acq. card, How to use GPIB interfaces to electronics measurement devices and etc.
Thanks to read this!
A. Riazi
|
|
|
|
 |
|
 |
A. Riazi wrote:
OK, It's right. I used Jeff's source code in my project but did you know differnce of his source code with mine?
Did you know he wrote code for CView derived class and I changed it to CStatic derived class?
Did you know my source code is an enhanced version of Jeff's? If you change time (Control panel, Data/Time) Jeff's clock dont show time right but my clock chaned at fly and show corrected time!
I wrote a code for beginners to learn how to make a CStatic Derived class and how use CStatic related windows messages. I want to teach beginners how to embedd new CStatic derived controls to their project not to teach how make an analog clock! Understand?
As you saw, I mark this article as Beginner not Advanced!
WHY did you not put this explanation in your article?!?! If you had stated that you used Jeff P's code to get to the point decribed in your post, you may have received better scores.
You should have also picked a different title. One that better explains the derivation. 'Analog Clock' makes it sound like you are demonstrating yet another clock which has been done over and over.
You should at least update it to give reference to the published source that you used. Otherwise, in my opinion, the article should be pulled.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
 |
|
 |
Article was updated!
A. Riazi
|
|
|
|
 |
|
 |
I don't accuse you "Copy & Paste". I am saying what I saw in your source code.
I guess Jeff doesn't mind you post his code and "enhance" it. Give him some credit will make everybody happy.
Send you a Rose.
|
|
|
|
 |
|
 |
OK, that was rude, but really.
I wouldn't want to include something so ugly in my project.
And besides, reading the other comments, it looks like you lifted the code without giving due credit.
You could at least have put NUMBERS on the dial!
Too bad there isn't a zero.
Marc
Help! I'm an AI running around in someone's f*cked up universe simulator. Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus Every line of code is a liability - Taka Muraoka
|
|
|
|
 |
|
 |
Your DrawHand() and DrawSecondHand() are exactly same as Jeff's source code.
Programming Windows with MFC, 2nd ed.
Jeff Prospise, 1999. 1-57231-695-0
It's MUST be miracle that 2 different people came up EXACTLY same source code....
Miracle... God save me.....
Y. Huang
void CClock::DrawSecondHand (CDC* pDC, int nLength, int nScale, int nDegrees, COLORREF clrColor)
{
CPoint point[2];
double nRadians = (double) nDegrees * 0.017453292;
point[0].x = (int) (nLength * sin (nRadians));
point[0].y = (int) (nLength * cos (nRadians));
point[1].x = -point[0].x / nScale;
point[1].y = -point[0].y / nScale;
CPen pen (PS_SOLID, 0, clrColor);
CPen* pOldPen = pDC->SelectObject (&pen);
pDC->MoveTo (point[0]);
pDC->LineTo (point[1]);
pDC->SelectObject (pOldPen);
}
void CClock::DrawHand (CDC* pDC, int nLength, int nScale, int nDegrees, COLORREF clrColor)
{
CPoint point[4];
double nRadians = (double) nDegrees * 0.017453292;
point[0].x = (int) (nLength * sin (nRadians));
point[0].y = (int) (nLength * cos (nRadians));
point[2].x = -point[0].x / nScale;
point[2].y = -point[0].y / nScale;
point[1].x = -point[2].y;
point[1].y = point[2].x;
point[3].x = -point[1].x;
point[3].y = -point[1].y;
CPen pen (PS_SOLID, 0, clrColor);
CPen* pOldPen = pDC->SelectObject (&pen);
pDC->MoveTo (point[0]);
pDC->LineTo (point[1]);
pDC->LineTo (point[2]);
pDC->LineTo (point[3]);
pDC->LineTo (point[0]);
pDC->SelectObject (pOldPen);
}
|
|
|
|
 |
|
 |
Not only these 2 methods but also other code.......
|
|
|
|
 |
|
 |
Gasp! There goes my vote ...
Max.
|
|
|
|
 |
|
 |
Yinghsuan Huang wrote:
Your DrawHand() and DrawSecondHand() are exactly same as Jeff's source code.
Programming Windows with MFC, 2nd ed.
Jeff Prospise, 1999. 1-57231-695-0
If he is plagiarizing in this article , it makes me wonder about the source code in his other articles.
Roger Stewart
"I Owe, I Owe, it's off to work I go..."
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
I am NOT saying "this is plagerised," [Ted Ferenc]
The source code has only 2 files. Clock.h and clock.cpp. And the main methods to "Draw Clock Face" (DrawHand() and DrawSecondHand()) are exactly same as Jeff's example.
And some other comments are EXACTLY same as Jeff's.
I am NOT saying "this is plagerised," [Ted Ferenc]. I am saying this is a MIRACLE.
A. Riazi, if I am wrong, please let me know.
|
|
|
|
 |
|
 |
Sorry, I think we are at cross purposes, I was discussing, and giving another example of an article by, I assume the same author, following a previous post, not commenting on this article or your post. If you look at the GPS article, and know anything about RS232 comms you will see what I mean, besides some very interesting code, which if I am generous could be described as "simplistic, just to simply show how it works"!
I do not have Jeff Prosie's book so I can not comment.
|
|
|
|
 |
|
 |
Send you a Rose.
I do like author's "GPS" article since I spent some time for RS232 long time ago. However, author may say smething.....
|
|
|
|
 |