aboutsummaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2022-02-16 21:39:41 +0100
committerJohn Ankarström <john@ankarstrom.se>2022-02-16 21:39:41 +0100
commit263bc8b8ff4296a1fe0014a26134ad35ebccbbff (patch)
tree3ca94ee318f49fca112fb636e5e9172fae16c273 /c
parent2a726875d7ab370966bbb4b6ebb41756fc17f729 (diff)
downloadEpisodeBrowser-263bc8b8ff4296a1fe0014a26134ad35ebccbbff.tar.gz
Make column headers unclickable.
Diffstat (limited to 'c')
-rw-r--r--c/episodelistview.c27
-rw-r--r--c/listview.c4
-rw-r--r--c/main.c2
3 files changed, 16 insertions, 17 deletions
diff --git a/c/episodelistview.c b/c/episodelistview.c
index 3b42be0..e414c46 100644
--- a/c/episodelistview.c
+++ b/c/episodelistview.c
@@ -39,29 +39,29 @@ ElvCreate(HWND hWnd)
LRESULT
ElvHandleNotify(LPARAM lParam)
{
- NMLISTVIEW *pNmLv;
- pNmLv = (NMLISTVIEW *)lParam;
+ LPNMLISTVIEW lpNmLv;
+ lpNmLv = (LPNMLISTVIEW)lParam;
- switch (pNmLv->hdr.code) {
+ switch (lpNmLv->hdr.code) {
case LVN_ITEMCHANGED:
- if ((pNmLv->uChanged & LVIF_STATE)
- && (pNmLv->uNewState & LVIS_FOCUSED)) {
- Elv_iSelectedItem = pNmLv->iItem;
- ElvUpdateName(pNmLv->iItem, pNmLv->lParam);
- DlvShowEpisode(pNmLv->lParam);
+ if ((lpNmLv->uChanged & LVIF_STATE)
+ && (lpNmLv->uNewState & LVIS_FOCUSED)) {
+ Elv_iSelectedItem = lpNmLv->iItem;
+ ElvUpdateName(lpNmLv->iItem, lpNmLv->lParam);
+ DlvShowEpisode(lpNmLv->lParam);
}
break;
case NM_CUSTOMDRAW:
{
- NMLVCUSTOMDRAW *pLvCd;
- pLvCd = (NMLVCUSTOMDRAW *)lParam;
- switch (pLvCd->nmcd.dwDrawStage) {
+ LPNMLVCUSTOMDRAW lpLvCd;
+ lpLvCd = (LPNMLVCUSTOMDRAW)lParam;
+ switch (lpLvCd->nmcd.dwDrawStage) {
case CDDS_PREPAINT:
return CDRF_NOTIFYITEMDRAW;
break;
case CDDS_ITEMPREPAINT:
- if (!Watched(pLvCd->nmcd.lItemlParam)) {
- SelectObject(pLvCd->nmcd.hdc,
+ if (!Watched(lpLvCd->nmcd.lItemlParam)) {
+ SelectObject(lpLvCd->nmcd.hdc,
g_GUIFontBold);
return CDRF_NEWFONT;
}
@@ -80,7 +80,6 @@ ElvHandleNotify(LPARAM lParam)
case NM_RCLICK:
{
DWORD dwPos;
- NMITEMACTIVATE *pNmItem;
extern HMENU g_hPopupMenu;
dwPos = GetMessagePos();
TrackPopupMenu(g_hPopupMenu, TPM_RIGHTBUTTON,
diff --git a/c/listview.c b/c/listview.c
index 956e646..d223951 100644
--- a/c/listview.c
+++ b/c/listview.c
@@ -19,7 +19,7 @@ LvCreate(HWND hWnd, HMENU hMenu)
WS_EX_CLIENTEDGE,
WC_LISTVIEW,
TEXT(""),
- WS_CHILD|WS_VISIBLE|WS_VSCROLL|LVS_REPORT,
+ WS_CHILD|WS_VISIBLE|WS_VSCROLL|LVS_REPORT|LVS_NOSORTHEADER,
0, 0, 0, 0,
hWnd,
hMenu,
@@ -53,7 +53,7 @@ LvProc(HWND hLv, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg) {
case WM_NOTIFY:
- switch (((NMHDR *)lParam)->code) {
+ switch (((LPNMHDR)lParam)->code) {
case HDN_ENDTRACK:
UpdateLayout(GetParent(hLv));
return TRUE;
diff --git a/c/main.c b/c/main.c
index 31636f6..330101e 100644
--- a/c/main.c
+++ b/c/main.c
@@ -98,7 +98,7 @@ WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
UpdateLayout(hWnd);
break;
case WM_NOTIFY:
- switch (((NMHDR *)lParam)->idFrom) {
+ switch (((LPNMHDR)lParam)->idFrom) {
case IDC_EPISODELISTVIEW:
return ElvHandleNotify(lParam);
}