青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

牽著老婆滿街逛

嚴以律己,寬以待人. 三思而后行.
GMail/GTalk: yanglinbo#google.com;
MSN/Email: tx7do#yahoo.com.cn;
QQ: 3 0 3 3 9 6 9 2 0 .

DirectUI: Become windowless

轉載自:http://www.viksoe.dk/code/windowless1.htm

UI: Become windowless

A request on the Yahoo WTL newsgroup and a blog-article sparked some interest to look closer at creating a windowless user-interface. Traditionally, Windows applications are built upon the GDI/User windowing hierarchy, and thus restricted in several areas. While you can certainly generate a nice application quickly with the built-in control-set and get a standard clean look, you will soon enough stumble upon the limitations of the Windows controls - especially if you want to build something that looks a little more flashy. The native Win32 custom-draw/owner-draw technique is limited, next to no support for transparent windows, rigid control scaling/resizing and the Common Controls are merely remnants of Windows Explorer, Office or Internet Explorer widgets.

A windowless user-interface doesn't make use of the native Win32 controls. Instead it custom paints every control and widget on the screen - including labels, buttons, list control, etc. etc. Variations of this kind of interface is not new: "Skinning" has been widely accepted for its cool application-look, as seen in Nullsoft's WinAmp and the MS Media Player. But skinning is usually only feasible for small applications hosting a limited number of dialogs. If you're building a large database-driven application, you'll want to have a solid framework to back your dialog design up.

So I was looking at the Microsoft CRM application. In my opinion, this is one of the most successful DHTML interfaces I've seen (I should know because I've previously been assigned on a large browser-based CRM product). The MS CRM interface looks very Windows XP-like, but it also has several cool features, such as a navigation bar, a highly flexible list control and several shaded/gradient tool panels. I thought this would be a nice look to build for my windowless framework. I've previously tested a DHTML interface with this look, but wasn't satisfied - mostly because integrating with the browser (IE) was painfully complicated.

Direct UI sampleEven if constructing a windowless user-interface is a lot of hard work, it pays off in the end. But you do need to implement your own dialog builder, button-design, keyboard interface and lots of little things you take for granted. Actually it's not the painting of buttons and toolbars that take the most planning and effort; it's supporting keyboard shortcuts, tab-navigation, automatic tooltips and a scalable design. And then there are the mandatory - but often overlooked - features, such as list column-sorting, intuitive focus changes and overflow scrolling that need to be addressed.

The design

My Direct UI user-interface takes bits and pieces from other UI models. Specifically it borrows ideas of the "controls-inside-controls" design from the Java AWT framework, XML dialog-resources from .NET, event-bubbling from DHTML and C++ helper classes from MFC.

The code doesn't actually use the WTL library like most of my other user interface samples on this website. It's pure Win32 calls. 
One of the requirements for the framework was that it could be placed in an external DLL. This had a nasty impact on the design, because C++ templates are not by any sane method exportable in a DLL. So, a clean C++ old-skool (MFC) design is enforced, with single inheritance and few (if not none) macros. 
A window is built by nesting controls inside each other. Some controls are containers (such as the ToolBar, which contains ToolButtons). To insert a ToolBar button, you simply construct a CToolButton C++ class and add it to theCToolPanel control container. Most containers define layout algorithms such as the vertical layout-panel, which arranges the contained elements below each other - a feature known from Java AWT.

Using a Java-like design, such as the layout containers, make sure that your controls will rescale automatically when the window is resized. But anyone who has done any Java development knows how limiting its control layout features are and has wished to kick the authors of the GridBagLayout class in the nuts. So there's also room for a dialog layout-panel, which allows you to put controls at a fixed position, but with the option of scaling based on various stretching rules. 
Constructing an entire window by hand is tedious, so there's a small XML parser included (extremely fast, extremely non-compliant) which parses and builds a window from an XML string. 
The framework caches all of its Win32 brushes and pens. Most of the GDI resources saved on window handles are probably spent on this. But these kinds of objects are light-weight; it's the paint job that gets an incredible overhaul. 
Native Win32 controls are used only for the EDIT control. This control contains so much functionality that it would take ages to do a decent replacement. Single-line edit controls are created on the fly (when you click on the frame) and multi-line edits are always visible. So the framework does have the ability to embed native Win32 controls and even ActiveX controls, but at the expense of screen flickering and severe restrictions in the visual effects I'm planning.

