Click here to Skip to main content
11,583,865 members (63,536 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: MFC
hi all ,
I need a clear understanding of device context . I read few articles like on MSDN and some others but none satisfied me .I am not able to figure out what device context is really .
I seek your insights on it .

Thanks
Posted 23-Jan-13 16:47pm
Comments
Abhishek Pant at 23-Jan-13 23:17pm
   
A Device Context (DC) is used to define the attributes of text and images that are output to the screen or printer. The actual context is maintained by GDI. A handle to the Device Context (HDC) is obtained before output is written and then released after elements have been written
Sergey Alexandrovich Kryukov at 23-Jan-13 23:19pm
   
Right, but OP apparently saw that, according to the claims, only this does not "satisfy" OP.
Please see my discussion I provide in my answer. What do you think?
—SA
Abhishek Pant at 23-Jan-13 23:42pm
   
I agree with your answer,+5
Sergey Alexandrovich Kryukov at 23-Jan-13 23:52pm
   
Thank you so much, Abhishek.
—SA

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

In my opinion, the question is incorrect from the practical standpoint. Here is why: it implies that you think that "official documentation" is incomplete or unclear. My opinion is based on my other opinion: I don't think so.

Your question is also based on assumption that the documentation does not "satisfy" you. It means, that you don't blame your education, experience or capability, you blame some "defects" of the documentation. And I must admit, there are many cases when this is the case.

I, for example, can list a number of fields where Microsoft documentation is unclear, incomplete or even misleading. It happens, unfortunately. But usually, my knowledge of such documentation defects, real defects, is based on my research or practical experience, when I see that the behavior or data structure I can proof from, for example, debugging, in incorrectly described by documentation or not described at all. I shared some of such research results in CodeProject posts/articles, as other members did.

So, if you are really not satisfied, you should point out what exactly is unsatisfactory, with references. Everyone could use this information and thank you for that. If you are the person who can take responsibility for your own words. Otherwise you should simply say that you failed to understand certain moments, which would be fully respected by people.

Do you mean this http://msdn.microsoft.com/en-us/library/azz5wt61%28v=vs.110%29.aspx[^]?

If you can explain what part of it is unsatisfactory, you can get some chances to get more help.

Basically, you should think of device context as of some abstraction object which allows for uniform graphic processing for hardware or media with different characteristics or even different physical nature.

—SA
  Permalink  
v2
Comments
iampradeepsharma at 24-Jan-13 9:28am
   
thanks SA
Sergey Alexandrovich Kryukov at 24-Jan-13 12:41pm
   
You are welcome.
Good luck, call again.
—SA
iampradeepsharma at 25-Jan-13 1:26am
   
:-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 440
1 Sergey Alexandrovich Kryukov 310
2 virusstorm 268
3 Richard Deeming 220
4 Dave Kreskowiak 200
0 OriginalGriff 1,623
1 Sergey Alexandrovich Kryukov 1,135
2 Abhinav S 701
3 Dave Kreskowiak 627
4 Suvendu Shekhar Giri 568


Advertise | Privacy | Mobile
Web04 | 2.8.150603.1 | Last Updated 23 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100