A while back I'd posted the question "How does one resize a child window on a rebar?" No one knew, there was no documentation I found in my searches, and while a few helpful suggestions pointed in a few ways, ultimately, no answer was found. So maybe a month ago I stopped looking. Until this morning, when I awoke with a new idea to try. Yep, it worked too, and is actuall very simple. Here it is on PROC form:
That's it, the rebar will refresh itself when it gets the 2nd message. Now, with this down, I can go onto resizing all the controls places on the same band The code for that is rather long and messy (99 code lines), but uses no resources beyong a few alloc-ed bytes, but needs a real tut to explain how it do what it do.
ResizeRebarBand PROC hRebar:DWORD, cIndex:DWORD, cPixels:DWORD LOCAL rbi:REBARBANDINFO mov rbi.cbSize, SIZEOF REBARBANDINFO mov rbi.fMask, RBBIM_CHILDSIZE invoke SendMessage, hRebarLeft, RB_GETBANDINFO, cIndex, ADDR rbi add rbi.cyMinChild, cPixels add rbi.cyMaxChild, cPixels invoke SendMessage, hRebarLeft, RB_SETBANDINFO, cIndex, ADDR rbi ret ResizeRebarBand ENDP