Thread View: borland.public.cppbuilder.nativeapi
5 messages
5 total messages
Started by Daryl
Fri, 01 Feb 2008 22:43
SHBrowseForFolder Function and highlighting text in the dialog's EDIT box
Author: Daryl
Date: Fri, 01 Feb 2008 22:43
Date: Fri, 01 Feb 2008 22:43
11 lines
1704 bytes
1704 bytes
When using SHBrowseForFolder Function with a callback function - I have the BROWSEINFO Structure flags BIF_VALIDATE and BIF_EDITBOX set. Now when an invalid folder is entered by the user in the EDIT box and the call back function uMsg BFFM_VALIDATEFAILED is enacted - Is it possible after the error message is closed to highlight the incorrect folder name in the EDIT box in the Browse for Folder dialog? or perhaps remove it and refocus onto a folder in the dialog's folder tree? thanks daryl
Re: SHBrowseForFolder Function and highlighting text in the dialog's EDIT box
Author: Remy Lebeau (TeamB)
Date: Sat, 02 Feb 2008 00:18
Date: Sat, 02 Feb 2008 00:18
19 lines
1602 bytes
1602 bytes
"Daryl" <devaccount@hotmail.com> wrote in message news:47a3a07f@newsgroups.borland.com... > Is it possible after the error message is closed to highlight > the incorrect folder name in the EDIT box in the Browse > for Folder dialog? Not directly. You would have to manually find the HWND of the edit field and then pass it to SetFocus(). > or perhaps remove it and refocus onto a folder in the dialog's > folder tree? Send a BFFM_SETSELECTION message to the HWND provided by the callback, specifying a valid path. Gambit
Re: SHBrowseForFolder Function and highlighting text in the dialog's EDIT box
Author: Daryl
Date: Sat, 02 Feb 2008 01:13
Date: Sat, 02 Feb 2008 01:13
18 lines
1671 bytes
1671 bytes
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:47a3b6ac$1@newsgroups.borland.com... > > "Daryl" <devaccount@hotmail.com> wrote in message > news:47a3a07f@newsgroups.borland.com... > >> Is it possible after the error message is closed to highlight >> the incorrect folder name in the EDIT box in the Browse >> for Folder dialog? > > Not directly. You would have to manually find the HWND of the edit field > and then pass it to SetFocus(). How could I go about manually find the HWND of the edit field? thanks daryl
Re: SHBrowseForFolder Function and highlighting text in the dialog's EDIT box
Author: Daryl
Date: Sat, 02 Feb 2008 02:08
Date: Sat, 02 Feb 2008 02:08
21 lines
1803 bytes
1803 bytes
>>> Is it possible after the error message is closed to highlight >>> the incorrect folder name in the EDIT box in the Browse >>> for Folder dialog? >> >> Not directly. You would have to manually find the HWND of the edit field >> and then pass it to SetFocus(). > > How could I go about manually find the HWND of the edit field? I tried this: HWND hwndEdit = FindWindowEx(hwnd, NULL, "Edit", NULL); // hwnd is the handle to the dialog. SendMessage(hwndEdit, WM_SETTEXT, 0, (long)""); This seems to work, does it look OK? I would like to know how to highlight the text in the EDIT box, instead of deleting it - can you assist? thanks daryl
Re: SHBrowseForFolder Function and highlighting text in the dialog's EDIT box
Author: Dennis Jones
Date: Sun, 03 Feb 2008 04:51
Date: Sun, 03 Feb 2008 04:51
11 lines
1345 bytes
1345 bytes
"Daryl" <devaccount@hotmail.com> wrote in message news:47a3d09e@newsgroups.borland.com... > I would like to know how to highlight the text in the EDIT box, instead of > deleting it - can you assist? See EM_SETSEL. - Dennis
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads