Getting devicename after printdlg

Just starting out? Need help? Post your questions and find answers here.
LuckyLuke
Enthusiast
Enthusiast
Posts: 181
Joined: Fri Jun 06, 2003 2:41 pm
Location: Belgium

Getting devicename after printdlg

Post by LuckyLuke »

I'm trying to get the devicename after calling the PrintDlg function. I found some C-code doing this, but I don't know how to translate this in Purebasic. Can someone help me please ?

Code: Select all

if(PrintDlg(&Dlg))
  txtSizeDevNames->Text = IntToStr(GlobalSize(Dlg.hDevNames));
  pDevName = (DEVNAMES*)GlobalLock(Dlg.hDevNames);

  // Driver
  strcpy(sBuf, (char*)pDevName + pDevName->wDriverOffset);
   txtPrinter->Text = sBuf;

  // Device
  strcpy(sBuf, (char*)pDevName + pDevName->wDeviceOffset);
  txtType->Text = sBuf;

  ...