資源簡介
3本實例在vc2010下實現了miniblink控件調用,實現了簡單瀏覽器的實現模擬,給初學者一個簡單入門實例。
代碼片段和文件信息
//?mb_demo.cpp?:?定義應用程序的入口點。
//
#include?“stdafx.h“
#include?“mb_demo.h“
#include?“wke.h“
#define?MAX_LOADSTRING?100
//?全局變量:
HINSTANCE?hInst; //?當前實例
TCHAR?sztitle[MAX_LOADSTRING]; //?標題欄文本
TCHAR?szWindowClass[MAX_LOADSTRING]; //?主窗口類名
//?此代碼模塊中包含的函數的前向聲明:
ATOM MyRegisterClass(HINSTANCE?hInstance);
BOOL InitInstance(HINSTANCE?int);
LRESULT?CALLBACK WndProc(HWND?UINT?WPARAM?LPARAM);
INT_PTR?CALLBACK About(HWND?UINT?WPARAM?LPARAM);
int?APIENTRY?_tWinMain(HINSTANCE?hInstance
?????????????????????HINSTANCE?hPrevInstance
?????????????????????LPTSTR????lpCmdLine
?????????????????????int???????nCmdShow)
{
UNREFERENCED_PARAMETER(hPrevInstance);
UNREFERENCED_PARAMETER(lpCmdLine);
? //?TODO:?在此放置代碼。
MSG?msg;
HACCEL?hAccelTable;
//?初始化全局字符串
LoadString(hInstance?IDS_APP_title?sztitle?MAX_LOADSTRING);
LoadString(hInstance?IDC_MB_DEMO?szWindowClass?MAX_LOADSTRING);
MyRegisterClass(hInstance);
//?執行應用程序初始化:
if?(!InitInstance?(hInstance?nCmdShow))
{
return?FALSE;
}
hAccelTable?=?LoadAccelerators(hInstance?MAKEINTRESOURCE(IDC_MB_DEMO));
//?主消息循環:
while?(GetMessage(&msg?NULL?0?0))
{
if?(!TranslateAccelerator(msg.hwnd?hAccelTable?&msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return?(int)?msg.wParam;
}
//
//??函數:?MyRegisterClass()
//
//??目的:?注冊窗口類。
//
//??注釋:
//
//????僅當希望
//????此代碼與添加到?Windows?95?中的“RegisterClassEx”
//????函數之前的?Win32?系統兼容時,才需要此函數及其用法。調用此函數十分重要,
//????這樣應用程序就可以獲得關聯的
//????“格式正確的”小圖標。
//
ATOM?MyRegisterClass(HINSTANCE?hInstance)
{
WNDCLASSEX?wcex;
wcex.cbSize?=?sizeof(WNDCLASSEX);
wcex.style =?CS_HREDRAW?|?CS_VREDRAW;
wcex.lpfnWndProc =?WndProc;
wcex.cbClsExtra =?0;
wcex.cbWndExtra =?0;
wcex.hInstance =?hInstance;
wcex.hIcon =?LoadIcon(hInstance?MAKEINTRESOURCE(IDI_MB_DEMO));
wcex.hCursor =?LoadCursor(NULL?IDC_ARROW);
wcex.hbrBackground =?(HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName =?MAKEINTRESOURCE(IDC_MB_DEMO);
wcex.lpszClassName =?szWindowClass;
wcex.hIconSm =?LoadIcon(wcex.hInstance?MAKEINTRESOURCE(IDI_SMALL));
return?RegisterClassEx(&wcex);
}
//
//???函數:?InitInstance(HINSTANCE?int)
//
//???目的:?保存實例句柄并創建主窗口
//
//???注釋:
//
//????????在此函數中,我們在全局變量中保存實例句柄并
//????????創建和顯示主程序窗口。
//
BOOL?InitInstance(HINSTANCE?hInstance?int?nCmdShow)
{
???HWND?hWnd;
?//??hInst?=?hInstance;?//?將實例句柄存儲在全局變量中
???//hWnd?=?CreateWindow(szWindowClass?sztitle?WS_OVERLAPPEDWINDOW
?????//?CW_USEDEFAULT?0?CW_USEDEFAULT?0?NULL?NULL?hInstance?NULL);
??//?if?(!hWnd)
???//{
?????//?return?FALSE;
??//?}
??? wkeSetWkeDllPath(L“node.dll“);
????wkeInitialize();
?
????wkeWebView?window?=?wkeCreateWebWindow(WKE_WINDOW_TYPE_POPUP?NULL?0?0?1080?680);
????wkeLoadURL(window?“qq.com“);
????wkeShowWindow(window?TRUE);
???//ShowWindow(hWnd?nCmdShow);
???//UpdateWindow(hWnd);
???return?TRUE;
}
//
//??函數:?WndPro
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????130048??2018-12-27?09:44??mb_demo\Debug\mb_demo.exe
?????文件?????567768??2018-12-27?09:44??mb_demo\Debug\mb_demo.ilk
?????文件????1125376??2018-12-27?09:44??mb_demo\Debug\mb_demo.pdb
?????文件???22442496??2018-11-06?16:40??mb_demo\Debug\node.dll
?????文件???17432576??2018-12-27?09:39??mb_demo\ipch\mb_demo-314652dc\mb_demo-87d2d09f.ipch
?????文件???????4277??2018-12-27?09:46??mb_demo\mb_demo\cookies.dat
?????文件???????1410??2018-12-27?09:44??mb_demo\mb_demo\Debug\cl.command.1.tlog
?????文件???????9380??2018-12-27?09:44??mb_demo\mb_demo\Debug\CL.read.1.tlog
?????文件????????712??2018-12-27?09:44??mb_demo\mb_demo\Debug\CL.write.1.tlog
?????文件??????????2??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件??????????2??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件??????????2??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件??????????2??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件??????????2??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件??????????2??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件??????????2??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件??????????2??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件??????????2??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件??????????2??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件???????1696??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件???????3290??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件????????878??2018-12-27?09:44??mb_demo\mb_demo\Debug\li
?????文件????????406??2018-12-26?11:30??mb_demo\mb_demo\Debug\mb_demo.exe.em
?????文件????????472??2018-12-26?11:30??mb_demo\mb_demo\Debug\mb_demo.exe.em
?????文件????????381??2018-12-27?09:44??mb_demo\mb_demo\Debug\mb_demo.exe.intermediate.manifest
?????文件?????????59??2018-12-27?09:44??mb_demo\mb_demo\Debug\mb_demo.lastbuildstate
?????文件???????2400??2018-12-27?09:44??mb_demo\mb_demo\Debug\mb_demo.log
?????文件?????262409??2018-12-27?09:44??mb_demo\mb_demo\Debug\mb_demo.obj
?????文件????4456448??2018-12-26?11:30??mb_demo\mb_demo\Debug\mb_demo.pch
?????文件??????48264??2018-12-26?11:30??mb_demo\mb_demo\Debug\mb_demo.res
............此處省略43個文件信息
- 上一篇:Kuli 軟件使用手冊
- 下一篇:JAFFE表情庫
評論
共有 條評論