December 01, 2024, 11:01:22 AM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


LM_Image Custom Image Control Library

Started by LarryMc, September 24, 2014, 10:33:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

The attached contains version 1.0 of the LM_Image  control static library

This library allows users to display the following image types directly in a window or dialog:
  PNG, BMP, ICON, GIF, JPEG, Exif, PNG, TIFF, WMF, and EMF

The image is displayed without using any of the following commands:
  LOADIMAGE
  SHOWIMAGE
  DELETEIMAGE

The zip includes
  LM_Image.lib file which goes in your IWBDev\libs folder
    LM_Image .inc file which goes in your IWBDev\inc folder
  readme.txt file that describes all the commands
and a "special" testing file
This file uses a compiler directive on line 8
spread through the program  are $IFDEF/$ELSE/$ENDIF compiler directives

When line 8 IS NOT commented the program operates like a dialog based app.
If line 8 IS commented the program operates like a window based app.

I rigged this test program because windows and dialogs handle controls differently and I needed to continually test both formats
Edited -Download link removed
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

UPDATE: Version 1.1

Added right-click context menu to control to allow user to save contents of control's client area in one of the following formats:

BMP, JPG, GIF, TIFF, or PNG
The type of the image currently being displayed in the control has no bearing on the type that can be saved.

Added the following command to control the displaying of the context menu.
Default is 0-disabled

LM_Image_SaveAsEnable(WINDOW win, id as UINT, opt enable=1 as INT)
Purpose: Enables/disables a right-click context menu which allows the User to save the displayed contents of the control in one of thee following formats:
   BMP,GIF,JPG,TIFF,PNG
Where:
   win is the parent WINDOW/DIALOG
   id identifies this instance of the image control
   enable controls whether or not the context menu is displayed.


Edited -Download link removed
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Larry,

Works a treat! Still looking at it, but under the cosh at the moment to do things
entirely unconnected with computers, like cutting the lawns, etc!

Brian

LarryMc

UPDATE: Version 1.2
Removed several memory leaks

The zip includes
   LM_Image.lib file which goes in your IWBDev\libs folder
     LM_Image .inc file which goes in your IWBDev\inc folder
   readme.txt file that describes all the commands
and a "special" testing file for both WINDOWS and DIALOGS
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

RG

Thanks Larry, I'll have to take a look at this.

LarryMc

UPDATE: Version 1.3

Fixed a problem where a user would run into problems trying to open subsequent images using the same control ID.
Fixed a problem where the background color of PNG images was not being  handled properly.

The zip includes
   LM_Image.lib file which goes in your IWBDev\libs folder
     LM_Image .inc file which goes in your IWBDev\inc folder
   readme.txt file that describes all the commands
and a "special" testing file for both WINDOWS and DIALOGS
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library