I have this piece of code here:
static BOOL CALLBACK dialog_CB(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
unsigned pos;
if (WM_INITDIALOG == message)
{
return FALSE;
}
switch (message)
{
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
app_exit=TRUE;
return TRUE;
case IDC_FOGCHECKBOX:
if (SendMessage((HWND)lParam, BM_GETCHECK, 0, 0) == BST_CHECKED)
dbFogOff();
else
dbFogOn();
return TRUE;
}
break;
case WM_CLOSE:
app_exit=TRUE;
break;
case WM_NOTIFY:
switch (LOWORD(wParam))
{
case IDC_FOGSLIDER:
pos=SendMessage((HWND)lParam, TBM_GETPOS, 0, 0);
itoa((int)pos,dir,10);
SendMessage((HWND)lParam, TBM_SETRANGE, 0, 100);
return TRUE;
}
}
return FALSE;
}
The checkbox works and I can get buttons working but I have looked everywhere for how to get the position of the slider. I'm using VC++ 2008 Express and ResEdit. If there is anything out there on how to program this stuff I've not found it yet.
Can anyone help?
EDIT: I've found putting under WM_NOTIFY I actually get the message but I still cannot retrieve the position of the slider...
Warning! May contain Nuts!