锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
msdn鍏充簬xml element
浣嗗浜庝笉瑙勫垯鐨剎ml鏂囦歡錛屾垜姝繪椿鎵句笉鍒頒嬌鐢ㄦ暟鎹矝鐨勬柟娉曘傚ソ鍍弜ml island鎶妜ml褰撴垚涓涓被浼兼暟鎹簱鐨勮〃錛岀洿鎺ユ妸鏍圭洰褰曚笅鐨勫厓绱犲綋鎴恟ecordset銆傛墍浠ュ浜巟ml鏂囦歡濡備笅鎵句笉鍒拌В鍐崇殑鍔炴硶錛?br />
涓轟簡鑾峰彇鍓?0鏉tem鐨勬暟鎹紝鍙ソ鍦熺偖鍒墮爅avascript濡備笅
浠g爜: https://github.com/edwinm/game-of-life
鐢╟璇█鏆村姏榪愮畻錛屾病鏈変換浣曚紭鍖栵紝鎵浠ヨ櫧鐒剁敤浜唚asm錛岄熷害鐩稿綋涓嶈銆?br />
鐪熸鐨勫ぇ鐗涜繕鏄疉lan Hensel錛?br />
鍙儨鐜板湪瑕佽繍琛宩ava applet娌¢偅涔堝鏄?br />
web assembly鐨勭綉绔欏垪琛ㄣ?br />
鍏朵腑鍒楀嚭鏉ョ殑涓浜涚煡鍚嶉」鐩細
Google 鐨則ensorflow js, Google Earth, SketchUp
AutoCAD 鐨?nbsp;web app
Unity 3d 娓告垙寮曟搸
Doom3 demo錛岀儳鏄懼崱3d娓告垙
Microsoft 鐨刡lazor涔熷湪鍏朵腑
榪樻湁涓涓笉鐭ュ悕錛屼絾鏈夎叮鐨刧ame of life娓告垙(铏界劧鐢ㄤ簡c璇█鍐檞asm錛屼絾綆楁硶姣棤浼樺寲)
鍡紝灞呯劧榪樻湁Diablo I
鍙互閫氳繃鍏抽敭瀛楁悳绱?/div>
]]>
unstalling/reinstalling IIS express, deleting IIS configuration files, deleting the hidden .vs folder under the project, none of this worked.
I started IIS Express in CMD, it showed the message : Unable to launch the IIS Express Web server. The format of the specified network name is invalid - 0x800704BE
Found this link http://habjan.blogspot.com/2014/02/visual-studio-2013-unable-to-launch-iis.html and followed the instuctions:
And then followed this link https://stackoverflow.com/questions/20036984/how-do-i-restore-a-missing-iis-express-ssl-certificate
cd C:\Program Files (x86)\IIS Express IisExpress
It works now, great job for creating the mazes, Microsoft.
]]>
Method A:
Method B (my way):
2
3 LRESULT FAR PASCAL GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam)
4 {
5 AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
6
7 LPMSG lpMsg = (LPMSG) lParam;
8 if( (nCode >= 0) && PM_REMOVE == wParam)
9 {
10 //your code here. maybe to deal with hot-keys, accelerators ...
11 //see http://support.microsoft.com/kb/187988
12
13 //my code to simulate OnIdle
14 static BOOL bIdle = FALSE;
15 CWinApp* pApp = AfxGetApp();
16 if(!bIdle && pApp->IsIdleMessage(lpMsg))
17 bIdle = TRUE;
18
19 if(bIdle)
20 {
21 MSG msgPeek = {0};
22 if(!::PeekMessage(&msgPeek, NULL, NULL, NULL, PM_NOREMOVE))
23 {
24 VERIFY(PostMessage(AfxGetMainWnd()->GetSafeHwnd(), WM_USER+0x12, 0x34, 0x56));
25 }
26 }
27
28 if(lpMsg->hwnd == AfxGetMainWnd()->GetSafeHwnd() &&
29 lpMsg->message == WM_USER+0x12 && lpMsg->wParam == 0x34 && lpMsg->lParam == 0x56)
30 {
31 lpMsg->message = WM_NULL;
32 lpMsg->lParam = 0L;
33 lpMsg->wParam = 0L;
34
35 pApp->OnIdle(0);
36 bIdle = FALSE;
37 }
38 }
39
40 return ::CallNextHookEx(s_hGetMsgHook, nCode, wParam, lParam);
41 }
42
43 int CYourOleControl::OnCreate(LPCREATESTRUCT lpCreateStruct)
44 {
45 //...
46
47 if(NULL == s_hGetMsgHook)
48 s_hGetMsgHook = ::SetWindowsHookEx(WH_GETMESSAGE, GetMsgProc, AfxGetInstanceHandle(), GetCurrentThreadId());
49 }
50
51 void CYourOleControl::OnDestroy()
52 {
53 //...
54
55 ::UnhookWindowsHookEx(s_hGetMsgHook);
56 s_hGetMsgHook = NULL;
57
58 COleControl::OnDestroy();
59 }
Method A is far more simple, but with Method B:
1) You can override CWinApp::IsIdleMessage to filter some special messages, such as a frequent timer which will not affect what you want to do in CWinApp::OnIdle. Because timer will affect message queue and if you don't filter it, OnIdle will be called every time after the timer is invoked.
2) Sometimes your action in OnIdle will affect message queue inevitably, thus you will get a infinite loop: OnIdle->the special messages in message queue->OnIdle->... But with Method B, with SPY++ you can find the special messages, and filter them in IsIdleMessage.
]]>
http://www.codeproject.com/KB/aspnet/ChatApplication.aspx
http://www.codeproject.com/KB/webservices/wstranslate.aspx
http://www.ucancode.net/faq/Visual-C-MFC-XML-Example.htm
]]>
]]>
UserControl is not enough sometimes.
Sometimes you need to Expose a Form to ActiveX. Just don't forget to set it's TopLevel to false.
And it seems that a Form as MDI Container can't be exposed to ActiveX.Be aware of this if you want to expose your application to ActiveX.
Ok, you get through happily, and you should distribute you activex control now. Generate a cab file and put it on you web-server? No.
You have to do some ugly thing before it works. God will get very angry with this.
http://edndoc.esri.com/arcobjects/9.2/NET/9826f81b-278c-49cc-a912-ab8d86f5e91e.htm
http://blogs.msdn.com/robmen/archive/2004/04/28/122491.aspx
http://www.clarionmag.com/cmag/v7/v7n08dotnetinterop1.html
Finally, some one has contribute his work:
http://www.codeproject.com/KB/cs/CreateActiveXDotNet.aspx
]]>
I'm trying to render the contents of a HTML page hosted in a web
browser control so that I can save the result as an image.
There are a number of ways to do this. For example you can use any of
IHTMLElementRender, IViewObject or WM_PRINT. The problem with these
methods is that you only will receive the portion of the page's content
that is visible in the web browser. If the page's size is bigger than
the dimensions of the web browser these hidden or "scrollable" parts
will not get rendered in the above methods.
You could resize the browser to fit the entire page but that is not
feasible in a scenario when a user is using the browser. A second
approach is to load the page into a second hidden browser which, again,
is resized to fit the entire page. The problem with this approach is
that I can't load the document again since it's appearance could
change. I want to render exactly what's in the user's browser. AFAIK
there is know easy way to exactly clone a MSHTML document.
Does anyone (Igor?) have any clues how these "hidden" ares could be
rendered? Any help much appreciated.
Regards,
Christoffer
Answer:
I took a couple of ideas from Code Project and pieced them together to
do just this. I render the client area into a small bitmap, blit it
into a final larger (page size) bitmap and scroll the control to get at
another area. This was simpler than trying to get it to render into
the correct area of the page size bitmap.
This was written for a browser control that was NOT seen by the user so
I didn't care where the final scroll position was.
1. From the IHTMLDocument interface call get_body to get the
IHTMLElement enterface.
2. Get the IHTMLElement2 interface (pBody2 in the code).
3. Call get_scrollHeight and get_scrollWidth, get_clientWidth,
get_clientHeight.
4. Get the IHTMLElementRender interface (pRenderer in the code).
5. Create a bitmap the size of the client area and select it into a
clientDC.
6. Create a bitmap the size of the scroll area and select it into a
pageDC.
7. Use some code like the following to scroll and render the page:
long x = scrollWidth;
long lastX = -1;
bool doneX = false;
while (!doneX)
{
pBody2->put_scrollLeft(x);
pBody2->get_scrollLeft(&x);
if (-1 == lastX)
lastX = x + clientWidth;
long y = scrollHeight;
long lastY = -1;
bool doneY = false;
while (!doneY)
{
pBody2->put_scrollTop(y);
pBody2->get_scrollTop(&y);
if (-1 == lastY)
lastY = y + clientHeight;
hr = pRenderer->DrawToDC(clientDC);
BitBlt(pageDC,x,y,lastX-x,lastY-y,clientDC,2,2,SRCCOPY);
doneY = (y==0);
lastY = y;
y -= clientHeight-4;
}
doneX = (0==x);
lastX = x;
x -= clientWidth-4;
}
The pageDC bitmap now holds the full image of the page and you can save
it or do anything else you want. You'll note that what I'm doing is
trying to scroll too far and letting IE scroll appropriately. Also
note that I clip a 2 pixel edge when blitting. This is from actual
testing - needed to not clip the border of the control.
Hope this helps,
David Stidolph
Austin, TX
Ask:
Thanks for the solution, but it will unfortunately not work in my case
because the control is used by a user and can therefor not be scrolled
programmatically.
My focus now is on trying to clone the MSHTML document and then load
the clone in another hidden browser contol which I can resize to fit
the entire page and then do the rendering. The way I'm currently
cloning the document is saving the HTML to disk and then replacing all
references (images, .js, .css., ...) in the HTML document with local
ones which I have downloaded from the originating server (will do this
as a last resort), the cache or (in the cases where it's possible)
copied directly from the MSHTML document. When that is done I have a
local copy which a can browse to. Does anyone know of a better way to
clone a MSHTML document?
Answer:
How about using a LockWindowUpdate call before the snapshot and
then unlocking it after? That way, the user never knows the WB
scrolled.
]]>
綆$悊宸ュ叿-鏈湴瀹夊叏絳栫暐-鏈湴絳栫暐-鐢ㄦ埛鏉冨埄鎸囨淳
浠ユ搷浣滅郴緇熸柟寮忔搷浣溌?娣誨姞聽 聽聽聽 INTERACTIVE, IUSR_[COMPUTERNAME], IWAM_[COMPUTERNAME]
浣滀負鏈嶅姟鐧誨綍 聽聽 聽聽聽 娣誨姞聽聽聽聽聽 INTERACTIVE, IUSR_[COMPUTERNAME], IWAM_[COMPUTERNAME]
璋冭瘯紼嬪簭聽聽 聽聽 聽聽 聽聽 娣誨姞聽聽 聽聽 INTERACTIVE, IUSR_[COMPUTERNAME], IWAM_[COMPUTERNAME]
閲嶆柊鍚姩璁$畻鏈猴紝浠ヤ嬌鐢ㄦ埛鏉冮檺璁劇疆鐢熸晥銆?br />
2錛岃緗甒eb鏈嶅姟
鏈嶅姟
IIS Admin Service
Simple Mail Transport Protocol (SMTP)
FTP Publishing Service
World Wide Web Publishing Service
鐨勫惎鍔ㄦ柟寮?>鎵嬪姩銆?br />
璁劇疆 IIS Admin Service聽 鐧誨綍韜喚璁句負鏈湴緋葷粺甯愬彿錛屽茍鍏佽涓庢闈氦浜?br />
鎵撳紑綆$悊宸ュ叿-Internet 鏈嶅姟綆$悊鍣紝璁劇疆瑕佸厑璁歌皟璇曠殑铏氭嫙鐩綍鐨勫睘鎬?
鎵ц璁?>鑴氭湰鍜屽彲鎵ц紼嬪簭
搴旂敤紼嬪簭淇濇姢->搴?IIS榪涚▼)
鍚姩榛樿Web绔欑偣(蹇呴』灝哤eb鏈嶅姟嬋媧伙紝鍚﹀垯璋冭瘯鏃惰櫧鐒惰繍琛屼簡inetinfo.exe錛屼絾涓嶄細榪愯Web鏈嶅姟)
3錛岄厤緗甐C project
Project-setting-Debug
Executable for debug session : C:\WINNT\system32\inetsrv\inetinfo.exe
Program argument : -e w3svc
4錛岃皟璇?br />鎵ц鍛戒護琛?iisreset /stop
淇敼娉ㄥ唽琛ㄤ俊鎭?
REGEDIT4
[HKEY_CLASSES_ROOT\AppID\{61738644-F196-11D0-9953-00C04FD919C1}]
"LocalService"=-
"RunAs"=-
[HKEY_CLASSES_ROOT\AppID\{9F0BD3A0-EC01-11D0-A6A0-00A0C922E752}]
"LocalService"=-
"RunAs"=-
[HKEY_CLASSES_ROOT\AppID\{A9E69610-B80D-11D0-B9B9-00A0C922E750}]
"LocalService"=-
"RunAs"="Interactive User"
灝嗕互涓婃敞鍐岃〃淇℃伅淇濆瓨涓?reg鏂囦歡鍙屽嚮鍗沖彲銆?br />
鍙互寮濮嬪湪VC涓皟璇曚簡錛屾寜F5..
5,鎭㈠鐜
鎸塖hift + F5涓柇璋冭瘯銆?br />
鎭㈠娉ㄥ唽琛ㄤ俊鎭細
REGEDIT4
[HKEY_CLASSES_ROOT\AppID\{61738644-F196-11D0-9953-00C04FD919C1}]
"LocalService"="IISADMIN"
"RunAs"=-
[HKEY_CLASSES_ROOT\AppID\{9F0BD3A0-EC01-11D0-A6A0-00A0C922E752}]
"LocalService"="IISADMIN"
"RunAs"=-
[HKEY_CLASSES_ROOT\AppID\{A9E69610-B80D-11D0-B9B9-00A0C922E750}]
"LocalService"="IISADMIN"
"RunAs"=-
鎵ц鍛戒護琛?iisreset /start
鍙兘闇瑕佺敤鍒扮殑.reg .bat
http://www.shnenglu.com/Files/aqazero/iisIsapiDebug.zip
鏇磋緇嗕俊鎭?
http://xmlrad.com/DelosBin/Delos.dll/ServePage?URL=Manual/Appendix07/index.htm&WEB_ID=101001015
]]>
w3schools涓叧浜巟ml island
<?
xml聽version="1.0"聽encoding="gb2312"
?>
<!--
聽file聽name聽=聽rss_down_s10.xml
-->
<
rss聽
version
="2.0"
>
<
channel
>
聽聽聽聽聽聽聽
<
title
>
123聽-聽鏃呮父鏉傚織聽
</
title
>
聽聽聽聽聽聽聽
<
link
>
http://www.china-data.com.cn
</
link
>
聽聽聽聽聽聽聽
聽聽聽聽聽聽聽
<
item
>
聽聽聽聽聽聽聽聽聽聽聽
<
title
>
[鏃呮父鏉傚織]鏉窞瑗挎箹聽
</
title
>
聽聽聽聽聽聽聽聽聽聽聽
<
link
>
http://www.china-data.com.cn/downinfo/93.html
</
link
>
聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽
</
item
>
聽聽聽聽聽聽聽
<
item
>
聽聽聽聽聽聽聽聽聽聽聽
<
title
>
[鏃呮父鏉傚織]妗傛灄鏃呮父聽
</
title
>
聽聽聽聽聽聽聽聽聽聽聽
<
link
>
http://www.china-data.com.cn/downinfo/92.html
</
link
>
聽聽聽聽聽聽聽聽聽聽聽
聽聽聽聽聽聽聽
</
item
>
聽聽聽聽聽聽聽
(item聽s)
</
channel
>
</
rss
>
DOCTYPE聽HTML聽PUBLIC聽
"
-//W3C//DTD聽HTML聽4.0聽Transitional//EN
"
>
<
HTML
>
<
HEAD
>
<
TITLE
>
Test
SPAN style="COLOR: #000000">TITLE
>
<
script聽language
=
"
JavaScript
"
>
聽
聽聽聽聽
function
聽load()聽
{聽
聽聽聽聽聽聽聽聽
var
聽xmlDoc
=
new
聽ActiveXObject(
"
Microsoft.XMLDOM
"
);
聽聽聽聽聽聽聽聽xmlDoc.load(
"
rss_Down_s10.xml
"
);聽
聽聽聽聽聽聽聽聽
var
聽channelNode聽
=
聽xmlDoc.documentElement.firstChild;
聽聽聽聽聽聽聽聽
var
聽objNodeList聽
=
聽channelNode.selectNodes(
"
//item
"
);
聽聽聽聽聽聽聽聽
for
(
var
聽count聽
=
聽
0
;count聽
<
聽
10
聽
&&
聽count聽
<=
聽objNodeList.length;count聽
++
)
{
聽聽聽聽聽聽聽聽聽聽聽聽
var
聽itemnode聽
=
聽objNodeList.item(count);
聽聽聽聽聽聽聽聽聽聽聽聽
var
聽titleText聽
=
聽
""
;
聽聽聽聽聽聽聽聽聽聽聽聽
var
聽titleNode聽
=
聽itemnode.selectSingleNode(
"
title
"
);
聽聽聽聽聽聽聽聽聽聽聽聽
if
(titleNode聽
!=
聽
null
)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽titleText聽
=
聽titleNode.text;
聽聽聽聽聽聽聽聽聽聽聽聽
var
聽linkText聽
=
聽
""
;
聽聽聽聽聽聽聽聽聽聽聽聽
var
聽linkNode聽
=
聽itemnode.selectSingleNode(
"
link
"
);
聽聽聽聽聽聽聽聽聽聽聽聽
if
(linkNode聽
!=
聽
null
)
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽linkText聽
=
聽linkNode.text;
聽聽聽聽聽聽聽聽聽聽聽聽addRow(
"
test
"
,count,titleText,linkText);
聽聽聽聽聽聽聽聽}
聽聽聽聽}
聽
聽聽聽聽
function
聽addRow(id,index,title,link)
{
聽聽聽聽聽聽聽聽
var
聽tbody聽
=
聽document.getElementById(id).getElementsByTagName(
"
TBODY
"
)[
0
];
聽聽聽聽聽聽聽聽
var
聽row聽
=
聽document.createElement(
"
TR
"
)
聽聽聽聽聽聽聽聽
var
聽td0聽
=
聽document.createElement(
"
TD
"
)
聽聽聽聽聽聽聽聽td0.appendChild聽(document.createTextNode(index))
聽聽聽聽聽聽聽聽
var
聽td1聽
=
聽document.createElement(
"
TD
"
)
聽聽聽聽聽聽聽聽td1.appendChild(document.createTextNode(title))
聽聽聽聽聽聽聽聽
var
聽td2聽
=
聽document.createElement(
"
TD
"
)
聽聽聽聽聽聽聽聽td2.appendChild聽(document.createTextNode(link))
聽聽聽聽聽聽聽聽row.appendChild(td0);
聽聽聽聽聽聽聽聽row.appendChild(td1);
聽聽聽聽聽聽聽聽row.appendChild(td2);
聽聽聽聽聽聽聽聽tbody.appendChild(row);
聽聽聽聽}
SPAN style="COLOR: #000000">script
>
聽
SPAN style="COLOR: #000000">HEAD
>
<
BODY聽onload聽
=
聽load()
>
<
table聽id聽
=
聽
"
test
"
>
<
tr
>
<
td
>
1
SPAN style="COLOR: #000000">td
>
<
td
>
2
SPAN style="COLOR: #000000">td
>
<
td
>
3
SPAN style="COLOR: #000000">td
>
SPAN style="COLOR: #000000">tr
>
<
table
>
SPAN style="COLOR: #000000">BODY
>
SPAN style="COLOR: #000000">HTML
>
濡傛灉rss_Down_s10.xml鍙互琚慨鏀癸紝榪樺彲浠ヤ嬌鐢▁sl鏉ユ寜鏍煎紡鏄劇ず鏁版嵁銆?/p>
]]>