Click here to Skip to main content
15,912,756 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: The Large Access Database ! Pin
Hadi Rezaee20-Nov-02 6:21
Hadi Rezaee20-Nov-02 6:21 
GeneralRe: The Large Access Database ! Pin
Christian Graus20-Nov-02 6:52
protectorChristian Graus20-Nov-02 6:52 
GeneralRe: The Large Access Database ! Pin
Hadi Rezaee20-Nov-02 8:15
Hadi Rezaee20-Nov-02 8:15 
GeneralRe: The Large Access Database ! Pin
Christian Graus20-Nov-02 8:21
protectorChristian Graus20-Nov-02 8:21 
GeneralRe: The Large Access Database ! Pin
Hadi Rezaee20-Nov-02 10:15
Hadi Rezaee20-Nov-02 10:15 
GeneralClipboard Question Pin
Nitron20-Nov-02 5:05
Nitron20-Nov-02 5:05 
GeneralRe: Clipboard Question Pin
User 988520-Nov-02 5:17
User 988520-Nov-02 5:17 
GeneralRe: Clipboard Question Pin
Nitron20-Nov-02 8:00
Nitron20-Nov-02 8:00 
Well... I'm kinda getting a pre-rendered metafile. Here's the code:

CPicture mypic = pGraph->ControlImage();
::OpenClipboard(NULL);
::EmptyClipboard();

HGLOBAL hGlobal = ::GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, sizeof(METAFILEPICT));

LPMETAFILEPICT pPict =  reinterpret_cast<LPMETAFILEPICT>(::GlobalLock(hGlobal));  // Create pointer to use to assign values to hGlobal.

pPict->hMF = ::CopyMetaFile(reinterpret_cast<HMETAFILE>(mypic.Handle), NULL);      pPict->mm = MM_ANISOTROPIC;

pPict->xExt = 22862;  // x size
pPict->yExt = 5078;  // y size

::GlobalUnlock(hGlobal);

if ( ::SetClipboardData(CF_METAFILEPICT, hGlobal) == NULL )
{
    AfxMessageBox( "Unable to set Clipboard data" );
    CloseClipboard();
}

if ( !::CloseClipboard () ) // Release control of the clipboard.
{
    AfxMessageBox( "Unable to close Clipboard" );
}


Confused | :confused:

- Nitron


"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
GeneralRe: Clipboard Question Pin
User 988520-Nov-02 8:10
User 988520-Nov-02 8:10 
GeneralRe: Clipboard Question Pin
Nitron20-Nov-02 8:13
Nitron20-Nov-02 8:13 
GeneralRe: Clipboard Question Pin
User 988520-Nov-02 8:53
User 988520-Nov-02 8:53 
GeneralMemory Problems!!! Pin
Paddy20-Nov-02 5:04
Paddy20-Nov-02 5:04 
GeneralRe: Memory Problems!!! Pin
Rickard Andersson2020-Nov-02 5:11
Rickard Andersson2020-Nov-02 5:11 
GeneralRe: Memory Problems!!! Pin
Paddy20-Nov-02 6:43
Paddy20-Nov-02 6:43 
GeneralRe: Memory Problems!!! Pin
Nitron20-Nov-02 5:11
Nitron20-Nov-02 5:11 
GeneralRe: Memory Problems!!! Pin
Paddy20-Nov-02 6:44
Paddy20-Nov-02 6:44 
GeneralRe: Memory Problems!!! Pin
Nitron20-Nov-02 6:52
Nitron20-Nov-02 6:52 
GeneralRe: Memory Problems!!! Pin
Paddy20-Nov-02 8:28
Paddy20-Nov-02 8:28 
GeneralRe: Memory Problems!!! Pin
Ravi Bhavnani20-Nov-02 9:23
professionalRavi Bhavnani20-Nov-02 9:23 
GeneralPropertis Window Pin
ivexx20-Nov-02 4:27
sussivexx20-Nov-02 4:27 
GeneralMessage handler function being called multiple times Pin
Mohit Khanna20-Nov-02 3:55
Mohit Khanna20-Nov-02 3:55 
GeneralRe: Message handler function being called multiple times Pin
Alois Kraus20-Nov-02 4:17
Alois Kraus20-Nov-02 4:17 
GeneralRe: Message handler function being called multiple times Pin
Mohit Khanna20-Nov-02 18:29
Mohit Khanna20-Nov-02 18:29 
GeneralShellExecute w/ unknown filename parameter Pin
kubert20-Nov-02 3:25
kubert20-Nov-02 3:25 
GeneralRe: ShellExecute w/ unknown filename parameter Pin
Simon.W20-Nov-02 3:38
Simon.W20-Nov-02 3:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.