NewEra - ScrollBars & Win32API
Posted in 1997
Hi all - Thanks to help from a bunch of you, Ive successfully created a class to attach Horizontal & Vertical Scrollbars to my application. It was quite easy actually, but the problem is this: Now Ive got these great ScrollBars and cant do anything with them! How do I manipulate my code so that it recognizes the scrollbar events? I belive I should use getScrollInfo(), setScollInfo(), scrollWindowEx(), etc. but im lost. The examples Im looking at in the Win32 API SuperBible create a mainWin() which somehow interracts with the following function: LRESULT CALLBACK WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) ... This function seems to be sent "messages" after each event the user triggers and within WndProc you can put a case statement if the user has hit the scrollbar, IE: case WM_HSCROLL : getClientRect() scrollWindowEx() etc. My questions are these: 1) Am I understanding WndProc correctly or am I completely off base? 2) If so, How can I call WndProc from my NewEra Application? 3) Is there a differant/better way to do this? Thanx in advance! Any light which can be shed on this subject will be greatly appreciated.