SET other Style to GRID than LVS_REPORT

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 665
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 85 times
Been thanked: 162 times

SET other Style to GRID than LVS_REPORT

Post 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 66 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:
have fun
Jimmy

Post Reply