Click here to Skip to main content
15,921,660 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionusing an ADT object [modified] Pin
Spherelin30-Nov-06 22:54
Spherelin30-Nov-06 22:54 
AnswerRe: using an ADT object Pin
Cedric Moonen30-Nov-06 23:12
Cedric Moonen30-Nov-06 23:12 
GeneralRe: using an ADT object Pin
Spherelin30-Nov-06 23:41
Spherelin30-Nov-06 23:41 
QuestionProblems in Client/Server Implementation of an MFC application Pin
Vinod Sankaranarayanan30-Nov-06 22:10
Vinod Sankaranarayanan30-Nov-06 22:10 
AnswerRe: Problems in Client/Server Implementation of an MFC application Pin
Galatei1-Dec-06 0:22
Galatei1-Dec-06 0:22 
QuestionRe: Problems in Client/Server Implementation of an MFC application Pin
Vinod Sankaranarayanan1-Dec-06 1:30
Vinod Sankaranarayanan1-Dec-06 1:30 
QuestionPasting same file version to multiple cells using ORCA Pin
rp_suman30-Nov-06 21:03
rp_suman30-Nov-06 21:03 
Questionhow to get correct ppd file for a given printer? Pin
chandkavi30-Nov-06 20:48
chandkavi30-Nov-06 20:48 
I used the Windows API function GetPrinterDriver() for getting the .ppd file for a specified printer. But for some printers this function is returning a .pdf file instead of .ppd file. can anyone help me to solve this and get a ppd file not pdf file. the following is the code i have written.

Note: In the following code. Only for printer named RIO-219 the Driver Name I am getting is .pdf file , for all others i am getting .ppd files.

void CPrinterDriverInformationDlg::OnBnClickedBtnPrintinfo()
{

// TODO: Add your control notification handler code here
HANDLE hPrinter;
CString strDriverName;
CString strDriverPPDFile;
DWORD dw;
DRIVER_INFO_4* pDriverInfo;
int index = 0;

// The following are the list of printers installed in my system.
const LPWSTR printerTbl[] =
{
L"Rio-219",
L"k2-212",
L"Den-203",
L"gl1010",
L"Hud-224",
NULL
};

while (printerTbl[index] != NULL)
{
if (OpenPrinter(printerTbl[index], &hPrinter, NULL))
{
if (! GetPrinterDriver(hPrinter, NULL, 4, NULL, 0, &dw))
{
BYTE* p = new BYTE[dw];
GetPrinterDriver(hPrinter, NULL, 4, p, dw, &dw);
pDriverInfo = (DRIVER_INFO_4*) p;
strDriverName = pDriverInfo->pName;
strDriverPPDFile = pDriverInfo->pDataFile;
delete [] p;
}

ClosePrinter(hPrinter);
}

++index;
}
}
thank you
QuestionRetrieve URLS of all opened browser Windows? Pin
kiranin30-Nov-06 20:45
kiranin30-Nov-06 20:45 
AnswerRe: Retrieve URLS of all opened browser Windows? Pin
kanduripavan3-Dec-06 2:08
kanduripavan3-Dec-06 2:08 
GeneralRe: Retrieve URLS of all opened browser Windows? Pin
kiranin3-Dec-06 7:06
kiranin3-Dec-06 7:06 
GeneralRe: Retrieve URLS of all opened browser Windows? Pin
kanduripavan3-Dec-06 21:04
kanduripavan3-Dec-06 21:04 
Questionwant the result of child process Pin
Mushtaque Nizamani30-Nov-06 20:36
Mushtaque Nizamani30-Nov-06 20:36 
AnswerRe: want the result of child process Pin
Mike_V30-Nov-06 20:48
Mike_V30-Nov-06 20:48 
GeneralRe: want the result of child process Pin
Mushtaque Nizamani2-Dec-06 3:58
Mushtaque Nizamani2-Dec-06 3:58 
AnswerRe: want the result of child process [modified] Pin
prasad_som30-Nov-06 21:38
prasad_som30-Nov-06 21:38 
GeneralRe: want the result of child process Pin
Mushtaque Nizamani30-Nov-06 23:06
Mushtaque Nizamani30-Nov-06 23:06 
AnswerRe: want the result of child process Pin
prasad_som1-Dec-06 1:08
prasad_som1-Dec-06 1:08 
GeneralRe: want the result of child process Pin
Mushtaque Nizamani1-Dec-06 1:26
Mushtaque Nizamani1-Dec-06 1:26 
GeneralRe: want the result of child process Pin
prasad_som1-Dec-06 1:41
prasad_som1-Dec-06 1:41 
GeneralRe: want the result of child process Pin
Mushtaque Nizamani1-Dec-06 1:46
Mushtaque Nizamani1-Dec-06 1:46 
AnswerRe: want the result of child process Pin
Tony Hill30-Nov-06 23:50
professionalTony Hill30-Nov-06 23:50 
QuestionUsing CString in WIN32 Application. Pin
VCSharp00730-Nov-06 20:00
VCSharp00730-Nov-06 20:00 
QuestionRe: Using CString in WIN32 Application. Pin
prasad_som30-Nov-06 20:06
prasad_som30-Nov-06 20:06 
AnswerRe: Using CString in WIN32 Application. Pin
uusheikh30-Nov-06 20:38
uusheikh30-Nov-06 20:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.