Page 1 of 1

Getting devicename after printdlg

Posted: Wed Jun 18, 2003 12:47 pm
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;

  ...