摘要:
时间紧迫,直接上代码:得到电脑的默认打印机 TCHAR szBuffer[1024]={0}; DWORD length = 1024; int ret = ::GetDefaultPrinter(szBuffer,&length); if(ret == FALSE) ret = ::GetLastError(); else { SetDlgItemText(IDC_EDIT1,szBuffer); return; } if (ret == ERROR_INSUFFICIENT_BUFFER) { ... 阅读全文
摘要:
插入列 const int nColumnWidth=80; m_ListPrinter.InsertColumn(0,_T("PrinteName"),LVCFMT_CENTER,nColumnWidth); m_ListPrinter.InsertColumn(1,_T("ServerName"),LVCFMT_CENTER,nColumnWidth); m_ListPrinter.InsertColumn(2,_T("DriverName"),LVCFMT_CENTER,nColumnWidth); m_ListPrinter. 阅读全文