Session: What’s new with user32 and conctl32 in win32

talks about the present vista, stuff that’s available today
8 things you didn’t know you had
double-buffered painting
cross-fade animation helper
list view tiles
list view grouping
cue banners and empty text
images next to menu items
icon scaling

double-buffering helpers
//wm_create
bufferedpaintinit();
//wm_destroy
bufferedpaintuntnit()
//wm_paint
hdc = beginpaint(hwnd, &ps);
hbuffer =beginbufferedpaint(…,&hdc)
paintcontent(hwnd, hdc):
endbufferedpaint(hbuffer, true);
endpaint(hwnd, &ps);

Demo double buffering
advanced double-buffering
bp_bufferformat
bp_paintparams
getbufferedpaintbut
bufferedpaintsetalpha

cross-fade animation helpers
identify and isolate states
draw based on state as parameter
maintain last-drawn and current states
bufferedpainstopallanimations

Demo cross fade animation

Windows 7 content
-new animation engine
-new text and graphics apis
-hands-on lab

List view tiles
-richer item view than icon and label
easier to read than report view but takes up more space
listview_setview(LV_view_tile)

Demo list view tile

controlling list view tiles
specify how many additional lines of text you want to display in the tile
for each item, specify which columns you want to show as additional text
optically set fixed tile size and margins

listview extended tiles don’t work.

windows xp list view grouping
-create groups(listview_insertgroup)
listmode doesn’t like groups

grouping traps
-don’t forget to assign items to groups
-create groups before adding items to them
don’t give two groups with same ID

windows vista list view grouping
-group subtitles(lvgf_subtitle)
group footers
collapsible groups

cue banners
em_setcuebanner
cb_setcubanner

alpha-blended menu bitmaps
-menuiteminfo.hbmitem and miim_bitmap
-32bpp pargb format supported in vista via dibsection
don’t forget to dleteobject it

Icon scaling
loadiconwithscaledownimplement a new scaling algorithm
-icon must include images at sizes 16,32,48, 256
loadimage/icon still use old algorithm
shdefetraction uses new algorithm

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s