Click here to Skip to main content
16,017,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want a visual studio c code to get screen(monitor) width and height.Please reply me soon..
Posted

C++
Width  = GetSystemMetrics(SM_CXSCREEN);
Height= GetSystemMetrics(SM_CYSCREEN);
 
Share this answer
 
Comments
sampathbc123 1-Jul-12 1:23am    
Thx for your solution. It works proper.thank u very much
Try the GetDeviceCaps()[^] function.
 
Share this answer
 
Comments
sampathbc123 1-Jul-12 1:24am    
Thank u very much for your solution
See also[^] :)
 
Share this answer
 
Comments
sampathbc123 1-Jul-12 1:24am    
your code was very helpful to me. Thanks a lot for your solution

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