954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Problem in getting the printers settings

Hi

I was trying the code written in the following URL

http://support.microsoft.com/kb/117565

to get the information about the page size

But when I try to run the program I am getting the following errors:-

`CMyView' has not been declared

`CSize' was not declared in this scope

`CMyView' has not been declared

`BOOL GetPageSize'

`BOOL GetPageSize' previously defined here

`CSize' was not declared in this scope

`nRetVal' was not declared in this scope


These all errors are due to the first line of code

[icode]BOOL CMyView::GetPageSize(CSize &nRetVal)[\icode]

Is there anything I am missing

Kindly advice

Regards
Karan Gupta
|

karang
Light Poster
46 posts since Jul 2008
Reputation Points: 10
Solved Threads: 0
 

Obviously you don't have a class named CMyView , so you cannot use the provided example as is. Instead you could e.g. make the provided example a stand-alone function and use it as such, i.e. simply

BOOL GetPageSize(CSize &nRetVal)
{
    // rest of the example code here ...
}
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You