This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// flash-to-directx : Library to embed Adobe Flash movies to DirectX-based applications. | |
// https://code.google.com/p/flash-to-directx/ | |
// | |
// swfui : Adobe Flash User Interface | |
// https://code.google.com/p/swfui/ | |
// | |
// C++ and Flash: Send or get data from/to a SWF using C++ and ActiveX in Win32 | |
// http://www.codeproject.com/Articles/269829/Communicate-with-Flash-Send-or-Get-data-from-to-a | |
// | |
#include <windows.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compatibility | |
cmake_minimum_required(VERSION 2.6) | |
if(WIN32) | |
# Windows XP compatible platform toolset. Must be set before project(), | |
# otherwise change of CMAKE_*_TOOLSET will take no effect. | |
# We get VS version from the generator name because neither MSVC* nor other | |
# variables that describe the compiler aren't available before project(). | |
if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio ([0-9]+)") | |
# Note: "v110_xp" is for Visual Studio 11 2012, which is unsupported. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***************************************************************************** | |
* css_unscramble.c : unscrambling function | |
***************************************************************************** | |
* Copyright (C) 1999 Derek Fawcus | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// level: IE窗口的层级,一共三级 | |
// 0: Shell Embedding | |
// 1: Shell DocObject View | |
// 2: Internet Explorer_Server | |
HWND getIEHandle(QAxWidget* pWidget, int level) | |
{ | |
assert(pWidget); | |
CComPtr<IWebBrowser2> pWebBrowser2; | |
pWidget->queryInterface( IID_IWebBrowser2, (void**)&pWebBrowser2 ); | |
assert(pWebBrowser2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std::ifstream ifs("myfile.txt"); | |
std::string content( (std::istreambuf_iterator<char>(ifs) ), | |
(std::istreambuf_iterator<char>() ) ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename value_t> | |
class IProperty_Forward { | |
public: | |
virtual ~IProperty_Forward() {} | |
virtual const value_t& Read() = 0; | |
virtual void Set(const value_t& value) = 0; | |
}; | |
template <typename value_t, typename owner_t, typename getter_t, typename setter_t> | |
class TProperty_Forwarder: public IProperty_Forward<value_t> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void EnableHighDPISupport() { | |
// Enable per-monitor DPI for Win10 or above instead of Win8.1 since Win8.1 | |
// does not have EnableChildWindowDpiMessage, necessary for correct non-client | |
// area scaling across monitors. | |
PROCESS_DPI_AWARENESS process_dpi_awareness = | |
GetVersion() >= VERSION_WIN10 ? PROCESS_PER_MONITOR_DPI_AWARE | |
: PROCESS_SYSTEM_DPI_AWARE; | |
if (!SetProcessDpiAwarenessWrapper(process_dpi_awareness)) { | |
// For windows versions where SetProcessDpiAwareness is not available or | |
// failed, try its predecessor. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum | |
{ | |
plain = 0, | |
bold = 1, | |
italic = 2 | |
}; | |
void PrintString(const char* message, int size, int style) | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BYTE* Get24BitPixels(HBITMAP pBitmap, WORD *pwWidth, WORD *pwHeight) | |
{ | |
// a bitmap object just to get bitmap width and height | |
BITMAP bmpBmp; | |
// pointer to original bitmap info | |
LPBITMAPINFO pbmiInfo; | |
// bitmap info will hold the new 24bit bitmap info | |
BITMAPINFO bmiInfo; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HWND WindowDeskPopUtils::GetDeskWindow() | |
{ | |
HWND hSysView32 = NULL; | |
// 先按win7方式查找 | |
HWND hWnd = NULL; | |
do | |
{ | |
hSysView32 = ::FindWindowEx(NULL, hWnd, _T("Progman"), _T("Program Manager")); | |
if (hSysView32) |
NewerOlder