C++ WINAPI - Draw ListView without borders -
i'm having little trouble.
for parent window used dimensions 920x570. listview 900x500.
viewing @ dimensions, 1 there quite borders, not in reality. if use same dimensions quite big part of listview cuted off. try find exact values give me "borderless" listview, when thing different in windows xp (we talking 5-10 pixels).
is there right way draw listview "borderless" natively work on platforms?
they picture worth thousands of words... here goes
you have distinguish between window size , client size. if parent window 920x570, these outer dimensions. client area smaller , that's need set listview's dimension to make fit nicely in entire area.
have @ getclientrect function. need set listview's dimensions using funcion.
edit
your code follows
hwnd outerwnd = createwindowex(...); rect clientrect; getclientrect(outerwnd, &clientrect); hwnd listview = createwindowex(..., wc_listview, "", ws_child|..., 0, 0, clientrect.right, clientrect.bottom, outerwnd, null, hinstance, null); with getclientrect, right , bottom members of rect struct width , height of window, respectively.
Comments
Post a Comment