0

I want to use dialog_fselect for selecting file in c++ console application. I wonder how I get the result path of dialog_fselect? For example when I run:

dialog_fselect("Path", "", getmaxy(main_window)-10, getmaxx(main_window)-10);

How I could get the selected path?

Aryan
  • 2,675
  • 5
  • 24
  • 33

1 Answers1

1

dialog_fselect copies the result to dialog_vars.input_result:

Certain widgets copy a result to this buffer. If the pointer is NULL, or if the length is insufficient for the result, then the dialog library allocates a buffer which is large enough, and sets DIALOG_VARS.input_length. Callers should check for this case if they have supplied their own buffer.

(The capitialized DIALOG_VARS in the manual page refers to the type name rather than the actual variable of that type—see DATA STRUCTURES).

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105