This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> | |
<Fragment> | |
<?define CurrentVCRedist_Version = "v14.0.24212.0"?> | |
<util:ProductSearch Id="SearchInstalled_VCRedist_x86_v140" Variable="VCRedist_x86_v140" UpgradeCode="{65E5BD06-6392-3027-8C26-853107D3CF1A}" Result="version" /> | |
<PackageGroup Id="VCRedist_x86_v140"> | |
<ExePackage Id="VCRedist_x86_v140" Name="Package\VC_redist.x86.exe" SourceFile="VC_redist.x86.exe" DetectCondition="VCRedist_x86_v140 >= $(var.CurrentVCRedist_Version)" Permanent="yes" PerMachine="yes" Cache="no" Vital="yes" Compressed="$(var.Compressed)" LogPathVariable="VCRedist_x86_v140_log" DisplayName="Microsoft Visual C++ 2015 Redistributable (x86) - 14.0.24212" Protocol="burn" /> | |
<?endif?> | |
</PackageGroup> | |
</Fragment> |
This file contains 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
<!--どこかに適当に定義しておく--> | |
<CustomAction Id="DirCA_SetProductDir" Directory="PRODUCTDIR" Value="[INSTALLDIR][ProductName]\" Execute="firstSequence"/> | |
<!--BrowseDlgのOKボタン--> | |
<Control Id="OK" Type="PushButton" X="240" Y="243" Width="56" Height="17" Default="yes" Text="!(loc.WixUIOK)"> | |
<Publish Event="SetTargetPath" Value="[_BrowseProperty]">1</Publish> | |
<Publish Event="EndDialog" Value="Return">1</Publish> | |
<Publish Event="DoAction" Value="DirCA_SetProductDir">1</Publish> | |
</Control> |
This file contains 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
#include <SDKDDKVer.h> | |
#include <Windows.h> | |
#include <process.h> | |
#include <iostream> | |
#include <sstream> | |
#define THREAD_COUNT 10 |
This file contains 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::string ToUtf8Str( const wchar_t* value ) | |
{ | |
_ASSERTE( value != nullptr ); | |
if( value == nullptr || *value == L'\0' ){ | |
return ""; | |
} | |
int needLength = WideCharToMultiByte( CP_UTF8, 0, value, -1, nullptr, 0, nullptr, nullptr ); | |
if( needLength < 1 ){ | |
return ""; | |
} |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | |
<Fragment> | |
<Binary Id="Foo.dll" SourceFile="Foo.dll" /> | |
<CustomAction Id="CA_FooAction" BinaryKey="Foo.dll" DllEntry="CA_FooAction" Return="check" Execute="deferred" /> | |
<SetProperty Id="CA_FooAction" Before="CA_FooAction" Sequence="execute" Value="[FooProp]" /> | |
<InstallExecuteSequence> | |
<Custom Action="CA_FooAction" After="InstallValidate" /> | |
</InstallExecuteSequence> | |
</Fragment> |
This file contains 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 CSampleDlg::OnOK() | |
{ | |
// いろいろ前処理 | |
CProgressDlg dlg; // 同期で処理することを前提に作ったプログレス表示クラス | |
dlg.Create(); | |
if( CountCharInFile( dlg, m_targetPath, m_numbers ) ) | |
{ | |
// 画面を更新 | |
} | |
dlg.CloseWindow(); |
This file contains 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 CSampleDlg::OnOK() | |
{ | |
// いろいろ前処理 | |
CProgressDlg dlg; // 非同期処理で対応できるように修正したプログレス表示クラス | |
auto task = concurrency::create_task( [&]() | |
{ | |
return CountCharInFile( dlg, m_targetPath, m_numbers ); | |
} ).then( [&]( bool result ) | |
{ | |
dlg.PostMessage( WM_CLOSE ); |
This file contains 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
static void APIENTRY CountColors( CWnd* pParent, CListCtrl& lc, LPCTSTR imagePath, std::map<COLORREF, size_t>& numColors ) | |
{ | |
// InsertItem するときに使う情報(コールバックでテキスト表示するのでデータはLPARAMだけ) | |
LVITEM item{}; | |
item.mask = LVIF_PARAM|LVIF_TEXT; | |
// テキストデータはその都度生成する(メモリイメージ省略のため) | |
item.cchTextMax = 0; | |
item.pszText = LPSTR_TEXTCALLBACK; | |
// メッセージポンプが動かない版 WM_SETCURSOR されるとマウスカーソルが戻るためメッセージポンプが動く場合はセットしない |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> | |
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> | |
<application> | |
<!-- Windows Vista --> | |
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" /> | |
<!-- Windows 7 --> | |
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" /> | |
<!-- Windows 8 --> | |
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" /> |
This file contains 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
[ | |
local, | |
object, | |
uuid(00000000-0000-0000-C000-000000000046), | |
pointer_default(unique) | |
] | |
interface IUnknown | |
{ | |
typedef [unique] IUnknown *LPUNKNOWN; |
OlderNewer