mfc
visual studio
#pragma once
#include "afxwin.h"
class CMyEdit : public CEdit
{
public:
CMyEdit(); // standard constructor
~CMyEdit();
protected:
afx_msg LRESULT OnPaste(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
#include "CMyEdit.h"
CMyEdit::CMyEdit(){}
CMyEdit::~CMyEdit(){}
BEGIN_MESSAGE_MAP(CMyEdit, CEdit)
ON_MESSAGE(WM_PASTE, &CMyEdit::OnPaste)
END_MESSAGE_MAP()
LRESULT CMyEdit::OnPaste(WPARAM wParam, LPARAM lParam){
// Put any code here you want to execute when the user right clicks on the edit
// control. Just leave it blank to disable the menu
return true;
}
把 edit 的 IDC_EDIT 使用上面新的 CMyEdit 來使用 Edit 欄位
IDC_EDIT 就是 UI 上 edit field 元件的 ID.
需要使用自訂的 CEdit 的 cpp 上面加上:
.h: (宣告)
CMyEdit m_myEditControl;
.cpp: (DoDataExchange function 加入)
DDX_Control(pDX, IDC_EDIT, m_myEditControl);
!image
May 8, 2024在使用 s3 plugin 時候, 遇到 java error message 時候, 在 log file 會印出多行的 error stack trace. 可以使用 codec multiline 來解決, 把這些 error message 合併成一個 log message. 問題: 使用 multiline 後, add_field 和 @metadata 的資料會在每個 log file 的最後一筆 message 被清空, 導致讀不到設定的值. github 有人提出, 但是目前還沒把解決方法更新. https://github.com/logstash-plugins/logstash-input-s3/pull/173 解決: 自己安裝 ruby 使用 gem 從 source code 自己加入網友提供的程式碼 build 一版新的 logstash-input-s3-3.5.1.gem
Apr 7, 2020or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up