|
Ok, I'm drawing the graph in a seperate method like you said. It works! BUT it only works if WM_PAINT is not called. So lets say I have two dialog boxes open. which will most likely occur. If I have the graph dialog box open and then the user selects the other dialog box and moves it over the graph the part of the graph it moved over will be erased. How do I repaint that? I need to somehow get a picture of that area and repaint it.
------------------------
Impossible is Nothing
|
|
|
|
|
deville75 wrote: How do I repaint that? I need to somehow get a picture of that area and repaint it.
You need to repaint it. Draw the rect, fill with white, draw the graph.
See my second reply
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
Also, for redrawing the lines you can store the points in an array and iterate through them
each time they need to be redrawn. Taking a snapshot of the screen doesn't work - what if the
user drags another window across yours? That's why you need to redraw everything every time
(of course you can use clipping to only redraw the portion of the window that needs to be
refreshed as well).
Mark
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
I c.. ok, I'll try keeping an array of the points.. But what is clipping? I'm guessing it checks which part of the window WM_PAINT needs to repaint? How would I be able to retrieve these coordinates?
------------------------
Impossible is Nothing
|
|
|
|
|
I wouldn't worry about clipping yet In your WM_PAINT handler, clipping is setup for you
so I would recommend just getting all your repainting working properly. Then if you have problems
with flicker or something then worry about clipping.
Mark
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
hehe, i c, ok kool,
thanks for the help guys.
------------------------
Impossible is Nothing
|
|
|
|
|
Cool
I made a mistake in my sample code. You probably want to use a client DC instead of a window DC
in OnTimer:
void MyDlgClass::OnTimer(UINT_PTR nIDEvent)
{
CClientDC dc(this);
DrawGraph(dc);
}
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
Sorry about posting MFC code for your Win32 question LOL
Come on caffeine!
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
Mark Salsbery wrote: Taking a snapshot of the screen doesn't work - what if the
user drags another window across yours?
What you can do in fact (and what I do for my chart control) is that everything (axis, grid, and series) is first drawn on a memory bitmap and then the bitmap is blitted on the screen (this avoid also flickering). So, when I need to add a new point, I simply need to draw the new line.
Of course, everything needs to be redrawn when axis change for example.
|
|
|
|
|
Sure, that's a great method IMO I never know how much to give OPs in one shot LOL
Thanks!
Mark
Great job, team. Head back to base for debriefing and cocktails.
|
|
|
|
|
How to run an executable or an application in a particular computer.
Now i m checking with hardware profile id but seems not a unique id.
Is there any unique id to put in my code so that application runs in a computer that matches the ID?
|
|
|
|
|
Are you trying to say that the program is only authorized for certain computers. Is that the functionality you want?
------------------------
Impossible is Nothing
|
|
|
|
|
|
and what criterias must match for a computer to run the application ?
|
|
|
|
|
Lemme tell you the purpose.
Our application has to be mounted into clients system and it is sent through a CD, so there shouldn't be a provision for the client to install in a system which is not authorized.
What needs to be done for providing authorization?
It can be like MAC ADDRESS since it is unique, but if the client system doesn't have NIC then there's no concept of MAC ADDRESS. can you gimme any other solution for this?
|
|
|
|
|
i'd be tempted to use a hash map on the processor ID and some other hardware that you're sure are present...
the principle of the hash map is that on same entry data, it will generate always the same output.
|
|
|
|
|
hash map?? please be clear
|
|
|
|
|
i'm still confused. can you bring an example of what you're trying to do, and for my curiosity, tell why ?
|
|
|
|
|
I want to make my application authorized only for certain computers.
|
|
|
|
|
Super Hornet wrote: I want to make my application authorized only for certain computers.
i can read you 1st post ; you didn't provide much info there.
moreover, you don't answer all my questions
|
|
|
|
|
Super Hornet wrote: Is there any unique id to put in my code so that application runs in a computer that matches the ID?
No.
How could it, given that you can assemble the computer yourself from small silicon board?
What you experience is the problem of all copy protection schemes - and why they do not work.
Additional Hardware - called dongles - might provide the uniqueness you want.
There are several specialized companies.
Failure is not an option - it's built right in.
|
|
|
|
|
Do you want to protect your program with check hardware on other systems?
|
|
|
|
|
|
Its very difficult but see two discusses if they are helpfuls here[^] and here[^]
|
|
|
|
|
How about using the host name
char HostName[128];
gethostname(HostName, sizeof(HostName);
if(strcmp(Hostname,.....)
{
.......
Type "hostname" on the command line to get the comuter host name
|
|
|
|