How to center a common dialog
Responds to the WM_INITDIALOG message to center the Common Dialog Control on a form. This sample uses a derivative of the technique created for the Windows Styles article in Visual Basic Programmer's Journal.
Uses the following API functions:
- CallNextHookEx
- CallWindowProc
- CopyMemory (RtlMoveMemory)
- GetWindowRect
- SetWindowsHookEx
- SetWindowLong
- SetWindowPos
- UnHookWindowsHookEx
- WM_INITDIALOG
About this post
Posted: 2017-06-09
By: BlackBeltVB
Viewed: 601 times
Categories
Attachments
CENTRDLG.ZIP
Posted: 6/9/2017 6:28:08 AM
Size: 3,467 bytes
Requirements
This code originally appeared on BlackBeltVB.com, and has been republished here with the permission of Matt Hart.
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.