Alluring text

The real benefits of this type of interface are the simple things. For instance, you can with one single swoop replace all occurences of Win32 DrawText() with DrawPrettyHtmlFormattedText() - which instantly gives you icons, customizable text-colors and clickable hyperlinks in the entire user-interface. With one single line of code, you can now add HTML links in the statusbar panel. 
Similar, you are not restricted to only put CToolButton controls inside the ToolBar. Any kind of control can be added. This also goes for the list control, which quickly can be made cool by adding some group-labels, or just by adding buttons or HTML links. Since the individual controls rarely erase the background, most of them will actually fit transparently inside the other container controls, so once you've made a neat widget it can be reused in the entire user interface.

3D Animations

Another cool effect that can be easily added is the ability to do 3D rendering directly on the canvas. Just throw in some DirectX calls and you'll be able to write cool page transitions, highlight a control with some cool sparkling particle-effect or just put some glow effect on the edit-box with focus. 
You can also read about how I integrated DirectX into the application.

The sample

This may all sound very nice. However, the sample presented here is just the initial stage of a windowless framework I'll use for further testing. The library will need to mature a bit and go through a few rewrite cycles before I'll attempt to actually incorporate it in a real application. Still, it's pretty functional already. Enjoy.

The sample should be run with DirectX 9 installed and a modern 3D graphics card. Otherwise you will not be able to view the pretty 3D animations.

Source Code Dependencies

Microsoft Visual C++ 6.0
Microsoft DirectX 9 SDK

Download Files

DownloadDemonstration (91 Kb)
Source Code (126 Kb)


Written by Bjarke Viksoe.
Article submitted 6/26/2005.

posted on 2010-10-20 19:05 楊粼波 閱讀(1326) 評論(0)  編輯 收藏 引用


