[英]What is the correct way to get the object instance inside its own method in zval format and update a property with a long value?
[英]What is the correct way of sizing a control inside its own WindowProc function?
我想調整自定義控件的大小,並在它處於活動狀態且至少有一行時使其位於最頂部。 從同一個控件WindowProc()
內部調用SetWindowPos()
是否安全甚至良好的編碼? 我直接在 WinAPI 上工作。
是的,它是安全的。 許多開發人員這樣做是為了改變他們窗口的狀態。 例如,開發人員將在WM_CREATE
處理程序期間使用SWP_FRAMECHANGED
標志調用SetWindowPos()
以重新計算其窗口的客戶區。
使用相同控件的WindowProc
的相同窗口句柄調用SetWindowPos()
,只需確保所有句柄和標志都有效。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.