Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2004.09.05;
Скачать: CL | DM;

Вниз

Как сохранить картинку в буфер, а потом ее от туда считать?   Найти похожие ветки 

 
CrossOut   (2004-08-21 21:50) [0]

Как сохранить картинку в буфер, а потом ее от туда считать?


 
CrossOut   (2004-08-21 21:52) [1]

В Help"e приводится пример:

procedure TForm1.Button1Click(Sender: TObject);

var
 MyFormat : Word;
 Bitmap : TBitMap;
 AData,APalette : THandle;
begin
 Bitmap := TBitmap.Create;
 try
   Bitmap.LoadFromFile("c:\Program Files\Common Files\Borland Shared\Images\Splash\256color\factory.bmp");
   Bitmap.SaveToClipBoardFormat(MyFormat,AData,APalette);
   ClipBoard.SetAsHandle(MyFormat,AData);
 finally
   Bitmap.Free;
 end;
end;

За что отвечают переменные MyFormat,AData,APalette?


 
8ung   (2004-08-21 22:18) [2]

В хелпе написано еще
Allocates a global handle and writes the picture in its native Clipboard format (CF_BITMAP for bitmaps, CF_METAFILE for metafiles, and so on).

Delphi syntax:

procedure SaveToClipboardFormat(var AFormat: Word; var AData: THandle; var APalette: HPALETTE);

C++ syntax:

void __fastcall SaveToClipboardFormat(Word &AFormat, int &AData, HPALETTE &APalette);

Description

Use SaveToClipboardFormat to copy the picture to a Clipboard format. The resulting values can then be copied to the Windows clipboard using the clipboard’s SetAsHandle method.

The picture’s palette is returned in the APalette parameter, the format in the AFormat parameter, and a handle to the data in the AData parameter. Before the picture can be saved, an application must have registered the format using the RegisterClipboardFormat method.


 
8ung   (2004-08-21 22:20) [3]

читай да переводи



Страницы: 1 вся ветка

Текущий архив: 2004.09.05;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.053 c
14-1092387785
Layner
2004-08-13 13:03
2004.09.05
Сбор платежей с Сев.Америки, Европы. Как им легче заплатить?


14-1092742868
DelphiNew
2004-08-17 15:41
2004.09.05
расчёт Возмещение НДС


1-1092667695
Yakudza
2004-08-16 18:48
2004.09.05
WndProc у TPageControl


1-1092912919
uraprog
2004-08-19 14:55
2004.09.05
Пропали хинты


1-1092855479
Vemer
2004-08-18 22:57
2004.09.05
Как отключить некоторые предупреждения.