Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Comments
Abhishek Pant 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 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 23-Jan-13 23:42pm    
I agree with your answer,+5
Sergey Alexandrovich Kryukov 23-Jan-13 23:52pm    
Thank you so much, Abhishek.
—SA

1 solution

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
 
Share this answer
 
v2
Comments
iampradeepsharma 24-Jan-13 9:28am    
thanks SA
Sergey Alexandrovich Kryukov 24-Jan-13 12:41pm    
You are welcome.
Good luck, call again.
—SA
iampradeepsharma 25-Jan-13 1:26am    
:-)

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900