webcontrol.h

来自「一个类似于写字板的程序」· C头文件 代码 · 共 38 行

H
38
字号
#ifndef WEBCONTROLCLASS_H
#define WEBCONTROLCLASS_H

extern "C" {
#include "WebCtrl.h"
}
#include "Window.h"

#define WEB_CTRL_CLASS_NAME "Web Control"

class WebControl : public Window
{
public :
	WebControl() : Window(){};
	void init(HINSTANCE, HWND);
    void displayPage(const char *addr) {
        DisplayHTMLPage(_hSelf, (LPSTR)addr);
    };
    
    void displayStr(const char *htmlStr) {
        DisplayHTMLStr(_hSelf, (LPSTR)htmlStr);
    };

    virtual void destroy() {
        ::DestroyWindow(_hSelf);
    };
	
private :
	static const char _className[32];
	static int _nbWindow;
	static LRESULT CALLBACK WebCtrl_Proc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
	LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam);
};



#endif WEBCONTROLCLASS_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?