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

牽著老婆滿街逛

嚴以律己,寬以待人. 三思而后行.
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 楊粼波 閱讀(1328) 評論(0)  編輯 收藏 引用


只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   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>
            日韩午夜在线播放| 欧美黄色aa电影| 一区二区三区 在线观看视频 | 亚洲一区视频| 久久综合狠狠综合久久综青草| 午夜精品久久久久久久久久久| 蜜臀久久99精品久久久久久9| 久久不射中文字幕| 国产精品成人一区二区三区夜夜夜 | 老鸭窝毛片一区二区三区| 亚洲欧美日韩第一区| 欧美另类亚洲| 亚洲国产成人精品久久| 国产一区二区久久| 亚洲综合久久久久| 午夜精品久久久久| 国产精品久久一卡二卡| aⅴ色国产欧美| 中国av一区| 欧美日韩一区二区高清| 亚洲每日在线| 亚洲性夜色噜噜噜7777| 欧美日韩在线播放一区二区| 亚洲精品一区二区三区av| 99国产精品99久久久久久粉嫩| 噜噜噜久久亚洲精品国产品小说| 老司机午夜精品视频| 在线成人欧美| 欧美激情第五页| 亚洲人人精品| 亚洲综合激情| 国产日韩欧美一区二区| 香蕉久久夜色| 欧美成人精品一区| 亚洲美女91| 国产精品sss| 亚洲欧美日韩高清| 久久婷婷色综合| 亚洲日本成人网| 国产精品第一页第二页第三页| 制服丝袜亚洲播放| 久久午夜影视| 亚洲日本电影在线| 国产精品久久午夜夜伦鲁鲁| 亚洲欧美日韩国产| 欧美aⅴ99久久黑人专区| 亚洲另类自拍| 国产毛片一区二区| 美国十次了思思久久精品导航| 亚洲国产三级网| 先锋资源久久| 亚洲电影免费观看高清完整版在线 | 亚洲一区二区三区精品在线| 久久久久久九九九九| 亚洲国产乱码最新视频| 欧美视频在线视频| 久久久久久久网站| 日韩一级裸体免费视频| 久久精品中文字幕一区| 99re在线精品| 国产在线不卡视频| 欧美日韩精品一区| 久久精品成人| 亚洲午夜精品福利| 欧美电影在线观看| 欧美在线观看视频在线| 亚洲肉体裸体xxxx137| 国产精品永久免费在线| 欧美成人免费一级人片100| 亚洲欧美日韩综合| 亚洲美女中出| 噜噜爱69成人精品| 午夜日韩在线观看| 亚洲靠逼com| 在线精品国产欧美| 国产午夜一区二区三区| 欧美日韩在线播放三区四区| 理论片一区二区在线| 西西裸体人体做爰大胆久久久| 亚洲精品国产欧美| 嫩模写真一区二区三区三州| 欧美在线影院在线视频| 中文一区二区在线观看| 亚洲激情午夜| 亚洲国产精品va在线看黑人 | 男同欧美伦乱| 久久蜜桃av一区精品变态类天堂| 亚洲一区视频在线| 在线亚洲一区二区| 亚洲美女电影在线| 亚洲人成人99网站| 在线成人av网站| 今天的高清视频免费播放成人| 国产精品美女999| 国产精品久久久久国产a级| 欧美激情综合亚洲一二区| 美女亚洲精品| 老鸭窝91久久精品色噜噜导演| 久久精品91| 久久久夜精品| 久久久一区二区| 久久久女女女女999久久| 欧美亚洲综合在线| 久久99在线观看| 欧美中在线观看| 久久久久国产精品麻豆ai换脸| 欧美亚洲一级| 久久精品亚洲一区| 久久伊人精品天天| 蘑菇福利视频一区播放| 欧美精品www在线观看| 欧美国产亚洲视频| 欧美日韩一二三四五区| 欧美午夜寂寞影院| 国产精品一区二区你懂得 | 国产一区av在线| 国产综合色一区二区三区| 好吊成人免视频| 在线成人激情视频| 亚洲精一区二区三区| 亚洲视频导航| 欧美一区午夜精品| 美国十次了思思久久精品导航| 免费成人网www| 亚洲高清在线| 亚洲一区欧美| 久久久久久久久久久成人| 蘑菇福利视频一区播放| 欧美日韩中文字幕精品| 国产精品一卡二卡| 在线欧美电影| 亚洲午夜激情在线| 欧美中文字幕视频在线观看| 欧美18av| 一区二区三区**美女毛片| 欧美在线亚洲在线| 欧美美女日韩| 国产亚洲一区二区三区| 亚洲欧洲日韩综合二区| 亚洲欧美日韩一区二区| 久久一区二区三区av| 亚洲精品国久久99热| 午夜伦欧美伦电影理论片| 免费欧美高清视频| 国产精品亚洲综合一区在线观看| 一区免费在线| 亚洲免费视频在线观看| 欧美大片在线观看一区二区| 夜夜嗨av一区二区三区四季av| 久久精品二区| 国产精品久久久久9999| 亚洲国产精品成人精品| 性欧美办公室18xxxxhd| 亚洲激情视频在线| 久久精品日韩| 国产精品永久入口久久久| 99riav国产精品| 另类av一区二区| 亚洲午夜精品一区二区三区他趣| 免费国产一区二区| 国产亚洲欧美日韩在线一区| 在线视频欧美一区| 欧美高清视频一二三区| 午夜精品理论片| 国产精品二区影院| 一本久久青青| 欧美激情亚洲| 久久久久久一区| 国产精品亚洲аv天堂网| 一本一本久久a久久精品综合妖精| 久久久久久久999| 亚洲自拍16p| 国产精品qvod| 亚洲一区二区网站| 亚洲日本成人在线观看| 免费成人高清在线视频| 黄色成人在线网址| 久久久97精品| 午夜欧美不卡精品aaaaa| 国产精品嫩草久久久久| 亚洲视频成人| 一区二区三区**美女毛片| 欧美精品在线极品| 亚洲精品视频一区| 亚洲第一页自拍| 欧美成人精品在线| 在线观看欧美日韩国产| 久久综合色婷婷| 久久视频在线看| 亚洲国产成人精品久久| 欧美高清在线一区| 蘑菇福利视频一区播放| 最新亚洲视频| 亚洲毛片播放| 国产精品久久久久久久久久尿| 亚洲欧美视频在线| 午夜精品美女自拍福到在线| 国产一区视频在线观看免费| 久久久久久久久久久久久久一区| 欧美中文字幕在线播放|