Page 1 of 1

SET other Style to GRID than LVS_REPORT

Posted: Fri Mar 27, 2020 3:47 am
by AUGE_OHR
hi,

i have GRID with Image so i guess Imagelist is active.
now i like to use other Stype like LVS_ICON for GRID

under Xbase++ i use LVM_SETVIEW Message
https://docs.microsoft.com/en-us/window ... vm-setview

---

in c:\hmg.3.4.4\INCLUDE\i_grid.ch in Found Constant and Name of HB_FUNC()

Code: Select all

// View Style   -->   ListView_ChangeView ( hWnd, [ nNewView ] ) --> nOldView
#define LV_VIEW_ICON       0x0
#define LV_VIEW_DETAILS    0x1
#define LV_VIEW_SMALLICON  0x2
#define LV_VIEW_LIST       0x3
#define LV_VIEW_TILE       0x4
#define LV_VIEW_MAX        0x4
see more here
https://docs.microsoft.com/en-us/window ... ew_setview
it just need Hwnd and Constant so Code was easy

Code: Select all

PROCEDURE SetLV_View(nNo,nView)
LOCAL cForm, cObj, hWnd, hGrid

   IF nNo = 1
      cForm := "WinLeft"
      cObj := cGrid_Left
   ELSE
      cForm := "WinRight"
      cObj := cGrid_Right
   ENDIF

   hGrid := GetControlHandle( cObj, cForm )
   LISTVIEW_CHANGEVIEW(hGrid,nView)

RETURN
---

i wonder why LVS_REPORT is still report by WinID as i have change View
Still_Report_Style.jpg
Still_Report_Style.jpg (97.29 KiB) Viewed 1470 times
it work for LV_VIEW_DETAILS (Report), LV_VIEW_SMALLICON and LV_VIEW_LIST
but with LV_VIEW_ICON, LV_VIEW_TILE or LV_VIEW_MAX Icons are missing :(

there is a ListView_ChangeExtendedStyle() but that is for LVS_EX_* Constant.
who have a Idea what i miss :idea: