15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Help:How to clear specified format data from clipboard?

Mao Zhihong -- maozhihong@hotmail.com
Monday, December 09, 1996

Environment: VC++ 1.52, VC++ 4.0 with patch, Win3.1, Win 95

Dear friends, 
  In my project, I put some important data(in my own format) into
clipboard for data exchange, after I finish the work, I wanna clear them
without clear the entire clipboard. I searched all the MSDN, KB,
FAQ,..., but still no answer! :(
  Can anyone help me?
    
     ...
      // put a bitmap and a metafile picture on the clipboard
      if (pView->OpenClipboard()) {
        ::SetClipboardData(CF_DIB, hdib);   
        ::SetClipboardData(CF_METAFILEPICT, hwmf);
        ::CloseClipboard(); 
      }                     
      ...
      // do our job
      ...
      // now I need to clear only CF_DIB data, how could I ?
      ???
      
      
      (There is a ::EmptyClipboard(), but it will empty everything!)

    					Yours
						mao    
-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      Mao Zhihong ( Robert Mao )  DreamyRainbow Software Studio

      Voc/Fax : 86-25-5408086
      E-Mail  : maozhihong@hotmail.com  mao@seu.edu.cn
      URL     : http://seic3.seu.edu.cn/~mao
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



Dicky Singh -- Dicky@landmark.com
Wednesday, December 11, 1996

how about:

GetClipboardData(CF_DIB);
hWMF=GetClipboardData(CF_METAFILEPICT);
::EmptyClipboard();
SetClipboardData(CF_METAFILEPICT, hWMF); 

or something similar?     just a guess....

-Dicky Singh, Dicky@Landmark.COM


----------
From: 	Mao Zhihong
Sent: 	Monday, December 09, 1996 1:35 AM
To: 	MFC Board
Subject: 	Help:How to clear specified format data from clipboard?

Environment: VC++ 1.52, VC++ 4.0 with patch, Win3.1, Win 95

Dear friends, 
  In my project, I put some important data(in my own format) into
clipboard for data exchange, after I finish the work, I wanna clear them
without clear the entire clipboard. I searched all the MSDN, KB,
FAQ,..., but still no answer! :(
  Can anyone help me?
    
     ...
      // put a bitmap and a metafile picture on the clipboard
      if (pView->OpenClipboard()) {
        ::SetClipboardData(CF_DIB, hdib);   
        ::SetClipboardData(CF_METAFILEPICT, hwmf);
        ::CloseClipboard(); 
      }                     
      ...
      // do our job
      ...
      // now I need to clear only CF_DIB data, how could I ?
      ???
      
      
      (There is a ::EmptyClipboard(), but it will empty everything!)

    					Yours
						mao    
-- 
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      Mao Zhihong ( Robert Mao )  DreamyRainbow Software Studio

      Voc/Fax : 86-25-5408086
      E-Mail  : maozhihong@hotmail.com  mao@seu.edu.cn
      URL     : http://seic3.seu.edu.cn/~mao
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=




| Вернуться в корень Архива |