If one needs some sort of state in a dialog function, it seems you need some sort of static variable. For example, the hook procedure for GetOpenFileName provides the dialog function with the address of the OPENFILENAME structure on its WM_INITDIALOG call but not on any subsequent calls and the OPENFILENAME structure contains a place for lCustData which could be used to pass information between the dialog procedure and the GetOpenFileName caller. If the dialog function needs either of these states, it seems the only alternative is a static or global variable.
相关问题
- the application was unable to start correctly 0xc0
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- Handle button click in another application
相关文章
- 如何让cmd.exe 执行 UNICODE 文本格式的批处理?
- 怎么把Windows开机按钮通过修改注册表指向我自己的程序
- Warning : HTML 1300 Navigation occured?
- Bundling the Windows Mono runtime with an applicat
- Windows 8.1 How to fix this obsolete code?
- Why windows 64 still makes use of user32.dll etc?
- Checking & Unchecking Checkboxes inside a JQuery M
- CosmosDB emulator can't start since port is al
You can use SetProp in WM_INITDIALOG like this KB recommends, or SetWindowLongPtr(..,GWLP_USERDATA) if you have custom controls (template)