The following sample code shows how to use the CM_SETCNRINFO message to change from the current view of a container (Name, Details, or Text) to the Icon view:
CNRINFO cnrInfo;
/**********************************************************************/
/* Set the attribute field to the Icon view. */
/**********************************************************************/
cnrInfo.flWindowAttr = CV_ICON;
/**********************************************************************/
/* Change the view from the current view to the Icon view. */
/**********************************************************************/
WinSendMsg(
hwndCnr, /* Container window handle */
CM_SETCNRINFO, /* Container message for setting */
MPFROMP(&cnrInfo), /* Container control data */
MPFROMLONG(
CMA_FLWINDOWATTR)); /* Message attribute that sets */
/* container window attributes */