Prev: how use wxthread and custom events in multifile project?
Next: Fast pixel operations, wxDC, wx-sdl
From: jmpulido on 25 Aug 2009 06:16 I have a wxTreeCtrl with an associated event for double clicks in each of the tree's nodes, and what I need to do is to open an operating system explorer window (must be portable between windows and unix), when an item is double clicked (for example, the node represents a file and when it is double clicked I want to open the folder containing the file). I've been looking for a way to do this in the docs and google but I didn't find a way to do this, though I'm sure it is possible. Thanks.
From: pwb on 17 Sep 2009 05:34 On windows, use: #include <shellapi.h> .... TCHAR const* dir = ...; ::ShellExecute( NULL, _T("explore"), dir, NULL, NULL, SW_SHOWNORMAL );
From: Vadim Zeitlin on 17 Sep 2009 11:07 On 2009-08-25, jmpulido <peito.vive(a)gmail.com> wrote: > I have a wxTreeCtrl with an associated event for double clicks in each > of the tree's nodes, and what I need to do is to open an operating > system explorer window (must be portable between windows and unix), > when an item is double clicked (for example, the node represents a > file and when it is double clicked I want to open the folder > containing the file). Opening the folders is not currently supported by wx API, we only have wxLaunchDefaultApplication() which allows you to open the files. Although maybe wxLaunchDefaultBrowser() might do the right thing, if this would be more by accident than by design. Regards, VZ -- TT-Solutions: wxWidgets consultancy and technical support http://www.tt-solutions.com/
|
Pages: 1 Prev: how use wxthread and custom events in multifile project? Next: Fast pixel operations, wxDC, wx-sdl |