Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Memory Scanner.h"
- void CreateListViewColumns( HWND hwndDlg, int nIDDlgItem, TCHAR* arrNames[], int arrColLens[], int nNumCols ) {
- LVCOLUMN lvc = {0};
- HWND hwndListView = GetDlgItem( hwndDlg, nIDDlgItem );
- DWORD dwStyle = SendMessage( hwndListView, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0 );
- SendMessage( hwndListView, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle | LVS_EX_FULLROWSELECT );
- lvc.fmt = LVCFMT_LEFT;
- lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM;
- for( int i = 0; i < nNumCols; i++ ) {
- lvc.pszText = arrNames[i];
- lvc.cx = arrColLens[i];
- ListView_InsertColumn( hwndListView, i, &lvc );
- }
- ListView_SetColumnWidth( hwndListView, nNumCols - 1, LVSCW_AUTOSIZE_USEHEADER );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement