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

牽著老婆滿街逛

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

DirectUI: Become windowless

轉(zhuǎn)載自: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 楊粼波 閱讀(1323) 評論(0)  編輯 收藏 引用


只有注冊用戶登錄后才能發(fā)表評論。
網(wǎng)站導(dǎo)航: 博客園   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>
            亚洲精品国产精品国自产在线| 亚洲国产婷婷综合在线精品 | 午夜精品免费| 日韩系列在线| 亚洲一区二区三区色| 亚洲午夜av| 欧美伊久线香蕉线新在线| 欧美与欧洲交xxxx免费观看| 久久精品99国产精品日本| 久久香蕉国产线看观看av| 欧美大片免费| 亚洲人在线视频| 亚洲亚洲精品三区日韩精品在线视频| 亚洲一级片在线观看| 久久精品二区三区| 欧美不卡视频一区| 欧美午夜精品久久久久久孕妇| 国产精品综合| 原创国产精品91| 国产精品99久久久久久久女警| 性色av一区二区三区在线观看 | 久久综合久久久久88| 久久亚洲色图| 欧美视频一区在线| 一区在线影院| 亚洲综合激情| 欧美国产另类| 亚洲一区二区三区影院| 久久久九九九九| 欧美午夜免费电影| 亚洲国产精品va在看黑人| 亚洲一区二区三区午夜| 美女啪啪无遮挡免费久久网站| 亚洲精选在线| 美女网站在线免费欧美精品| 国产精品va在线| 亚洲三级视频在线观看| 欧美在线在线| 在线中文字幕日韩| 欧美电影资源| 尤物在线精品| 久久久久久午夜| 亚洲四色影视在线观看| 欧美国产高清| 在线欧美视频| 久久久综合精品| 亚洲——在线| 国产精品扒开腿做爽爽爽视频| 亚洲国内精品| 免费影视亚洲| 欧美中文在线观看| 国产日韩欧美不卡| 午夜国产精品视频| 夜夜嗨av一区二区三区网站四季av| 久久夜色精品亚洲噜噜国产mv| 国产日韩欧美夫妻视频在线观看| 欧美天天视频| 亚洲精品乱码久久久久久蜜桃91 | 免费中文日韩| 久久久久国产精品厨房| 国产在线精品自拍| 久久阴道视频| 久久人人97超碰精品888| 国产一区av在线| 久久久xxx| 久久精品国产99| 伊人久久大香线| 欧美成人在线网站| 欧美电影在线| 在线一区二区三区四区五区| 亚洲国产一区二区视频| 欧美精品午夜| 亚洲男女自偷自拍| 亚洲综合二区| 激情视频一区二区| 亚洲国产成人高清精品| 欧美精品乱码久久久久久按摩| 一区二区三区精品在线 | 久久久久久久久岛国免费| 亚洲欧美中日韩| 一区二区三区自拍| 亚洲高清av| 国产精品二区二区三区| 午夜宅男欧美| 久久久久久伊人| 亚洲精品在线视频| 亚洲午夜久久久| 亚洲第一区在线| 亚洲精品中文在线| 国产精品一区二区a| 久久综合久久综合这里只有精品| 免费精品99久久国产综合精品| 在线综合+亚洲+欧美中文字幕| 亚洲欧美日韩天堂一区二区| 尤物在线观看一区| 夜夜嗨av一区二区三区中文字幕| 国产日韩高清一区二区三区在线| 久久午夜精品| 欧美午夜电影完整版| 久久琪琪电影院| 欧美日韩1区2区3区| 久久精品男女| 欧美日韩免费精品| 麻豆av福利av久久av| 欧美色视频在线| 欧美成年人网站| 国产精品自在线| 亚洲肉体裸体xxxx137| 国产亚洲欧美激情| 一本色道精品久久一区二区三区| 精品成人国产在线观看男人呻吟| aⅴ色国产欧美| 亚洲人成网站777色婷婷| 亚洲欧美日本在线| 国产精品日韩欧美综合| 免费国产自线拍一欧美视频| 国产精品成人av性教育| 欧美成人xxx| 国内精品免费在线观看| 亚洲网址在线| 亚洲视频日本| 欧美精品久久99| 欧美国产综合视频| 好吊成人免视频| 欧美一级网站| 欧美一区二区在线看| 欧美午夜精品一区| 99在线热播精品免费| 99re6热在线精品视频播放速度| 久久久久99精品国产片| 久久电影一区| 国产欧美日韩专区发布| 一区二区精品国产| 亚洲视频中文| 欧美色精品天天在线观看视频 | 欧美aⅴ99久久黑人专区| 久久久www成人免费毛片麻豆| 国产精品私房写真福利视频| 在线中文字幕一区| 亚洲欧美日韩在线| 国产精品普通话对白| 正在播放日韩| 欧美在线中文字幕| 国产一区二区三区丝袜 | 欧美一区亚洲| 久久久999| 激情六月综合| 麻豆av福利av久久av| 亚洲成人自拍视频| 亚洲国产精品一区二区三区| 六月天综合网| 亚洲精选视频在线| 亚洲欧美日韩直播| 国产香蕉久久精品综合网| 欧美自拍丝袜亚洲| 欧美大片在线看免费观看| 最新亚洲视频| 欧美三区在线| 欧美一区2区三区4区公司二百| 久久一区二区三区四区| 91久久精品视频| 欧美视频一区二区在线观看| 亚洲免费在线播放| 欧美+日本+国产+在线a∨观看| 亚洲精品一区二区三区福利| 欧美日韩精品二区第二页| 亚洲无亚洲人成网站77777| 久久久九九九九| 亚洲人精品午夜| 国产精品v欧美精品∨日韩| 亚洲欧美色一区| 欧美国产日韩在线| 亚洲欧美高清| 亚洲国产第一页| 国产精品家教| 久久婷婷综合激情| 亚洲手机成人高清视频| 欧美 日韩 国产 一区| 亚洲视频专区在线| 韩国一区电影| 午夜精品在线| 亚洲激情电影在线| 久久久噜噜噜久噜久久| 日韩午夜电影av| 极品av少妇一区二区| 欧美日韩一区在线观看视频| 久久久成人精品| 亚洲图片欧美一区| 91久久国产自产拍夜夜嗨| 久久精品五月| 欧美亚洲日本国产| 亚洲免费观看高清完整版在线观看| 国产精品久久久久久久午夜片| 男人插女人欧美| 久久九九热re6这里有精品| 亚洲视频在线观看| 亚洲美女诱惑| 亚洲欧洲三级| 欧美激情国产高清| 欧美电影免费观看|