QWebview Ssl 双向认证
admin | Qt Gui | 2015-05-09
C++
qtssl::qtssl(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
connect(ui.webView->page()->networkAccessManager(), SIGNAL(sslErrors(QNetworkReply*, const QList<QSslError>&)), this,
SLOT(on_networkReply_sslErrors(QNetworkReply*, const QList<QSslError>&)))... [阅读全文]
c++ 清除ssl 状态
admin | win32 | 2015-05-09
C++
#include "stdafx.h"
#include "windows.h"
#include "tchar.h"
typedef BOOL (__stdcall *SSL_EMPTY_CACHE_FN_A) (LPSTR, DWORD);
typedef BOOL (__stdcall *SSL_EMPTY_CACHE_FN_W) (LPWSTR, DWORD);
typedef BOOL (__stdcall *INCREMENTURLCACHEHEADERDATA_FN) (DWORD, LPDWORD);
VOID ClearSslState(VOID)
{
... [阅读全文]
javascript canvas show circle picture
admin | JavaScript | 2015-05-04
XHTML
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Canvas tutorial</title>
<script type="text/javascript">
function draw(){
var canvas = document.getElementById('tutorial');
if (canvas.getContext){
... [阅读全文]
win32 C++ ScreenShot and save
admin | win32 | 2015-04-15
C++
BOOL ScreenShot(_In_ LPCWSTR lpFileName)
{
static HDC hSrcDC;
hSrcDC = GetDC(GetDesktopWindow());
int nx = GetSystemMetrics(SM_XVIRTUALSCREEN);
int ny = GetSystemMetrics(SM_YVIRTUALSCREEN);
int nWidth = GetSystemMetrics(SM_CXVIRTUALSCREEN);
int nHeight = GetSystemMetrics(SM_CYVIRTUAL... [阅读全文]
QWebView support SSL and Redirection
C++
#ifndef D_H
#define D_H
#include <QtWidgets/QMainWindow>
#include <QtNetwork>
#include "ui_d.h"
class d : public QMainWindow
{
Q_OBJECT
public:
d(QWidget *parent = 0);
~d();
private:
Ui::dClass ui;
QNetworkRequest m_networkRequest;
private slots:
void on_netwo... [阅读全文]
RichEditor for Android 是 Android 平台下一个所见即所得的文本编辑器控件
admin | andriod | 2015-04-03
RichEditor for Android 是 Android 平台下一个所见即所得的文本编辑器控件。
可以从 Google Play 下载演示程序。
使用示例:
?
1
2
3
4
5
6
7
8
RichEditor editor = (RichEditor) findViewById(R.id.editor);
editor. setOnTextChangeListener(new RichEditor.OnTextChangeListener() {
@Override
public void onTextChange(String te... [阅读全文]
SETGET_FUNCTION 替代 get set 函数
admin | C++ | 2015-03-24
C++
#define SETGET_FUNCTION(type, set_fuctionname, get_fuctionname) \
public: \
const type get_fuctionname(){ return m_##get_fuctionname; } \
void set_fuctionname(const type newValue){ m_##get_fuctionname= newValue; } \
private: \
type m_##get_fuctionname; \
123456... [阅读全文]
Qt 动态加载 dll
admin | Qt Gui | 2015-03-24
C++
#ifdef Q_OS_WIN
typedef long ( *SHELLRUN)(long,const char*, const char*, const char* ,const char* , int );
SHELLRUN test;
QString str = "shell32.dll";
QLibrary lib(str);
test = (SHELLRUN)lib.resolve("ShellExecuteA");
const char * te = "open";
const char * te1 = ".... [阅读全文]
win32 设置本地ICON
admin | win32 | 2015-03-16
C++
//设置本地icon 图像为程序ICON
HICON t = (HICON) LoadImage( NULL,g_IconName,IMAGE_ICON,0,0,LR_LOADFROMFILE|LR_DEFAULTSIZE|LR_SHARED);
SendMessage(g_pFrame->GetHWND(), WM_SETICON, ICON_SMALL, (LPARAM)t);
SendMessage(g_pFrame->GetHWND(), WM_SETICON, ICON_BIG, (LPARAM)t);
... [阅读全文]