只有注冊用戶登錄后才能發(fā)表評論。
網(wǎng)站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            国产精品一区二区你懂得| 国产日韩在线看| 在线综合亚洲| 亚洲日本在线观看| 欧美日本在线一区| 亚洲香蕉伊综合在人在线视看| 亚洲精品视频在线| 国产精品福利在线| 欧美综合国产| 久久久久久亚洲精品杨幂换脸| 亚洲电影专区| 一级成人国产| 国内精品免费在线观看| 嫩草影视亚洲| 欧美视频在线观看免费网址| 香蕉亚洲视频| 美女在线一区二区| 亚洲一区二区三区精品动漫| 欧美一级艳片视频免费观看| 亚洲第一区在线观看| 亚洲美女91| 国内精品久久久久久| 亚洲国产美女久久久久| 国产精品免费一区二区三区在线观看| 久久精品亚洲一区二区| 欧美刺激午夜性久久久久久久| 亚洲一区二区欧美| 久久手机精品视频| 亚洲一区二区三区在线| 久久美女性网| 亚洲一区日本| 免费观看不卡av| 香蕉久久一区二区不卡无毒影院| 老**午夜毛片一区二区三区| 性欧美大战久久久久久久久| 欧美成ee人免费视频| 久久国产精品电影| 欧美日韩精品福利| 欧美大片91| 国产欧美日韩免费看aⅴ视频| 亚洲人成网站精品片在线观看 | 亚洲欧美日韩一区在线观看| 亚洲国产精品久久久久秋霞不卡 | 嫩草国产精品入口| 国产农村妇女精品一二区| 亚洲黄色视屏| 黄色日韩精品| 性色av一区二区三区红粉影视| 中文欧美日韩| 欧美激情按摩| 亚洲黄色三级| 亚洲国产精品视频| 久久成人精品无人区| 亚洲综合日韩在线| 欧美日韩国语| 亚洲精品一线二线三线无人区| 亚洲国产精品久久| 久久精品女人| 久热精品视频在线| 国产中文一区二区| 欧美在线播放一区| 久久国产一区二区三区| 国产精品男人爽免费视频1 | 久久视频国产精品免费视频在线| 国产精品v日韩精品v欧美精品网站| 亚洲国产精品va在线看黑人动漫| 亚洲高清在线视频| 久久一区欧美| 91久久国产综合久久91精品网站| 精品成人国产| 免费一级欧美片在线观看| 欧美成人免费va影院高清| 伊人久久婷婷色综合98网| 久久久国产亚洲精品| 久久久爽爽爽美女图片| 激情久久综艺| 久久综合99re88久久爱| 欧美激情精品久久久久久免费印度| 亚洲福利视频在线| 欧美日韩精品在线观看| 99综合精品| 欧美专区日韩专区| 激情久久久久| 欧美电影免费观看高清完整版| 91久久中文| 午夜精品免费在线| 国产亚洲欧美一区| 美女日韩欧美| 一区二区三区视频在线看| 久久激情网站| 亚洲国产第一页| 欧美日韩理论| 欧美一区中文字幕| 亚洲承认在线| 午夜国产精品视频| 亚洲国产精品久久久久秋霞蜜臀| 欧美喷水视频| 欧美在线日韩| 亚洲美女啪啪| 久久久久久久久一区二区| 91久久亚洲| 国产精品亚洲一区二区三区在线| 六十路精品视频| 亚洲视频在线观看网站| 免费欧美网站| 小处雏高清一区二区三区| 亚洲欧洲精品成人久久奇米网| 欧美精品一区二区三区蜜臀| 亚洲午夜日本在线观看| 欧美黄色一区二区| 欧美一区二区日韩一区二区| 亚洲精选一区二区| 国产亚洲欧美一区在线观看| 欧美精品一区二区三| 久久精品欧洲| 亚洲尤物视频网| 亚洲日本成人网| 嫩草伊人久久精品少妇av杨幂| 亚洲欧美激情四射在线日 | 激情欧美一区二区三区| 欧美日韩亚洲网| 久久综合伊人77777蜜臀| 亚洲男女自偷自拍| 亚洲区一区二区三区| 老司机一区二区| 久久久久高清| 亚洲欧美三级伦理| 一区二区三区高清在线观看| 亚洲第一在线综合网站| 国产一区二区三区在线观看视频| 欧美日本韩国一区| 欧美成人免费在线| 久久综合一区二区| 久久米奇亚洲| 久久看片网站| 午夜视频在线观看一区二区三区 | 欧美亚洲一区三区| 亚洲一区二区三区高清 | 久久精品一区二区三区中文字幕| 在线视频免费在线观看一区二区| 亚洲激情一区二区三区| 欧美国产先锋| 欧美成人午夜激情| 欧美电影免费网站| 欧美国产第二页| 欧美成人免费在线| 欧美激情导航| 亚洲精品久久久久久久久久久久| 亚洲高清视频的网址| 欧美电影专区| 亚洲精品一区二区三区婷婷月| 亚洲国产欧美久久| 亚洲日本激情| 一个人看的www久久| 亚洲午夜在线| 亚洲男女毛片无遮挡| 欧美亚洲一区| 免费观看一区| 欧美日韩免费高清一区色橹橹| 欧美视频在线观看免费| 国产精品电影观看| 国产日韩视频一区二区三区| 红桃视频成人| 最新日韩在线视频| 亚洲自拍都市欧美小说| 欧美一区成人| 欧美+亚洲+精品+三区| 亚洲国产精品99久久久久久久久| 亚洲人成绝费网站色www| 亚洲性夜色噜噜噜7777| 久久国产直播| 欧美阿v一级看视频| 国产精品久久久一本精品| 国产亚洲欧洲997久久综合| 亚洲第一毛片| 亚洲综合导航| 欧美成人免费在线视频| 99精品黄色片免费大全| 久久精品女人的天堂av| 欧美日韩国产欧| 韩国一区电影| 亚洲一级电影| 欧美国产日韩在线| 中日韩在线视频| 免播放器亚洲一区| 国产女主播视频一区二区| 亚洲激情视频在线播放| 久久xxxx| 日韩一级免费观看| 另类尿喷潮videofree | 蜜桃伊人久久| 国产精品视频一区二区三区| 亚洲高清在线视频| 久久爱www久久做| 亚洲伦理在线免费看| 欧美制服丝袜第一页| 欧美天天视频| 一区二区电影免费观看| 美日韩免费视频| 性8sex亚洲区入口|