winapi - using hook on OPENFILEW dialog disables resize control -


using code resulting dialog box drawn without ability able resized mouse:

#include <windows.h>  static uint_ptr callback ofnhookproc (hwnd hdlg, uint uimsg, wparam wparam, lparam lparam) {   return 0; }  int main() {   openfilenamew ofn;   zeromemory(&ofn, sizeof(ofn));   ofn.lstructsize = sizeof(openfilenamew);   ofn.nmaxfile = max_path;   ofn.flags = ofn_explorer | ofn_filemustexist | ofn_enablehook;   ofn.lpfnhook = ofnhookproc;   getopenfilenamew(&ofn);   return 0; } 

removing ofn_enablehook shows correct dialog window resize indicator @ bottom right corner. how make dialog user-resizeable , hook procedure ?

(of course hook mock here, illustrate error, no matter put inside, of course if correct on other matters, result same)

you need include ofn_enablesizing flag when using ofn_enablehook. documented behavior:

openfilename structure

ofn_enablesizing
0x00800000
enables explorer-style dialog box resized using either mouse or keyboard. default, explorer-style open , save dialog boxes allow dialog box resized regardless of whether flag set. this flag necessary if provide hook procedure or custom template. old-style dialog box not permit resizing.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -