A new software interface design method (continued)

xiaoxiao2021-03-06  82

A new software interface design method (continued)

Click to download the article attached to the article

Written: aw Ready

You can reprint, copy, but you must join the author's signature Aweay. If you are used for commercial purposes, you must agree.

Some time ago, the author wrote an article on using the web page design for Win32 applications, please click here to refer to this article. But a pity, many netizens send Mail, don't know what I wrote, is not a design web page, why is there a "new"? And netizens present how to implement the custom protocols like Internet Flying Sounds. For example, the browser will handle the address of DNMP: // cmd / 15 after installing the Internet, and open the Internet, and ask I can Also realized with the methods mentioned in my text? What else is also a kind of thing, I have forgotten. For this purpose, the author decided to continue, supplement some things, and try to solve the problem of the above netizens. If you haven't seen the article above, I suggest you first refer to it first, in fact, I think it is very clear, if you already Is the old reader, then we continue.

First of all, the interface design technology discussed in the text is rarely seen in domestic software. In well-known software, I have seen Windows, Visual Studio.Net IDE tools, Norton Anti Virus, Borland C # Builder, but said It is also very small, although there is a fresh software uses such a technical design interface, I personally think this is a direction in the design of the software interface, or the trend, so try to study such technologies and introduce it to everyone, if you I still don't understand, I use cyberarticle (because some people ask some parts of this software, I installed it, I found it very good).

This interface is a technical article used to display user collection. In traditional interface design, we can use ListView32 to implement, but the InternetExplorer_server used here is the web page. If you click "Move to ..." button, it will Pop up a dialog (local code), as shown:

We know that you can't call local code directly in the webpage. Of course, you can use COM, but in my article, I haven't used COM in my article, so I don't use COM, then what he did ? what are the benefits? Oh, these problems have introduced in the above article, please click here to refer to this article.

This is this technique, combined with the simplicity of the web performance interface, and makes the flexibility used by the interface, or this software, if we open a collection article, the connection address of the web page is similar to the address of Cyberaticle: // 15. Not our common URL address (this is someone else's problem, ask me why? How to implement it), click this address after the software will open a local temporary web page, which is a user collection article, is it very attractive? If you carefully consider this software's implementation, I want to do this.

In fact, if you look at my last article, this problem is solved. In the last article, we mentioned that IdochostuiHandler has a lot of virtual methods. After the overload implementation, you can customize the browser's function, there is a virtual in IdochostuiHandler. Method: TranslateURL, this method can give programmers once an opportunity to resolve the URL address, this is what we judge is the URL we need to be parsed. If it is, if so, get the back information to do corresponding processing, if not the same Return to IE. The code is as follows: Virtual HRESULT stdmethotcallType TranslateURL

/ * [in] * / dword dwtranslate,

/ * [in] * / olechar __rpc_far * pchurlin,

/ * [out] * / olechar __rpc_far * __ rpc_far * ppchurnout) {

String addr = wideString (pchurlin);

IF (addr.substring (1,5) == "siney")

{

Wchar * home = l "http://siney.nease.net/index.htm";

Wchar * Soft = L "http://siney.nease.net/myproj/mysoft.htm";

Wchar * article = l "http://siney.nease.net/dialy.htm";

Wchar * nd = 0;

String section = addr.substring (9, 10);

IF (section == "home /")

Nd = home;

Else IF (section == "SOFT /")

Nd = SOFT;

Else IF (section == "article /")

Nd = article;

Else

Return S_FALSE;

SIZE_T LN = WCSLEN (ND);

* PPCHURLOUT = (LPolestr) CotaskMemalloc ((ln 1) * sizeof (wchar));

WCSCPY (* PPCHURLOUT, ND);

Return S_OK;

}

Else

Return S_FALSE;

}

In the above code, we handle the type of protocol URL address with siney: //, other ignore, to this, we design such an HTML code: