c++ - Detect that Horizontal Scroll is visible or not -
c++ - Detect that Horizontal Scroll is visible or not -
i have wxwidget application , have created scrolled window
wxscrolledwindow *pscrollingbucket = new wxscrolledwindow(this, wxid_any); wxpanel* ppanel1 = new wxpanel(pscrollingbucket , wxid_any); wxpanel* ppanel2 = new wxpanel(pscrollingbucket , wxid_any); wxboxsizer* psizerhorz = new wxboxsizer(wxhorizontal); psizerhorz->add(ppanel1 , 1, wxgrow|wxall, 0); psizerhorz->add(ppanel2 , 1, wxgrow|wxall, 0); pscrollingbucket->setsizer(psizerhorz); pscrollingbucket->fitinside(); pscrollingbucket->setscrollrate(3, 0);
every thing working expected. on total screen there no scroll, when doing resizing little size, scroll comming, , getting onsize() event handler of main window. in onsize() want observe scroll bar visible or not. help plain win32 api accepted.
do not suggest hasscrollbar(), tells window has wxhscroll creation flag or not.
try plain win32 code:
function isscrollbarvisible(awindow: hwnd; avert: boolean): boolean; var code: integer; info: tscrollinfo; begin if avert code := sb_vert else code := sb_horz; code := sb_vert; info.cbsize := sizeof(info); info.fmask := sif_range or sif_page; getscrollinfo(awindow, code, info); result := (info.nmin <> info.nmax) , (info.npage <= info.nmax); end;
c++ winapi wxwidgets
Comments
Post a Comment