* UCI Options Dialog functions\r
*\r
\*---------------------------------------------------------------------------*/\r
+INT CALLBACK BrowseCallbackProc(HWND hwnd, \r
+ UINT uMsg,\r
+ LPARAM lp, \r
+ LPARAM pData) \r
+{\r
+ switch(uMsg) \r
+ {\r
+ case BFFM_INITIALIZED: \r
+ SendMessage(hwnd, BFFM_SETSELECTION, TRUE, (LPARAM)pData);\r
+ break;\r
+ }\r
+ return 0;\r
+}\r
+\r
BOOL BrowseForFolder( const char * title, char * path )\r
{\r
BOOL result = FALSE;\r
\r
bi.lpszTitle = title == 0 ? _("Choose Folder") : title;\r
bi.ulFlags = BIF_RETURNONLYFSDIRS;\r
+ bi.lpfn = BrowseCallbackProc;\r
+ bi.lParam = (LPARAM) path;\r
\r
pidl = SHBrowseForFolder( &bi );\r
\r
"Image files\0*.bmp\0\0";\r
OPENFILENAME ofn;\r
\r
- safeStrCpy( buf, "" , sizeof( buf)/sizeof( buf[0]) );\r
+ GetDlgItemText( hDlg, i+3, buf, MSG_SIZ );\r
\r
ZeroMemory( &ofn, sizeof(ofn) );\r
\r
}\r
} else\r
if(j == -3) {\r
+ GetDlgItemText( hDlg, i+3, buf, MSG_SIZ );\r
if( BrowseForFolder( _("Choose Folder:"), buf ) ) {\r
SetDlgItemText( hDlg, i+3, buf );\r
}\r