It is currently Fri Jan 18, 2019 10:45 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject:
PostPosted: Mon Oct 07, 2002 7:43 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by TerryHough.

Does anyone know how to use PB to display either the Enhanced Metafile Format or Windows Metafile Format file?

Could this be displayed similarly to the .BMP images in an ImageGadget? Or even to the windows background?

Thanks

Terry


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Oct 08, 2002 7:37 am 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by SoulTaker.

CloseEnhMetaFile Closes an enhanced-metafile device context.

CopyEnhMetaFile Copies the contents of an enhanced-format metafile to a specified file.

CreateEnhMetaFile Creates a device context for an enhanced-format metafile.

DeleteEnhMetaFile Deletes an enhanced-format metafile or an enhanced-format metafile handle.

EnhMetaFileProc An application-defined callback function used with the EnumEnhMetaFile function.

EnumEnhMetaFile Enumerates the records within an enhanced-format metafile.

GdiComment Copies a comment from a buffer into a specified enhanced-format metafile.

GetEnhMetaFile Creates a handle that identifies the enhanced-format metafile stored in the specified file.

GetEnhMetaFileBits Retrieves the contents of the specified enhanced-format metafile and copies them into a buffer.

GetEnhMetaFileDescription Retrieves an optional text description from an enhanced-format metafile and copies the string to the specified buffer.

GetEnhMetaFileHeader Retrieves the record containing the header for the specified enhanced-format metafile.

GetEnhMetaFilePaletteEntries Retrieves optional palette entries from the specified enhanced metafile.

GetWinMetaFileBits Converts the enhanced-format records from a metafile into Windows-format records.

PlayEnhMetaFile Displays the picture stored in the specified enhanced-format metafile.

PlayEnhMetaFileRecord Plays an enhanced-metafile record by executing the graphics device interface (GDI) functions identified by the record.

SetEnhMetaFileBits Creates a memory-based enhanced-format metafile from the specified data.

SetWinMetaFileBits Converts a metafile from the older Windows format to the new enhanced format.

I haven;t played with this but that should lead you to the right direction.

You will need the Windows API Reference.




Abit BD7-II Raid P4 1.9 gHz 384 Ram Xtasy GFroce 3 TI 200 CD-RW DirectX 9.0 Beta 2 Sound Blaster Live! XP Pro, Registered PureBasic version 3.30 For Windows.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Oct 10, 2002 9:26 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by TerryHough.

Thanks for the pointers. Unfortunately, I'm not that good with API yet. I will see what I can do.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 11, 2002 7:05 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by TerryHough.

So now I am totally lost!

Does anyone have a PB example of displaying a .EMF file? It sure would be a big help.

Thanks
Terry


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Oct 11, 2002 8:07 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by Paul.

Here is a quick little PB code I translated straight from Platform SDK...
Maybe it will get you started (it displays a EMF file called "test.emf")

Code:
hWnd=OpenWindow(0,0,0,400,300,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"EMF Viewer")
 
hEmf=GetEnhMetaFile_("test.emf")
hDC = GetDC_(hWnd)
GetClientRect_(hWnd,rec.RECT)
 
PlayEnhMetaFile_(hDC,hEmf,rec) 
 
Repeat
Until WaitWindowEvent()=#PB_EventCloseWindow
 
DeleteEnhMetaFile_(hEmf)
ReleaseDC_(hWnd, hDC)



----------
Visit the PB Resources Site at http://www.reelmediaproductions.com/pb


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Oct 14, 2002 2:55 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by TerryHough.

Thanks Paul. Maybe that will turn my lights on!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 24 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye