Sunday 15 July 2012

delphi - How do I show the Windows photo-printing wizard on windows XP? -


Hello, can I use Delphi 2010 + Windows XP, you call Photo Printing Wizard in Windows XP to Delphi.

This tip only works on windows 7

Thanks.

For the sample code include:

  static const CLSID CLSID_PrintPhotosDropTarget = {0x60fd46de, 0xf830, 0x4894, {0xa6, 0x28, 0x6f, 0xa8, 0x1b, 0xc0, 0x19, 0x0d}}; // A data object that has a list of photos to print. IDataObject * pDataObject; // Create photo printing wizard drop target. CComPtr & LT; IDropTarget & gt; SpDropTarget; Hr = CoCreateInstance (CLSID_PrintPhotosDropTarget, zero, CLSCTX_INPROC_SERVER, IID_PPV_ARGS (& amp; spDropTarget)); // Drop data object on drop target POINTL pt = {0}; DWORD dwEffect = DROPEFFECT_LINK | DROPEFFECT_MOVE | DROPEFFECT_COPY; SpDropTarget- & gt; Dragentor (pDataObject, MK_LBUTTON, pt, and dwEffect); SpDropTarget- & gt; Drop (pDataObject, MK_LBUTTON, pt, and dwEffect);   

Delphi code will be something like this:

  uses ActiveX, ComObj; Constant CLSID_PrintPhotosDropTarget: TGUID = '{60FD46DE-F830-4894-A628-6FA81BC0190D}'; Project InvokePhotoPrintingWizard; Var effect: LongInt; Status: Tapepoint; DataAbject: IDTababage; DropTage: IDPrint; Start // Photo Printing Wizard drop goal to create OleCheck (CoCreateInstance (CLSID_PrintPhotosDropTarget, zero, CLSCTX_INPROC_SERVER, IDropTarget, DropTarget)); // Drop the data object on the drop object Position.X: = 0; Event. Y: = 0; Impact: = DROPEFFECT_LINK or DROPEFFECT_MOVE or DROPEFFECT_COPY; Olechek (droptrajabrage dragentor (datobbact, mklbutton, position, effect)); Olechek (droptraage.dop (databex, mk_lbutton, position, effect)); End;    

No comments:

Post a Comment