void ideal_szd( WINDOW *win) { void std_szd( WINDOW *); win->xpos_max = <new value>; win->xpos = <new value>; /* a new value for xpos_max implies a new value for ypos_max */ win->ypos_max = <new value>; win->ypos = <new value>; std_szd( win); /* do not invent the wheel ! */ }without forgeting to attach this function to the window with something like:
EvntAttach( win, WM_SIZED, ideal_szd);As you can see, the Windom intern managing of sliders is robust: you just have to write two functions and use the standard functions. Have a look at these standard functions std_szd() and std_fld() in the source code (file STDCODE.C). These functions are quite complex because they support three kind of situation.