开发者

Howto make ListView items look like Microsoft supplied ones in WM 6.5.3?

开发者 https://www.devze.com 2023-01-10 02:20 出处:网络
Please see the screenshot above. The left part is WM 6 and the right is WM 6.5.3. In 6.5.3 there\'s an auto layout engine that fiddles with all controls to make them more touch-friendly. My documen

Howto make ListView items look like Microsoft supplied ones in WM 6.5.3?

Please see the screenshot above. The left part is WM 6 and the right is WM 6.5.3. In 6.5.3 there's an auto layout engine that fiddles with all controls to make them more touch-friendly. My documentation says this:

By default, Auto Layout is disabled for third-party applications. However. application developers can enable this feature by setting the following style flag in t开发者_如何学编程heir application: DS_EX_AUTOTOUCHLAYOUT (0x00200000L). When enabled, the Auto Layout engine will automatically set the style flag for each control so that the application supports finger-touch capabilities.

The DS_EX_AUTOTOUCHLAYOUT flag is defined in my 6.5.3 DTK headers:

#define DS_EX_AUTOTOUCHLAYOUT   0x01000000L

(Note that the doc and header value differ)

But no matter how I try to use that flag with forms (custom window class) or dialogs (DIALOG window class) from native or managed code, I just cannot get the look at the right side above for my ListView items. I only get the ordinary thin (height-wise) solid background items.

I've looked at 10 or so MS apps in the emulator with Remote Spy and some are owner drawn, but not even the majority, so that cannot be what's causing the snazzy looks. I cannot find any other consistent pattern either when looking at the MS supplied apps in Remote Spy.

How can I get my apps to behave as touch-friendly as the MS ones, and also look as nice?

Thanks!


The secret to the "new" list view item rendering has nothing at all to do with the auto-layout engine. Just send the list view a LVM_SETEXTENDEDLISTVIEWSTYLE message with both mask and style set to LVS_EX_THEME!

A few tips on customizing ListView in WM 6.5

0

精彩评论

暂无评论...
验证码 换一张
取 消