what's wrong in my "onFileDialog" code??

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

what's wrong in my "onFileDialog" code??

Postby jwseo22 » Thu Dec 04, 2014 2:35 am

hi,

i'd like to change default folder when i click the file dialog.

so, i found OnFileDialog on CefDialogHandler, and change the function like below.

but when i debugged the code, there's no error in 'callback->Continue(default)'. and when the function is returned, the error occur. the errror message is "Project has triggered a breakpoint" like that.

i'd like to know what's the problem. thank you!


bool ClientHandler::OnFileDialog(CefRefPtr<CefBrowser> browser, FileDialogMode mode, const CefString& title, const CefString& default_file_name, const std::vector<CefString>& accept_types, CefRefPtr<CefFileDialogCallback> callback)
{
std::vector <CefString>default(1);
default[0] = "c:\\";

callback->Continue(default);

return 0;
}
jwseo22
Newbie
 
Posts: 5
Joined: Tue Sep 23, 2014 12:26 am

Re: what's wrong in my "onFileDialog" code??

Postby magreenblatt » Thu Dec 04, 2014 4:19 am

jwseo22 wrote:i'd like to change default folder when i click the file dialog.

How are you displaying the dialog?

jwseo22 wrote:i'd like to know what's the problem

OnFileDialog is for implementing your own file dialog instead of using the default implementation provided by CEF. That doesn't sound like what you want.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 91 guests