SendMessage VS PostMessage

/// <param name="hwnd">handle of destination window</param>
/// <param name="wMsg">message to post</param>
/// <param name="wParam">first message parameter</param>
/// <param name="lParam">second message parameter</param>
const string Dowm = 0x100;
const string Up = 0x101
[DllImport("user32.dll", EntryPoint = "SendMessageA")]
static extern int SendMessage(IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam);
[DllImport("User32.dll")]
static extern bool PostMessage(IntPtr hwnd, int wMsg, IntPtr wParam, IntPtr lParam);

SendMessage用在你需要馬上知道這個Message處理的結果
PostMessage只是把訊息丟入Message Queue會在下次進入訊息迴圈時才處理

轉帖 如何有效地報告 Bug

轉帖 如何有效地報告 Bug
作者:Simon Tatham 專業的自由軟件程序員
翻譯:Dasn

引言

為公眾寫過軟件的人,大概都收到過很拙劣的bug(程式碼中的錯誤或程式運作時的瑕疵——譯者注)報告,例如:

在報告中說「不好用」;

所報告內容毫無意義;

在報告中用戶沒有提供足夠的資訊;

在報告中提供了錯誤資訊;

所報告的問題是由於用戶的過失而產生的;

所報告的問題是由於其他程式的錯誤而產生的;

所報告的問題是由於網絡錯誤而產生的;

Read the rest of this entry »

Pages:  1 2 3