How can I take control ID from Spy++?

Visual Studio44
Hi dear!

I'd like to move a scrollbar's tap to end of range which is refered to

CFileDialog.

In order to that, I have to use GetScrollRange(,) and SetScrollPos(,) in

CFileDialog class.



So far, I couldn't connect to GetScrollRange function because

didn't know the scrollbar's real control ID.

Someone said me that I should handle the Spy++ application program.

But still I couldn't succeed.

Hope anyone would help me please.



--- problem code in my program-----

CFileDialog dlg(TRUE, sFi , NULL,

OFN_HIDEREADONLY|OFN_NOCHANGEDIR|

OFN_ALLOWMULTISELECT,//|OFN_VALIDATE, NULL, this);



SCROLLINFO scrInfo;

int nPos, nMin;

HWND hDlg = dlg.m_hWnd;

dlg.GetScrollRange(SB_HORZ, &nMin, &nPos);

nPos = scrInfo.nMax;

dlg.SetScrollPos(SB_HORZ, nPos);



This didn't fine out right valuse for nMin and nPos.

I would be very happy if anyone replay me any answer concering it,


-