|
|
@ -21,6 +21,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
enum hashType {hash_md5, hash_sha256};
|
|
|
|
enum hashType {hash_md5, hash_sha256};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LRESULT run_textEditProc(WNDPROC oldEditProc, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
|
|
|
|
|
|
class HashFromFilesDlg : public StaticDialog
|
|
|
|
class HashFromFilesDlg : public StaticDialog
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public :
|
|
|
|
public :
|
|
|
@ -34,16 +36,14 @@ protected :
|
|
|
|
virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
hashType _ht = hash_md5;
|
|
|
|
hashType _ht = hash_md5;
|
|
|
|
|
|
|
|
|
|
|
|
LRESULT run_textEditProc(WNDPROC oldEditProc, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
static LRESULT CALLBACK HashPathEditStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
|
|
|
|
static LRESULT CALLBACK HashPathEditStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
const auto dlg = (HashFromFilesDlg *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
|
|
|
const auto dlg = (HashFromFilesDlg *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
|
|
|
return (dlg->run_textEditProc(dlg->_oldHashPathEditProc, hwnd, message, wParam, lParam));
|
|
|
|
return (run_textEditProc(dlg->_oldHashPathEditProc, hwnd, message, wParam, lParam));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
static LRESULT CALLBACK HashResultStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|
|
|
|
|
|
|
{
|
|
|
|
static LRESULT CALLBACK HashResultStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
|
|
|
|
const auto dlg = (HashFromFilesDlg *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
|
|
|
const auto dlg = (HashFromFilesDlg *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
|
|
|
return (dlg->run_textEditProc(dlg->_oldHashResultProc, hwnd, message, wParam, lParam));
|
|
|
|
return (run_textEditProc(dlg->_oldHashResultProc, hwnd, message, wParam, lParam));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
private :
|
|
|
|
private :
|
|
|
@ -66,16 +66,14 @@ protected :
|
|
|
|
virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
hashType _ht = hash_md5;
|
|
|
|
hashType _ht = hash_md5;
|
|
|
|
|
|
|
|
|
|
|
|
LRESULT run_textEditProc(WNDPROC oldEditProc, HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
|
|
|
static LRESULT CALLBACK HashTextEditStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
|
|
|
|
static LRESULT CALLBACK HashTextEditStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
const auto dlg = (HashFromTextDlg *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
|
|
|
const auto dlg = (HashFromTextDlg *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
|
|
|
return (dlg->run_textEditProc(dlg->_oldHashTextEditProc, hwnd, message, wParam, lParam));
|
|
|
|
return (run_textEditProc(dlg->_oldHashTextEditProc, hwnd, message, wParam, lParam));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
static LRESULT CALLBACK HashResultStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|
|
|
|
|
|
|
{
|
|
|
|
static LRESULT CALLBACK HashResultStaticProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
|
|
|
|
const auto dlg = (HashFromTextDlg *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
|
|
|
const auto dlg = (HashFromTextDlg *)(::GetWindowLongPtr(hwnd, GWLP_USERDATA));
|
|
|
|
return (dlg->run_textEditProc(dlg->_oldHashResultProc, hwnd, message, wParam, lParam));
|
|
|
|
return (run_textEditProc(dlg->_oldHashResultProc, hwnd, message, wParam, lParam));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
private :
|
|
|
|
private :
|
|
|
|