The thing about scrollbars is that they aren't usually implemented as independent controls, their functionality is derived by most other classes.
Including WS_HSCROLL or WS_VSCROLL styles into a window causes scrollbars to be drawn based on private data inside the base window class.
So the best way to detect them would be to use GetWindowLongPtr(GWL_STYLE) like so:-
Code:
if (GetWindowLongPtr(GWL_STYLE) & (WS_HSCROLL | WS_VSCROLL))
MessageBox(NULL, "Scrollbars in here", NULL, MB_ICONINFORMATION);
else
MessageBox(NULL, "No scrollbars in here", NULL, MB_ICONERROR);