Hello,
i know this is a noob question, but i haven't any idea how to change
the backgroundcolor for a trackbar, so i try a question here.
I have the following code snippets inside a DLL,
the problem is this XXXX in the subclass, it do nothing,
i have try FillRect with a solidbrush or other things, no luck :(
any ideas? whats wrong?
===========================================
WNDPROC oldSliderWindowProc;
LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
lParam)
{
case WM_CREATE:
{
...
hwndSlider = CreateWindow(TRACKBAR_CLASS,"",WS_CHILD | WS_VISIBLE |
TBS_NOTICKS,1,1,120,20,hwnd,(HMENU)0,
(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), NULL);
SendMessage(hwndSlider, TBM_SETRANGE, FALSE, MAKELONG(SLIDER_MIN,
SLIDER_MAX/SLIDER_DIV));
SendMessage(hwndSlider, TBM_SETPOS, TRUE,
DBGetContactSettingDword(NULL,SERVICENAME,"Volume",1000)/SLIDER_DIV);
oldSliderWindowProc = (WNDPROC)SetWindowLong(hwndSlider, GWL_WNDPROC,
(LONG)SubclassedSliderWindowProc);
...
}
}
LRESULT CALLBACK SubclassedSliderWindowProc(HWND hwnd, UINT msg, WPARAM
wParam, LPARAM lParam)
{
switch(msg)
{
case WM_ERASEBKGND:
XXX
return TRUE;
}
return CallWindowProc(oldSliderWindowProc, hwnd, msg, wParam, lParam);
}
--
Newsreader: http://mesnews.net/index-gb.php
Deutsche Hilfedatei: http://www.lastwebpage.de/download/mesnews-de.zip