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

牽著老婆滿街逛

嚴(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>
            裸体丰满少妇做受久久99精品| 欧美在线欧美在线| 欧美日本不卡高清| 亚洲午夜久久久久久久久电影院 | 亚洲一区欧美二区| 国产嫩草一区二区三区在线观看| 欧美中文字幕| 久久久在线视频| 亚洲精品一区在线| 在线亚洲高清视频| 韩国精品在线观看| 亚洲另类视频| 国外成人在线视频| 亚洲国产日韩欧美| 国产精品成人一区二区三区夜夜夜| 香港久久久电影| 老司机久久99久久精品播放免费| 一区二区av在线| 欧美在线免费观看视频| 亚洲美女黄色片| 先锋资源久久| 亚洲最快最全在线视频| 亚洲欧美激情精品一区二区| 亚洲高清久久网| 亚洲欧美日韩精品一区二区| 伊人男人综合视频网| av成人动漫| 亚洲激情影院| 午夜久久tv| 亚洲特级毛片| 女仆av观看一区| 久久精品人人做人人爽| 欧美日韩成人在线视频| 免费试看一区| 国产亚洲欧美日韩在线一区| 亚洲精品久久视频| 在线日韩av| 欧美影院成人| 欧美亚洲专区| 欧美性生交xxxxx久久久| 噜噜噜噜噜久久久久久91| 国产精品久久影院| 亚洲精品一区二区三区婷婷月 | 国产精品专区h在线观看| 欧美国产乱视频| 国产主播精品| 欧美一区二区高清在线观看| 亚洲一区二区三区激情| 欧美极品在线视频| 亚洲成人自拍视频| 在线观看视频一区| 久久av二区| 久久久xxx| 国产视频一区在线观看| 亚洲综合欧美| 欧美在线视频免费| 国产精品剧情在线亚洲| 中文国产成人精品| 亚洲婷婷国产精品电影人久久| 欧美国产一区二区| 亚洲第一页自拍| 亚洲肉体裸体xxxx137| 久久综合久久综合久久| 免费日韩av片| 亚洲精品国偷自产在线99热| 欧美国产激情| 亚洲精选视频免费看| 这里只有精品视频在线| 欧美亚州韩日在线看免费版国语版| 亚洲精品一区在线观看香蕉| 一区二区三区视频在线观看| 欧美图区在线视频| 中文国产一区| 久久成人人人人精品欧| 韩国一区二区三区在线观看| 老司机午夜免费精品视频| 欧美搞黄网站| 亚洲女ⅴideoshd黑人| 国产伦精品一区二区三区在线观看| 午夜视频在线观看一区二区| 久久一区精品| 99国产精品国产精品久久| 欧美日韩综合网| 性欧美精品高清| 欧美激情va永久在线播放| 日韩亚洲欧美成人| 国产精品高潮呻吟| 久久精品国产免费| 亚洲日本欧美日韩高观看| 午夜免费久久久久| 伊人精品在线| 欧美性猛交99久久久久99按摩| 欧美亚洲在线视频| 亚洲国产视频一区| 欧美在线一二三区| 亚洲精选久久| 国产揄拍国内精品对白| 欧美高清不卡在线| 欧美一区二区大片| 亚洲麻豆视频| 免费亚洲网站| 羞羞视频在线观看欧美| 最新69国产成人精品视频免费| 国产精品久久久久久久久果冻传媒 | 日韩午夜三级在线| 国产资源精品在线观看| 欧美日韩福利在线观看| 久久精品夜夜夜夜久久| 一区二区三区精品视频| 美女任你摸久久| 欧美在线观看网站| 夜夜躁日日躁狠狠久久88av| 激情欧美日韩| 国产精品影片在线观看| 欧美日韩国产综合新一区| 久久久久久尹人网香蕉| 亚洲小说区图片区| 亚洲精品你懂的| 久久久久久尹人网香蕉| 亚洲影院污污.| 一区二区三区视频观看| 亚洲日本视频| 亚洲国产另类 国产精品国产免费| 国产精品无码永久免费888| 欧美日韩视频一区二区三区| 欧美大片一区二区三区| 久久网站热最新地址| 欧美永久精品| 欧美综合国产| 久久九九热re6这里有精品| 午夜精品久久久久久久| 亚洲欧美日韩精品久久久| 亚洲一区二区三区视频播放| 一本大道久久a久久精品综合 | 亚洲免费综合| 亚洲欧美日本精品| 亚洲欧美国产高清va在线播| 亚洲一区黄色| 亚洲免费综合| 久久激情视频久久| 久久精品中文字幕一区二区三区 | 亚洲国产精品成人一区二区| 伊伊综合在线| 亚洲国产成人久久综合| 亚洲国产精品一区制服丝袜 | 国产欧美一区二区三区在线老狼 | 亚洲一区激情| 欧美一级大片在线观看| 欧美影院午夜播放| 久久婷婷综合激情| 欧美不卡一卡二卡免费版| 欧美国产日本韩| 日韩视频欧美视频| 亚洲一级黄色av| 久久国产精品久久w女人spa| 久久露脸国产精品| 欧美黄色日本| 国产精品爽黄69| 一区福利视频| 日韩午夜免费视频| 亚洲欧美美女| 久久一本综合频道| 最新国产成人av网站网址麻豆| 日韩亚洲成人av在线| 午夜国产精品视频| 久久影音先锋| 欧美性猛片xxxx免费看久爱 | 国产美女精品一区二区三区| 伊甸园精品99久久久久久| 亚洲日本成人| 欧美在线3区| 亚洲激情视频| 午夜日韩在线观看| 欧美国产日韩a欧美在线观看| 国产精品免费福利| 亚洲第一狼人社区| 亚洲欧美综合精品久久成人| 欧美成人福利视频| 亚洲天堂av图片| 欧美成人一区二区三区| 国产精品免费电影| 亚洲毛片一区| 久久综合网色—综合色88| 99re热这里只有精品免费视频| 久久er精品视频| 欧美性色aⅴ视频一区日韩精品| 在线播放中文字幕一区| 午夜久久99| 亚洲精品欧美| 久久久av毛片精品| 国产精品久久久久一区二区| 亚洲欧洲偷拍精品| 久久久精品国产免费观看同学| 99精品99| 欧美激情一二三区| 1024精品一区二区三区| 欧美在线网站| 亚洲欧美日韩精品久久久| 欧美日本一区二区高清播放视频| 在线观看欧美一区|