Folks,
I'm trying to validate local folders with shBrowseForFolder() and BrowseCallbackProc() so I can disable the OK button for non-local drives/folders.
While I can reject most network connections by testing the path, thus:
However, if I have shortcuts to network drives in my "Network Neighborhood" section (Win2K), the root names are detected as folders on the local PC, so the OK button is left enabled.
Does anyone have any ideas how to reliably detect the selection of one of these shortcut names?
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
I'm trying to validate local folders with shBrowseForFolder() and BrowseCallbackProc() so I can disable the OK button for non-local drives/folders.
While I can reject most network connections by testing the path, thus:
Code:
CALLBACK FUNCTION BrowseForFolderProc IF CBMSG = %BFFM_INITIALIZED THEN DIALOG SEND CBHNDL, %BFFM_SETSELECTION, %TRUE, CBLPARAM ELSEIF CBMSG = %BFFM_SELCHANGED THEN DIM zBuffer AS ASCIIZ * %MAX_PATH CALL SHGetPathFromIDList(BYVAL CBWPARAM, zBuffer) IF ISFALSE CBWPARAM OR ISFALSE LEN(zBuffer) OR _ ISFALSE (GETATTR(zBuffer) AND %SUBDIR) OR _ MID$(zBuffer,2,1) <> ":" THEN DIALOG SEND CBHNDL, %BFFM_ENABLEOK, %FALSE, %FALSE BEEP ' test only - not for final version END IF END IF END FUNCTION
Does anyone have any ideas how to reliably detect the selection of one of these shortcut names?
------------------
Lance
PowerBASIC Support
mailto:[email protected][email protected]</A>
Comment