#define SRC_TYPE_BMP 0x01 // hInst = depends on ISF_LOADFROMFILE, lpszName = resource (file) name. To make resource name from resource id use MAKEINTERESOURCEW().
#define SRC_TYPE_PNG 0x02 // hInst = depends on ISF_LOADFROMFILE, lpszName = resource (file) name. To make resource name from resource id use MAKEINTERESOURCEW().
#define SRC_TYPE_HIMAGELIST 0x04 // hInst = (HIMAGELIST)himl, lpszName = MAKEINTERESOURCEW(index). Make Sure that common controls initialized before using this.
// Image Source flags:
#define ISF_LOADFROMFILE 0x0001 // Load image from file. hInst ignored.
#define ISF_USE_OFFSET 0x0002 // xSrc and ySrc valid.
#define ISF_USE_SIZE 0x0004 // cxSrc and cySrc valid.
#define ISF_FORCE_BPP 0x0010 //
#define ISF_FORCE_SIZE 0x0020 //
#define ISF_SCALE 0x0040 //
#define ISF_PREMULTIPLY 0x0100 // supported only by png
#define ISF_NOLOCALIZED_LOAD 0x0200 // when loading res:// protocol do not try to load resource from localized resource first
// use with ML_IPC_IMAGESOURCE_COPYSTRUCT
typedefstruct_MLIMAGESOURCECOPY
{
MLIMAGESOURCE*src;// pointer to the source struct
MLIMAGESOURCE*dest;// pointer to the destination struct
#define ML_IPC_IMAGELOADER_COPYSTRUCT (ML_IPC_IMAGELOADER_FIRST + 2) // Creates copy of image source struct. Use ML_IPC_IMAGESOURCE_FREESTRUCT to free copy data. Returns TRUE if success. param = (MLIMAGESOURCECOPY*)pmlis;
#define ML_IPC_IMAGELOADER_FREESTRUCT (ML_IPC_IMAGELOADER_FIRST + 3) // Use it to free MLIMAGESOURCE that was filled using ML_IPC_IMAGESOURCE_COPYSTRUCT. Returns TRUE if sucess. param = (MLIMAGESOURCE*)pmlis;
#define ML_IPC_IMAGELOADER_CHECKEXIST (ML_IPC_IMAGELOADER_FIRST + 4) // Performs simple checks to validate source. Returns TRUE if sucess. param = (MLIMAGESOURCE*)pmlis;
LPARAMlParam;// user parameter ( will be passed to every call of filter proc)
UINTfFlags;// filter flags
LPWSTRpszTitle;// filter title
INTcchTitleMax;// max title size (only for get info)
}MLIMAGEFILTERINFO;
typedefstruct_MLIMAGEFILTERAPPLYEX
{
INTcbSize;
GUIDfilterUID;// Filter to use.
LPBYTEpData;// Pointer to dib data.
LONGcx;// Image width in pixels.
LONGcy;// Image height in pixels.
INTbpp;// Bits per pixel
COLORREFrgbBk;// Back color to use
COLORREFrgbFg;// Front color to use
INT_PTRimageTag;// Image tag. will be passed to the filter
}MLIMAGEFILTERAPPLYEX;
// filter flags
#define MLIFF_IGNORE_BKCOLOR 0x0001 // Filter result doesn't depend on rgbBk.
#define MLIFF_IGNORE_FGCOLOR 0x0002 // Filter result doesn't depend on rgbFg.
// mask used to set/get filter info
#define MLIFF_TITLE 0x0001 //
#define MLIFF_PARAM 0x0002 //
#define MLIFF_FLAGS 0x0004 //
#define MLIFF_PROC 0x0008 //
// Messages
#define ML_IPC_IMAGEFILTER_FIRST 0x1240L
#define ML_IPC_IMAGEFILTER_REGISTER (ML_IPC_IMAGEFILTER_FIRST + 1) // Registers filter in ml. param = (MLIMAGEFILTERINFO*)pmlif. uid and proc must be always set. Returns TRUE on success.
#define ML_IPC_IMAGEFILTER_GETINFO (ML_IPC_IMAGEFILTER_FIRST + 3) // Get fitler info. param = (MLIMAGEFILTERINFO*)pmlif. set mask to whatever you wnat to get. set uid to filterUID. Returnd TRUE on success
#define ML_IPC_IMAGEFILTER_APPLYEX (ML_IPC_IMAGEFILTER_FIRST + 4) // Apply Filter. param = (MLIMAGEFILTERAPPLYEX)pmlif. Runs Filter over image. Returns TRUE if ok.
#define ML_IPC_IMAGELIST_GETREALLIST (ML_IPC_IMAGELIST_FIRST + 3) // Returns handle to the system HIMAGELIST
#define ML_IPC_IMAGELIST_GETREALINDEX (ML_IPC_IMAGELIST_FIRST + 4) // Returns image index in the HIMAGELIST if ok or -1 if error. If image with this colors is not cached yet it will be loaded and if Filter function speicified it will be Filtered
// ( user param in Filter function will be set to the tag assigned to the image)
#define ML_IPC_IMAGELIST_ADD (ML_IPC_IMAGELIST_FIRST + 5) // Add new item. Returns item index or -1 if failed.
// When adding images IMAGESOURCE can have different bpp from imagelist. After image loaded it first filtered and than added to to the system imagelist
#define ML_IPC_IMAGELIST_REPLACE (ML_IPC_IMAGELIST_FIRST + 6) // Replace existing item. Returns TRUE if ok.
#define ML_IPC_IMAGELIST_REMOVE (ML_IPC_IMAGELIST_FIRST + 7) // Removes existing item. Returns TRUE if ok.
#define ML_IPC_IMAGELIST_GETIMAGESIZE (ML_IPC_IMAGELIST_FIRST + 8) // Retrives size of stored images. Returns TRUE if ok.
HNAVITEMhItem;// handle to the item (must be set for ML_IPC_NAVITEM_GETINFO and ML_IPC_NAVITEM_SETINFO)
UINTmask;// Mask valid values.
INTid;// Item id.
LPWSTRpszText;// Text to display.
INTcchTextMax;// Text buffer length (used to GET item info).
LPWSTRpszInvariant;// Invariant text name. Any unique string you can assign to the item that will not change.
// For expample if item can be renamed by user invariat text will stay the same and can be used to save/load item state and position.
INTcchInvariantMax;// Invariant text buffer size ( used to GET item info).
INTiImage;// Image index. This is image index in the MLImageList assigned to the Navigation control. If you want to use default images set index to -1
INTiSelectedImage;// Selected image index. This is image index in the MLImageList assigned to the Navigation control.
// You need/want to assign selected image index only if you want to display different image on selection.
UINTstate;// Item state.
UINTstateMask;// Item state mask.
UINTstyle;// Item style.
UINTstyleMask;// Item style mask.
HFONThFont;// Item font. You can set this if you want item to use special font. You are responsible about free font object. If you want item to use default font set hFont to NULL.
LPARAMlParam;// User parameter. You can use it as you want.
}NAVITEM;
typedefstruct_NAVINSERTSTRUCT
{
HNAVITEMhParent;// Parent Item (NULL to insert in the root).
HNAVITEMhInsertAfter;// insert after item. You can use NCI_FIRST or NCI_LAST or you can use MAKE_NAVITEMSORTORDER to specify order index instead.
NAVITEMitem;
}NAVINSERTSTRUCT;
typedefstruct_NAVITEMDRAW
{
HDChdc;// Handle to the DC.
COLORREFclrText;// Text Fore color
COLORREFclrTextBk;// Text Back color.
HFONThFont;// Handle to the selected font.
RECT*prc;// pointer to the item rect.
UINTitemState;// NIIS_XXX
UINTdrawStage;// NIDS_XXX
INTiLevel;// Zero-based level of the item being drawn.
}NAVITEMDRAW;
// ML_IPC_NAVCTRL_ENUMITEMS callback
typedefBOOL(CALLBACK*NAVENUMPROC)(HNAVITEM/*hItem*/,LPARAM/*lParam*/);// Return FALSE to stop enumeration
// Use it to enumerate navigation items with ML_IPC_NAVCTRL_ENUMITEMS
typedefstruct_NAVCTRLENUMPARAMS
{
NAVENUMPROCenumProc;// Enum proc..
HNAVITEMhItemStart;// Item to start enumeration from. If hItemStar == NULL enumeration will start from the root.
LPARAMlParam;// User value
}NAVCTRLENUMPARAMS;
/// Find by name prarams (ML_IPC_NAVCTRL_FINDBYNAME)
typedefstruct_NAVCTRLFINDPARAMS
{
LCIDLocale;// Locale to use. Note: when searching using invariant name locale forced to invariant and case ignored.
UINTcompFlags;// Name compare flags (NCCF_XXX).
LPWSTRpszName;// Name to look for.
INTcchLength;// Name length (can be -1).
BOOLfFullNameSearch;// Perform full name search.
BOOLfAncestorOk;// When performing full name search if fAncestorOk is set and item with this name not exist - will fall back to closest ancestor
}NAVCTRLFINDPARAMS;
// Perform hit test
typedefstruct_NAVHITTEST
{
POINTpt;// [in] Point in control coordinates.
UINTflags;// [out] Test result flags
HNAVITEMhItem;// [out] Navigation Item at this point if any.
}NAVHITTEST;
// used to send item epxnd command ML_IPC_NAVITEM_EXPAND
typedefstruct_NAVITEMEXPAND
{
HNAVITEMhItem;// handle to the item
UINTfCmdExpand;// command to execute (NAITEM_TOGGLE/ NAITEM_EXOPAND/NAITEM_COLLAPSE).
}NAVITEMEXPAND;
// used to get fullitem name via ML_IPC_NAVITEM_GETFULLNAME
typedefstruct_NAVITEMFULLNAME
{
HNAVITEMhItem;// Handle to the item.
LPWSTRpszText;// Buffer that will recive full name.
INTcchTextMax;// Maximum amount of characters that can be wirtten to buffer.
}NAVITEMFULLNAME;
// ML_IPC_NAVITEM_GETRECT
typedefstruct_NAVITEMGETRECT
{
HNAVITEMhItem;// [in] Handle to the item.
RECTrc;// [out] Bounding rectangle.
BOOLfItem;// [in] If this parameter is TRUE, the bounding rectangle includes only the text of the item. Otherwise, it includes the entire line that the item occupies in the navigation control.
}NAVITEMGETRECT;
typedefstruct_NAVITEMINAVLIDATE
{
HNAVITEMhItem;// [in] Handle to the item.
RECT*prc;// [in] If this parameter is set specifies portion of item to invalidate in control coordinates. if it is NULL whole item will be invalidated
BOOLfErase;// [in] If TRUE background will be erased.
}NAVITEMINAVLIDATE;
//ML_IPC_NAVITEM_MOVE
typedefstruct_NAVITEMMOVE
{
HNAVITEMhItem;// [in] Handle to the item that need to be moved.
HNAVITEMhItemDest;// [in] Handle to the item where to move.
BOOLfAfter;// [in] If set to TRUE hItem will be moved after hItemDest.
}NAVITEMMOVE;
typedefstruct_NAVITEMORDER
{
HNAVITEMhItem;// Handle to the item that need to be moved.
WORDorder;// Minimal order value 1.
UINTflags;// Flags one of the NOF_XXX
}NAVITEMORDER;
// Nav control styles
#define NCS_NORMAL 0x0000
#define NCS_FULLROWSELECT 0x0001
#define NCS_SHOWICONS 0x0002
// NAVITEM mask flags. if mask set filed considered to be valid
#define NIMF_ITEMID 0x0001
#define NIMF_TEXT 0x0002
#define NIMF_TEXTINVARIANT 0x0004
#define NIMF_IMAGE 0x0008
#define NIMF_IMAGESEL 0x0010
#define NIMF_STATE 0x0020
#define NIMF_STYLE 0x0040
#define NIMF_FONT 0x0080
#define NIMF_PARAM 0x0100
// NAVITEM states.
#define NIS_NORMAL 0x0000
#define NIS_SELECTED 0x0001
#define NIS_EXPANDED 0x0002
#define NIS_DROPHILITED 0x0004
#define NIS_FOCUSED 0x0008 // used with draw item
// NAVITEM styles
#define NIS_HASCHILDREN 0x0001 // item has children
#define NIS_ALLOWCHILDMOVE 0x0002 // allow children to be moved (re-ordered)
#define NIS_ALLOWEDIT 0x0004 // allow title edit
#define NIS_ITALIC 0x0100 // when displaying item text draw it with italic style
#define NIS_BOLD 0x0200 // when displaying item text draw it with bold style
#define NIS_UNDERLINE 0x0400 // when displaying item text draw it with underline style
#define NIS_CUSTOMDRAW 0x0010 // use ML_MSG_NAVIGATION_ONCUSTOMDRAW
#define NIS_WANTSETCURSOR 0x0020 // item want to recive set cursor notification
#define NIS_WANTHITTEST 0x0040 // item want to monitor/modify hittest results
#define NIS_DEFAULTIMAGE 0x0080 // navigation control will ignore iImage and iSelectedImage
// NAVITEMINSERT hInsertAfter flags
#define NCI_FIRST ((HNAVITEM)(ULONG_PTR)-0x0FFFF) // insert first item
#define NCI_LAST ((HNAVITEM)(ULONG_PTR)-0x00000) // insert as last item
#define NICDRF_SKIPDEFAULT 0x0002 // Do not perform default drawing.
#define NICDRF_NOTIFYPOSTPAINT 0x0004 // You want to be called after paint.
#define NICDRF_NEWFONT 0x0008 // Font changed.
// Messages
#define ML_IPC_NAVIGATION_FIRST 0x1280L
#define ML_IPC_NAVCTRL_BEGINUPDATE (ML_IPC_NAVIGATION_FIRST + 1) // Use it to lock control updates while you managing items. param = NUF_LOCK_XXX. Do not forget to call ML_IPC_NAVCTRL_ENDUPDATE when done. Returns lock counter or -1 if error.
#define ML_IPC_NAVCTRL_ENDEDITTITLE (ML_IPC_NAVIGATION_FIRST + 13) // Ends Title edit, param = (WPARAM)(BOOL)fCancel, if fCancel == TRUE item editing will be terminated and changes lost otherwise new title will be saved.
#define ML_IPC_NAVCTRL_ENDUPDATE (ML_IPC_NAVIGATION_FIRST + 3) // Call this when you finished updating items. Returns lock counter or -1 if error. if loock reached 0 - window will be updated.
#define ML_IPC_NAVCTRL_ENUMITEMS (ML_IPC_NAVIGATION_FIRST + 4) // Enumerates items in navigation control. param= (WPARAM)(NAVCTRLENUMPARAMS*)pnavEnumParams. Returns TRUE if all items was enumerated successfully.
#define ML_IPC_NAVCTRL_FINDITEMBYID (ML_IPC_NAVIGATION_FIRST + 5) // Search for an item in navigation control by it's id. param = (WPARAM)(INT)id. Returns HNAVITEM on success or NULL.
#define ML_IPC_NAVCTRL_FINDITEMBYNAME (ML_IPC_NAVIGATION_FIRST + 6) // Search for an item in navigation control by it's name. param = (WPARAM)(NAVCTRLFINDPARAMS)pnavFindParams. Returns HNAVITEM on success or NULL.
#define ML_IPC_NAVCTRL_GETIMAGELIST (ML_IPC_NAVIGATION_FIRST + 7) // Returnrs handle to MLImageList associated with navigation control. param = (WPARAM)0. Return HMLIMGLST if success or NULL.
#define ML_IPC_NAVCTRL_GETFIRST (ML_IPC_NAVIGATION_FIRST + 8) // Returns handle to first item in the navigation control. param = (WPARAM)0. Return HNAVITEM or NULL.
#define ML_IPC_NAVCTRL_GETINDENT (ML_IPC_NAVIGATION_FIRST + 14) // Retrieves the amount, in pixels, that child items are indented relative to their parent items. param = (WPARAM)0.
#define ML_IPC_NAVCTRL_GETSELECTION (ML_IPC_NAVIGATION_FIRST + 9) // Returns handle to selected item in the navigation control. param = (WPARAM)0. Return HNAVITEM or NULL.
#define ML_IPC_NAVCTRL_HITTEST (ML_IPC_NAVIGATION_FIRST + 11) // Performs hit-test. param = (WPARAM)(NAVHITTEST*)pnavHitTest. Return HNAVITEM if any item under this point or NULL.
#define ML_IPC_NAVCTRL_INSERTITEM (ML_IPC_NAVIGATION_FIRST + 12) // Insert Item. param = (WPARAM)(NAVINSERTSTRUCT*)pnavInsert. Returns handle to created item if you not speicified item id - you wil be assigned auto generated one pnavInsert->id
#define ML_IPC_NAVITEM_EDITTITLE (ML_IPC_NAVIGATION_FIRST + 58) // Begins Title edit. param = (WPARAM)(HNAVITEM)hItem. Returns TRUE if item edit begins
#define ML_IPC_NAVITEM_ENSUREVISIBLE (ML_IPC_NAVIGATION_FIRST + 40) // Enusres that item visible. param =(WPARAM)(HNAVITEM)hItem. Return TRUE if ok.
#define ML_IPC_NAVITEM_EXPAND (ML_IPC_NAVIGATION_FIRST + 41) // Command to change item expand state. param = (WPARAM)(NAVITEMEXPAND*)hnavItemExpand. Returns TRUE if ok.
#define ML_IPC_NAVITEM_GETCHILD (ML_IPC_NAVIGATION_FIRST + 42) // Returns handle to the child item of current one. param =(WPARAM)(HNAVITEM)hItem. Return HNAVITEM or NULL.
#define ML_IPC_NAVITEM_GETFULLNAME (ML_IPC_NAVIGATION_FIRST + 44) // Returns item full name. param = (WPARAM)(NAVITEMFULLNAME*)pnavFullName. Returns INT number of characters copied or 0. Full name includes names of all item parents separated by '/' if character '/' was used in name it is doubled
#define ML_IPC_NAVITEM_GETINFO (ML_IPC_NAVIGATION_FIRST + 45) // Retrives item info. param = (WPARAM)(NAVITEM*)pnavItem. Returns TRUE if success. You must set hItem.
#define ML_IPC_NAVITEM_GETNEXT (ML_IPC_NAVIGATION_FIRST + 46) // Returns handle to the next item of current one. param =(WPARAM)(HNAVITEM)hItem. Return HNAVITEM or NULL.
#define ML_IPC_NAVITEM_GETORDER (ML_IPC_NAVIGATION_FIRST + 47) // Returns item sort order. param = (WPARAM)(HNAVITEM)hItem. Return item sort order or -1 if error.
#define ML_IPC_NAVITEM_GETPARENT (ML_IPC_NAVIGATION_FIRST + 48) // Returns handle to the parent item of current one. param =(WPARAM)(HNAVITEM)hItem. Return HNAVITEM or NULL.
#define ML_IPC_NAVITEM_GETPREVIOUS (ML_IPC_NAVIGATION_FIRST + 49) // Returns handle to the previous item of current one. param =(WPARAM)(HNAVITEM)hItem. Return HNAVITEM or NULL.
#define ML_IPC_NAVITEM_GETRECT (ML_IPC_NAVIGATION_FIRST + 50) // Retrive item rect. param =(WPARAM)(NAVITEMGETRECT*)hnavRect. If the item is visible and the bounding rectangle was successfully retrieved, the return value is TRUE.
#define ML_IPC_NAVITEM_GETSTATE (ML_IPC_NAVIGATION_FIRST + 51) // Returns item state flags. param = (WPARAM)(HNAVITEM)hItem. Return item state flags.
#define ML_IPC_NAVITEM_HASCHILDRENREAL (ML_IPC_NAVIGATION_FIRST + 52) // Returns TRUE if item has at least one child right now. param =(WPARAM)(HNAVITEM)hItem. Return BOOL.
#define ML_IPC_NAVITEM_SELECT (ML_IPC_NAVIGATION_FIRST + 55) // Select current item. param =(WPARAM)(HNAVITEM)hItem. Return TRUE if success.
#define ML_IPC_NAVITEM_SETINFO (ML_IPC_NAVIGATION_FIRST + 56) // Modifies item info. param = (WPARAM)(NAVITEM*)pnavItem. Returns TRUE if success. You must set hItem.
#define ML_IPC_NAVITEM_SETORDER (ML_IPC_NAVIGATION_FIRST + 57) // Sets item order and modifies all items oreder after it if required. if oder == 0xFFFF order will be set to max + 1 for this group. param = (WPARAM)(NAVITEMORDER*)pnavOrder. Returns new item order or 0xFFFF if error
// Macros
// Use this in ML_IPC_NAVCTRL_INSERTITEM to create hInsertAfter
#define ML_IPC_RATING_CALCRECT (ML_IPC_RATING_FIRST + 3) // calculates minimal rect required to show rating. (param) = (WPARAM)(RECT*)prc. Set prc->left to HMLIMGLST (or NULL to use default) and prc->top to maxValue. Returns TRUE if ok.
RECT*prcView;// client area size (you can get it at CDDS_PREPAINT in plvcd->nmcd.rc)
COLORREFrgbBk;// color to use as background (plvcd->clrTextBk)
COLORREFrgbFg;// color to use as foreground (plvcd->clrText)
UINTfStyle;// style to use RCS_XXX
}RATINGCOLUMNPAINT;
typedefstruct_RATINGCOLUMN
{
HWNDhwndList;
UINTiItem;
UINTiSubItem;
INTvalue;
POINTptAction;//
BOOLbRedrawNow;// You want list to be redrawn immediatly
BOOLbCanceled;// Used with EndDrag - i
UINTfStyle;// RCS_XXX
}RATINGCOLUMN;
typedefstruct_RATINGBACKTEXT
{
LPWSTRpszText;
INTcchTextMax;
INTnColumnWidth;// used if style is RCS_ALLIGN_CENTER or RCS_ALLIGN_RIGHT
UINTfStyle;
}RATINGBACKTEXT;
typedefstruct_RATINGWIDTH
{
INTwidth;// desired width
UINTfStyle;// RCS_XXX
}RATINGWIDTH;
// styles
#define RCS_DEFAULT 0xFFFFFFFF // set this if you want to use gen_ml provided style
// layout
#define RCS_ALLIGN_LEFT 0x00000000 // allign column left
#define RCS_ALLIGN_CENTER 0x00000001 // allign column center
#define RCS_ALLIGN_RIGHT 0x00000002 // allign column right
// showepmty
#define RCS_SHOWEMPTY_NEVER 0x00000000
#define RCS_SHOWEMPTY_NORMAL 0x00000010
#define RCS_SHOWEMPTY_HOT 0x00000020
#define RCS_SHOWEMPTY_ANIMATION 0x00000040
#define RCS_SHOWEMPTY_ALWAYS 0x00000070
// traking (when)
#define RCS_TRACK_NEVER 0x00000000
#define RCS_TRACK_WNDFOCUSED 0x00000100
#define RCS_TRACK_ANCESTORACITVE 0x00000200
#define RCS_TRACK_PROCESSACTIVE 0x00000400
#define RCS_TRACK_ALWAYS 0x00000800
// traking (what)
#define RCS_TRACKITEM_ALL 0x00000000
#define RCS_TRACKITEM_SELECTED 0x00100000
#define RCS_TRACKITEM_FOCUSED 0x00200000
#define RCS_BLOCKCLICK 0x01000000
#define RCS_BLOCKUNRATECLICK 0x02000000
#define RCS_BLOCKDRAG 0x04000000
#define RCS_SIZE_ALLOWDECREASE 0x10000000
#define RCS_SIZE_ALLOWINCREASE 0x20000000
#define ML_IPC_RATINGCOLUMN_FIRST 0x1420L
#define ML_IPC_RATINGCOLUMN_PAINT (ML_IPC_RATINGCOLUMN_FIRST + 1) // Paints rating column (call it in (CDDS_SUBITEM | CDDS_ITEMPREPAINT) handler).
// param = (WPARAM)(RATINGCOLUMNPAINT*)prcp. if Return TRUE - you need to return SDRF_SKIPDEFAULT
#define ML_IPC_RATINGCOLUMN_CLICK (ML_IPC_RATINGCOLUMN_FIRST + 2) // param = (WPARAM)(RATINGCOLUMN*)prc. You need to set: hwndList, ptAction, bRedraw. iItem - will be set to iItem where click happened. Returns TRUE if click is on the column.
#define ML_IPC_RATINGCOLUMN_TRACK (ML_IPC_RATINGCOLUMN_FIRST + 3) // param = (WPARAM)(RATINGCOLUMN*)prc. You need to set: hwndList, ptAction, iItem, iSubItem, vale, bRedraw. iItem - will be set to iItem where click happened. No return value.
#define ML_IPC_RATINGCOLUMN_FILLBACKSTRING (ML_IPC_RATINGCOLUMN_FIRST + 10) // Generates string thats when displayed equal to the right border of maximum rating value. If rating column has 0 index you can use this string as column text to prevent mouse group selection over rating. If width is less than allowed pszText[0] = 0x00
// param = (WPARAM)(RATINGBACKTEXT*)prct. Returns TRUE if ok
#define ML_IPC_RATINGCOLUMN_GETWIDTH (ML_IPC_RATINGCOLUMN_FIRST + 11) // Set width according to the policies. param = (WPARAM)(RATINGWIDTH*)prw. Return TRUE if ok. prw->width will contain allowed width
INTcbSize;// The size of this structure, in bytes. You must specify size !!!
HDChdcDst;// A handle to the destination device context.
RECTrc;// Rectangle that specifies where the image is drawn.
INTvalue;// Database cloud status (1=full,2=partial,3=unavail)
HMLIMGLSThMLIL;// Media Libary ImageList. Set to NULL if you want to use default media library list.
INTindex;// index of image inside Media Libary ImageList to use. Ignored if used with default media library list.
}CLOUDDRAWPARAMS;
#define ML_IPC_CLOUD_FIRST 0x1500L
#define ML_IPC_CLOUD_DRAW (ML_IPC_CLOUD_FIRST + 1) // Draws cloud status. param = (WPARAM)(CLOUDDRAWPARAMS*)prdp. return TRUE on success.
#define ML_IPC_CLOUD_CALCRECT (ML_IPC_CLOUD_FIRST + 2) // calculates minimal rect required to show cloud status. (param) = (WPARAM)(RECT*)prc. Set prc->left to HMLIMGLST (or NULL to use default) and prc->top to maxValue. Returns TRUE if ok.
INTvalue;// database cloud status (1=full,2=partial,3=unavail)
RECT*prcItem;// whole item rect (plvcd->nmcd.rc)
RECT*prcView;// client area size (you can get it at CDDS_PREPAINT in plvcd->nmcd.rc)
COLORREFrgbBk;// color to use as background (plvcd->clrTextBk)
COLORREFrgbFg;// color to use as foreground (plvcd->clrText)
}CLOUDCOLUMNPAINT;
typedefstruct_CLOUDBACKTEXT
{
LPWSTRpszText;
INTcchTextMax;
INTnColumnWidth;// used if style is RCS_ALLIGN_CENTER or RCS_ALLIGN_RIGHT
}CLOUDBACKTEXT;
#define ML_IPC_CLOUDCOLUMN_PAINT (ML_IPC_CLOUD_FIRST + 3) // Paints cloud column (call it in (CDDS_SUBITEM | CDDS_ITEMPREPAINT) handler).
// param = (WPARAM)(CLOUDCOLUMNPAINT*)prcp. if Return TRUE - you need to return SDRF_SKIPDEFAULT
#define ML_IPC_CLOUDCOLUMN_GETMINWIDTH (ML_IPC_CLOUD_FIRST + 4) // param = (WPARAM)0. Returns minimum width required to display cloud status column.
#define ML_IPC_CLOUDCOLUMN_GETWIDTH (ML_IPC_CLOUD_FIRST + 5) // Set width according to the policies. param = (WPARAM)(INT*)width. Return TRUE if ok. 'width' will contain allowed width
#define MLMENU_ACTION_DRAWITEM 1 // param = (LPARAM)(DRAWITEMSTRUCT*)pdis; Return: 0 - default processing, 1 - if you draw it all, MLMENU_WANT_DRAWPART - want to receive parts
#define MLMENU_ACTION_DRAWBACK 2 // param = (LPARAM)(DRAWITEMSTRUCT*)pdis; Return: 0 - default processing, 1 - if you draw it all
#define MLMENU_ACTION_DRAWICON 3 // param = (LPARAM)(DRAWITEMSTRUCT*)pdis; Return: 0 - default processing, 1 - if you draw it all
#define MLMENU_ACTION_DRAWTEXT 4 // param = (LPARAM)(DRAWITEMSTRUCT*)pdis; Return: 0 - default processing, 1 - if you draw it all
#define ML_IPC_INITSKINNEDPOPUPHOOK 0x1403L // param = (WPARAM)(MLSKINNEDPOPUP)pmlSkinnedPopup (you need to fill only hwnd, hmlil, width, skinStyle, customProc, customParam). Return handle
#define ML_IPC_SKINNEDWND_GETTYPE 0x0002 // param ignored. return SKINNEDWND_TYPE_XXX or SKINNEDWND_TYPE_ERROR if error.
#define ML_IPC_SKINNEDWND_SKINCHANGED 0x0003 // param = (WPARAM)MAKEWPARAM(NotifyChldren, bRedraw). Return TRUE if ok.
#define ML_IPC_SKINNEDWND_ENABLEREFLECTION 0x0004 // param = (WPARAM)(BOOL)bEnable. Return TRUE if ok. Note: as a lot of skinned controls relay on reflection be carefull using this command
#define ML_IPC_SKINNEDWND_GETPREVWNDPROC 0x0005 // param = (WPARAM)(BOOL*)pbUnicode. Return WNDPROC if ok.
#define ML_IPC_SKINNEDHEADER_SETHEIGHT 0x0032 // param = (WPARAM)(INT)newHeight. if newHeight == -1 - height will be calculated based on the font size.
#define ML_IPC_SKINNEDHEADER_SETCLOUDCOLUMN 0x0033 // param = (WPARAM)(INT)cloudColumn. sets the column which will show a cloud icon header image
#define FVM_GETNEXTFILE (MLFVM_FIRST + 16) // wParam - (WPARAM)(INT)iStart, lParam = (LPARAM)(UINT)uFlags, Returns the index of the next file if successful, or -1 otherwise.
#define FVFS_FOCUSED 0x0001 // The file has the focus, so it is surrounded by a standard focus rectangle. Although more than one file may be selected, only one file can have the focus.
#define FVFS_SELECTED 0x0002 // The file is selected.
#define FVFS_CUT 0x0004 // The file is marked for a cut-and-paste operation.
#define FVFS_DROPHILITED 0x0008 // The file is highlighted as a drag-and-drop target.
// FileView file types
#define FVFT_UNKNOWN 0
#define FVFT_AUDIO 1
#define FVFT_VIDEO 2
#define FVFT_PLAYLIST 3
#define FVFT_LAST FVFT_PLAYLIST
#define FVIF_TEXT 0x0001
#define FVIF_STATE 0x0002
#define FVIF_ATTRIBUTES 0x0004
#define FVIF_SIZE 0x0008
#define FVIF_CREATETIME 0x0010
#define FVIF_ACCESSTIME 0x0020
#define FVIF_WRITETIME 0x0040
#define FVIF_TYPE 0x0080
typedefstruct__FVITEM
{
UINTmask;
UINTstate;
UINTstateMask;
LPWSTRpszText;// in some case returned pszText can be pointed on internal buffer and not one that was provided
INTcchTextMax;
UINTuAttributes;
DWORDdwSizeLow;
DWORDdwSizeHigh;
FILETIMEftCreationTime;
FILETIMEftLastAccessTime;
FILETIMEftLastWriteTime;
WORDwType;
}FVITEM,*PFVITEM;
#define FVM_GETFILE (MLFVM_FIRST + 17) // wParam - (WPARAM)(INT)iFile, lParam = (LPARAM)(FVITEM*)pFile, Returns TRUE if successful, or FALSE otherwise.
#define FVM_ENQUEUESELECTION (MLFVM_FIRST + 22) // wParam - (WPARAM)(UINT)uEnqueueFilter, lParam - (LPARAM)(INT*)pnFocused, Returns number of files sent to playlist. pnFocused - optional (if not null will contain playlist index of focused item)
#define FVM_SETFILESTATE (MLFVM_FIRST + 24) // wParam - (WPARAM)(INT)iFile ( if -1 applyed to all files), (LPARAM)(LPFVITEM)pFile - only stateMask and state are used, Returns TRUE if successful, or FALSE otherwise.
POINTpt;// The position to hit test, in fileview client coordinates .
UINTuFlags;//
INTiItem;// file index;
}FVHITTEST;
#define FVM_HITTEST (MLFVM_FIRST + 27) // wParam - not used, lParam - (LPARAM)(FVHITTEST*)pHitTest. Returns the index of the item at the specified position, if any, or -1 otherwise.