wxWidgets access html file in zip package
/************************************************************************
* Description: ·ÃÎÊzipÖеÄhtm Ö® Widgetsѧϰ
* Author: ³ÂÏàÀñ
* Compiled: VC8 + wxWidgets2.8.10
* Date: 04/02/10
************************************************************************/
/************************************************************************
* Description: ·ÃÎÊzipÖеÄhtm Ö® Widgetsѧϰ
* Author: ³ÂÏàÀñ
* Compiled: VC8 + wxWidgets2.8.10
* Date: 04/02/10
************************************************************************/
#include "wx/wx.h"
#include "wx/image.h"
#include "wx/html/htmlwin.h"
#include "wx/fs_zip.h"
class AppMain : public wxApp
{
public:
virtual bool OnInit();
protected:
private:
};
class FrameMain : public wxFrame
{
public:
FrameMain( const wxString& title, const wxPoint& pos, const wxSize& size );
void OnQuit( wxCommandEvent& event );
void OnBack( wxCommandEvent& event );
void OnForward( wxCommandEvent& event);
protected:
private:
DECLARE_EVENT_TABLE()
};
enum
{
// ²Ëµ¥ID
Minimal_Quit = 1,
Minimal_Back,
Minimal_Forward,
};
// ʼþ±í
BEGIN_EVENT_TABLE( FrameMain, wxFrame )
EVT_MENU( Minimal_Quit, FrameMain::OnQuit )
EVT_MENU( Minimal_Back, FrameMain::OnBack )
EVT_MENU( Minimal_Forward, FrameMain::OnForward )
END_EVENT_TABLE()
// Ö¸¶¨Èë¿ÚÀà
IMPLEMENT_APP( AppMain )
// Èë¿Ú¿ªÊ¼µã
bool AppMain::OnInit()
{
wxImage::AddHandler(new wxPNGHandler);
wxImage::AddHandler(new wxJPEGHandler);
wxFileSystem::AddHandler(new wxZipFSHandler);
FrameMain *frame = new FrameMain( wxT("Zip and Html²âÊÔ"), wxDefaultPosition, wxSize( 1024, 768 ) );
frame->Show( true );
SetTopWindow( frame );
return true;
}
wxHtmlWindow *html = NULL;
FrameMain::FrameMain( const wxString& title, const wxPoint& pos, const wxSize& size )
: wxFrame( (wxFrame *)NULL, wxID_ANY, title, pos, size )
{
wxMenu *menuFile = new wxMenu;
wxMenu
Ïà¹ØÎĵµ£º
<label> ±êǩΪ input ÔªËØ¶¨Òå±ê×¢£¨±ê¼Ç£©¡£
label ÔªËØ²»»áÏòÓû§³ÊÏÖÈκÎÌØÊâЧ¹û¡£²»¹ý£¬ËüΪÊó±êÓû§¸Ä½øÁË¿ÉÓÃÐÔ¡£Èç¹ûÄúÔÚ label ÔªËØÄÚµã»÷Îı¾£¬¾Í»á´¥·¢´Ë¿Ø¼þ¡£¾ÍÊÇ˵£¬µ±Óû§Ñ¡Ôñ¸Ã±êǩʱ£¬ä¯ÀÀÆ÷¾Í»á×Ô¶¯½«½¹µãתµ½ºÍ±êÇ©Ïà¹ØµÄ±íµ¥¿Ø¼þÉÏ¡£
<label> ±êÇ©µÄ for ÊôÐÔÓ¦µ±ÓëÏà¹ØÔªËØµÄ id ÊôÐÔÏ ......
ÐÞ¸Ä checked ÊôÐÔ
var sex = '${entity.sex}';
if(sex == 'ÄÐ')
{
//document.all.sexCk1.checked=true; ÕâÖÖ»ðºü²»Ö§³Ö
&nbs ......
·½Ê½Ò»£º »ò ×÷»»Ðзû
·½Ê½¶þ£ºÖ±½ÓÔÚÔ´ÂëÖÐÇûسµ
¡¾½¨Òé¡¿ ²ÉÓ÷½°¸Ò»¡£
¡¾Ô´Âë¡¿
<a href="#" title="µÚÒ»ÐÐ µÚ¶þÐÐ µÚÈýÐÐ">·½Ê½Ò»£ºÊó±ê·ÅÔÚÎÒÉÏÃæ¿´Ò»ÏÂtitle</a>
<br />
<br />
<a href="#" title="µÚÒ»ÐÐ
µÚ¶þÐÐ
µÚÈýÐÐ">·½Ê½¶þ£ºÊó± ......
ѧϰwxWidgetsµÄʱºòÏëÓÃËüÁ¬½ÓÊý¾Ý¿â£¬²»¹ýwxWidgetsµÄѧϰ×ÊÁϷdz£ÉÙ£¬ºÍODBCÓйصľ͸üÉÙ£¬ÍøÂçÉÏÕÒµ½µÄ¶¼²»ÖªµÀΪʲôÎÞ·¨ÕýÈ·ÔËÐС£ÕâÊÇÔÚCSDNÉÏÅóÓѵİïÖúϸ㶨µÄ£¬×Ô¼ºÑéÖ¤¹ý¿ÉÒÔÕýÈ·±àÒëºÍÔËÐС¢³É¹¦¶ÁÈ¡Êý¾ÝÄÚÈݵĴúÂ룺
wxWidgets°æ±¾£º2.8.10£¨2.9ÒÔºóµÄ°æ±¾²»Ö§³ÖODBC ......