SHBrowseForFolders and path strings

I have a CString variable that stores the last folder opened in the app. The 
registry key stored the path with dots added (Windows XP) as "C:\Program 
Files\IView\My Projects\Images...". My question is, must I always trim extra 
characters from the strings be for writing to registry?

Thanks,
Mark 


0
10/25/2006 3:39:02 PM
vc.mfc 33608 articles. 0 followers. Follow

14 Replies
673 Views

Similar Articles

[PageSpeed] 19

I think what you are seeing is the fact that regedit cannot display the
string and displays the dots.  If you double click the entry does it show
the correct path.  If you put .... in front of the path then the path is
useless.

AliR.

"Mark F." <reply2group@nospam.com> wrote in message
news:qyL%g.23066$GR2.10866@tornado.texas.rr.com...
> I have a CString variable that stores the last folder opened in the app.
The
> registry key stored the path with dots added (Windows XP) as "C:\Program
> Files\IView\My Projects\Images...". My question is, must I always trim
extra
> characters from the strings be for writing to registry?
>
> Thanks,
> Mark
>
>


0
AliR3470 (3235)
10/25/2006 3:38:43 PM
How are you storing the key to the registry? What has this to do with 
SHBrowseForFolders?

If you write a string to the registry directly, no dots will be added.

-- 
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"Mark F." <reply2group@nospam.com> wrote in message 
news:qyL%g.23066$GR2.10866@tornado.texas.rr.com...
>I have a CString variable that stores the last folder opened in the app. 
>The registry key stored the path with dots added (Windows XP) as 
>"C:\Program Files\IView\My Projects\Images...". My question is, must I 
>always trim extra characters from the strings be for writing to registry?
>
> Thanks,
> Mark
> 


0
jwood (1291)
10/25/2006 3:44:16 PM
The following code write to the registry when the user clicks OK on dialog.

    HKEY hKey;
    DWORD dwDisposition;
    DWORD dwResult;

    dwResult = RegOpenKeyEx( HKEY_CURRENT_USER, APP_KEY, 0, KEY_ALL_ACCESS, 
&hKey );

    if( dwResult != ERROR_SUCCESS )
        dwResult = RegCreateKeyEx( HKEY_CURRENT_USER, APP_KEY, 0, 0, 0, 
KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition );

    if( dwResult == ERROR_SUCCESS )
    {
        char szBuffer[_MAX_PATH];
        DWORD dwSize = sizeof(szBuffer)/sizeof(char)+1;
        strcpy(szBuffer, strdup(m_sSelImageFolder));
        RegSetValueEx( hKey, _T("LastImageFolder"), 0, REG_SZ, 
(LPBYTE)&szBuffer, dwSize );
    }

    RegCloseKey(hKey);

 CDialog::OnOK();

"Jonathan Wood" <jwood@softcircuits.com> wrote in message 
news:uvI9zxE%23GHA.2180@TK2MSFTNGP05.phx.gbl...
> How are you storing the key to the registry? What has this to do with 
> SHBrowseForFolders?
>
> If you write a string to the registry directly, no dots will be added.
>
> -- 
> Jonathan Wood
> SoftCircuits Programming
> http://www.softcircuits.com
>
> "Mark F." <reply2group@nospam.com> wrote in message 
> news:qyL%g.23066$GR2.10866@tornado.texas.rr.com...
>>I have a CString variable that stores the last folder opened in the app. 
>>The registry key stored the path with dots added (Windows XP) as 
>>"C:\Program Files\IView\My Projects\Images...". My question is, must I 
>>always trim extra characters from the strings be for writing to registry?
>>
>> Thanks,
>> Mark
>>
>
> 


0
10/25/2006 3:58:20 PM
No, the entire string is there, but the dots are appended to the end. When I 
manually edit the dots from the registry key the application is able to use 
the path normally.

"AliR (VC++ MVP)" <AliR@online.nospam> wrote in message 
news:453f8506$0$2935$a8266bb1@reader.corenews.com...
>I think what you are seeing is the fact that regedit cannot display the
> string and displays the dots.  If you double click the entry does it show
> the correct path.  If you put .... in front of the path then the path is
> useless.
>
> AliR.
>
> "Mark F." <reply2group@nospam.com> wrote in message
> news:qyL%g.23066$GR2.10866@tornado.texas.rr.com...
>> I have a CString variable that stores the last folder opened in the app.
> The
>> registry key stored the path with dots added (Windows XP) as "C:\Program
>> Files\IView\My Projects\Images...". My question is, must I always trim
> extra
>> characters from the strings be for writing to registry?
>>
>> Thanks,
>> Mark
>>
>>
>
> 


0
10/25/2006 4:05:11 PM
who is putting the ... in the registry entry? What's the registry Key?

AliR.

"Mark F." <reply2group@nospam.com> wrote in message
news:XWL%g.23070$GR2.14078@tornado.texas.rr.com...
> No, the entire string is there, but the dots are appended to the end. When
I
> manually edit the dots from the registry key the application is able to
use
> the path normally.
>
> "AliR (VC++ MVP)" <AliR@online.nospam> wrote in message
> news:453f8506$0$2935$a8266bb1@reader.corenews.com...
> >I think what you are seeing is the fact that regedit cannot display the
> > string and displays the dots.  If you double click the entry does it
show
> > the correct path.  If you put .... in front of the path then the path is
> > useless.
> >
> > AliR.
> >
> > "Mark F." <reply2group@nospam.com> wrote in message
> > news:qyL%g.23066$GR2.10866@tornado.texas.rr.com...
> >> I have a CString variable that stores the last folder opened in the
app.
> > The
> >> registry key stored the path with dots added (Windows XP) as
"C:\Program
> >> Files\IView\My Projects\Images...". My question is, must I always trim
> > extra
> >> characters from the strings be for writing to registry?
> >>
> >> Thanks,
> >> Mark
> >>
> >>
> >
> >
>
>


0
AliR3470 (3235)
10/25/2006 4:11:03 PM
How are putting the value in m_sSelImageFolder.

BTW you don't have to create a string buffer for RegSetValueEx

RegSetValueEx(hKey, _T("LastImageFolder"), 0, REG_SZ,
(LPBYTE)m_sSelImageFolder.GetBuffer(), m_sSelImageFolder.GetLength());
m_sSelImageFolder.ReleaseBuffer();


AliR.

"Mark F." <reply2group@nospam.com> wrote in message
news:wQL%g.23068$GR2.10810@tornado.texas.rr.com...
> The following code write to the registry when the user clicks OK on
dialog.
>
>     HKEY hKey;
>     DWORD dwDisposition;
>     DWORD dwResult;
>
>     dwResult = RegOpenKeyEx( HKEY_CURRENT_USER, APP_KEY, 0,
KEY_ALL_ACCESS,
> &hKey );
>
>     if( dwResult != ERROR_SUCCESS )
>         dwResult = RegCreateKeyEx( HKEY_CURRENT_USER, APP_KEY, 0, 0, 0,
> KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition );
>
>     if( dwResult == ERROR_SUCCESS )
>     {
>         char szBuffer[_MAX_PATH];
>         DWORD dwSize = sizeof(szBuffer)/sizeof(char)+1;
>         strcpy(szBuffer, strdup(m_sSelImageFolder));
>         RegSetValueEx( hKey, _T("LastImageFolder"), 0, REG_SZ,
> (LPBYTE)&szBuffer, dwSize );
>     }
>
>     RegCloseKey(hKey);
>
>  CDialog::OnOK();
>
> "Jonathan Wood" <jwood@softcircuits.com> wrote in message
> news:uvI9zxE%23GHA.2180@TK2MSFTNGP05.phx.gbl...
> > How are you storing the key to the registry? What has this to do with
> > SHBrowseForFolders?
> >
> > If you write a string to the registry directly, no dots will be added.
> >
> > -- 
> > Jonathan Wood
> > SoftCircuits Programming
> > http://www.softcircuits.com
> >
> > "Mark F." <reply2group@nospam.com> wrote in message
> > news:qyL%g.23066$GR2.10866@tornado.texas.rr.com...
> >>I have a CString variable that stores the last folder opened in the app.
> >>The registry key stored the path with dots added (Windows XP) as
> >>"C:\Program Files\IView\My Projects\Images...". My question is, must I
> >>always trim extra characters from the strings be for writing to
registry?
> >>
> >> Thanks,
> >> Mark
> >>
> >
> >
>
>


0
AliR3470 (3235)
10/25/2006 4:14:28 PM
I fixed it. I changed the line:

RegSetValueEx( hKey, _T("LastImageFolder"), 0, REG_SZ,(LPBYTE)&szBuffer, 
dwSize );
to...,
RegSetValueEx( hKey, _T("LastImageFolder"), 0, REG_SZ,(LPBYTE)&szBuffer, 
strlen(szBuffer)+1 );



"AliR (VC++ MVP)" <AliR@online.nospam> wrote in message 
news:453f8d67$0$2895$a8266bb1@reader.corenews.com...
> How are putting the value in m_sSelImageFolder.
>
> BTW you don't have to create a string buffer for RegSetValueEx
>
> RegSetValueEx(hKey, _T("LastImageFolder"), 0, REG_SZ,
> (LPBYTE)m_sSelImageFolder.GetBuffer(), m_sSelImageFolder.GetLength());
> m_sSelImageFolder.ReleaseBuffer();
>
>
> AliR.
>
> "Mark F." <reply2group@nospam.com> wrote in message
> news:wQL%g.23068$GR2.10810@tornado.texas.rr.com...
>> The following code write to the registry when the user clicks OK on
> dialog.
>>
>>     HKEY hKey;
>>     DWORD dwDisposition;
>>     DWORD dwResult;
>>
>>     dwResult = RegOpenKeyEx( HKEY_CURRENT_USER, APP_KEY, 0,
> KEY_ALL_ACCESS,
>> &hKey );
>>
>>     if( dwResult != ERROR_SUCCESS )
>>         dwResult = RegCreateKeyEx( HKEY_CURRENT_USER, APP_KEY, 0, 0, 0,
>> KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition );
>>
>>     if( dwResult == ERROR_SUCCESS )
>>     {
>>         char szBuffer[_MAX_PATH];
>>         DWORD dwSize = sizeof(szBuffer)/sizeof(char)+1;
>>         strcpy(szBuffer, strdup(m_sSelImageFolder));
>>         RegSetValueEx( hKey, _T("LastImageFolder"), 0, REG_SZ,
>> (LPBYTE)&szBuffer, dwSize );
>>     }
>>
>>     RegCloseKey(hKey);
>>
>>  CDialog::OnOK();
>>
>> "Jonathan Wood" <jwood@softcircuits.com> wrote in message
>> news:uvI9zxE%23GHA.2180@TK2MSFTNGP05.phx.gbl...
>> > How are you storing the key to the registry? What has this to do with
>> > SHBrowseForFolders?
>> >
>> > If you write a string to the registry directly, no dots will be added.
>> >
>> > -- 
>> > Jonathan Wood
>> > SoftCircuits Programming
>> > http://www.softcircuits.com
>> >
>> > "Mark F." <reply2group@nospam.com> wrote in message
>> > news:qyL%g.23066$GR2.10866@tornado.texas.rr.com...
>> >>I have a CString variable that stores the last folder opened in the 
>> >>app.
>> >>The registry key stored the path with dots added (Windows XP) as
>> >>"C:\Program Files\IView\My Projects\Images...". My question is, must I
>> >>always trim extra characters from the strings be for writing to
> registry?
>> >>
>> >> Thanks,
>> >> Mark
>> >>
>> >
>> >
>>
>>
>
> 


0
10/25/2006 4:25:41 PM
AliR (VC++ MVP) wrote:

> How are putting the value in m_sSelImageFolder.
> 
> BTW you don't have to create a string buffer for RegSetValueEx
> 
> RegSetValueEx(hKey, _T("LastImageFolder"), 0, REG_SZ,
> (LPBYTE)m_sSelImageFolder.GetBuffer(), m_sSelImageFolder.GetLength());
> m_sSelImageFolder.ReleaseBuffer();
> 
> 

AliR:

You don't need GetBuffer/ReleaseBuffer here. You can just cast.

But don't you have the length wrong? And won't it fail in Unicode build?

Shouldn't this be

DWORD dwsize = 1 + m_sSelImageFolder.GetLength()*sizeof(TCHAR);
RegSetValueEx(hKey, _T("LastImageFolder"), 0, REG_SZ,
  (LPBYTE)(LPCTSTR)m_sSelImageFolder, dwsize);

David Wilkinson
0
no-reply8010 (1791)
10/25/2006 4:41:22 PM
I know but the cast is kinda ugly. Just my opinion. ;)  its a cast from
CString to a const char * (which is actually an operator) and then another
cast to LPBYTES.  Too many cast. But never the less the same results.

AliR.

"David Wilkinson" <no-reply@effisols.com> wrote in message
news:OU$6jRF%23GHA.4712@TK2MSFTNGP03.phx.gbl...
> AliR (VC++ MVP) wrote:
>
> > How are putting the value in m_sSelImageFolder.
> >
> > BTW you don't have to create a string buffer for RegSetValueEx
> >
> > RegSetValueEx(hKey, _T("LastImageFolder"), 0, REG_SZ,
> > (LPBYTE)m_sSelImageFolder.GetBuffer(), m_sSelImageFolder.GetLength());
> > m_sSelImageFolder.ReleaseBuffer();
> >
> >
>
> AliR:
>
> You don't need GetBuffer/ReleaseBuffer here. You can just cast.
>
> But don't you have the length wrong? And won't it fail in Unicode build?
>
> Shouldn't this be
>
> DWORD dwsize = 1 + m_sSelImageFolder.GetLength()*sizeof(TCHAR);
> RegSetValueEx(hKey, _T("LastImageFolder"), 0, REG_SZ,
>   (LPBYTE)(LPCTSTR)m_sSelImageFolder, dwsize);
>
> David Wilkinson


0
AliR3470 (3235)
10/25/2006 4:44:51 PM
Mark F. wrote:

> I fixed it. I changed the line:
> 
> RegSetValueEx( hKey, _T("LastImageFolder"), 0, REG_SZ,(LPBYTE)&szBuffer, 
> dwSize );
> to...,
> RegSetValueEx( hKey, _T("LastImageFolder"), 0, REG_SZ,(LPBYTE)&szBuffer, 
> strlen(szBuffer)+1 );
> 
> 

Mark:

Yes, you were not using the right length before.

But your code will not work in Unicode build. And why are you passing 
&szBuffer? Shouldn't it just be szbuffer?

David Wilkinson
0
no-reply8010 (1791)
10/25/2006 4:47:26 PM
AliR (VC++ MVP) wrote:

> I know but the cast is kinda ugly. Just my opinion. ;)  its a cast from
> CString to a const char * (which is actually an operator) and then another
> cast to LPBYTES.  Too many cast. But never the less the same results.
> 
> AliR.
> 
> "David Wilkinson" <no-reply@effisols.com> wrote in message
> news:OU$6jRF%23GHA.4712@TK2MSFTNGP03.phx.gbl...
> 
>>AliR (VC++ MVP) wrote:
>>
>>
>>>How are putting the value in m_sSelImageFolder.
>>>
>>>BTW you don't have to create a string buffer for RegSetValueEx
>>>
>>>RegSetValueEx(hKey, _T("LastImageFolder"), 0, REG_SZ,
>>>(LPBYTE)m_sSelImageFolder.GetBuffer(), m_sSelImageFolder.GetLength());
>>>m_sSelImageFolder.ReleaseBuffer();
>>>
>>>
>>
>>AliR:
>>
>>You don't need GetBuffer/ReleaseBuffer here. You can just cast.
>>
>>But don't you have the length wrong? And won't it fail in Unicode build?
>>
>>Shouldn't this be
>>
>>DWORD dwsize = 1 + m_sSelImageFolder.GetLength()*sizeof(TCHAR);
>>RegSetValueEx(hKey, _T("LastImageFolder"), 0, REG_SZ,
>>  (LPBYTE)(LPCTSTR)m_sSelImageFolder, dwsize);
>>
>>David Wilkinson
> 
> 
> 

AliR:

Personally I have a great aversion to GetBuffer(), so I almost never use 
it. And never if all I want is a LPCTSTR, as here.

David Wilkinson
0
no-reply8010 (1791)
10/25/2006 4:51:05 PM
I only use GetBuffer() i fI need to modify the buffer and I just don't want 
to create another copy.  Othewise, assignment works just fine and CString 
does all the work for us.  It always has worked for me so I don't really 
have an aversion to it, but I just don't think it's useful for anything 
except passing a buffer to a function that wants to modify the buffer.

Tom

"David Wilkinson" <no-reply@effisols.com> wrote in message 
news:OFPh$WF%23GHA.360@TK2MSFTNGP04.phx.gbl...

> AliR:
>
> Personally I have a great aversion to GetBuffer(), so I almost never use 
> it. And never if all I want is a LPCTSTR, as here.
>
> David Wilkinson 


0
tserface (3860)
10/25/2006 6:27:35 PM
Hey Tom,

You know what, you guys are both right in that situation. In the OP he was
casting to LPBYTE and I thought that RegSetKeyEx really took a LPBYTE, and
not a const LPBYTE.  I was just thinking to myself that it doesn't make
since for it not to take a const to begin with.  So I looked it up and what
do you know, it takes a const LPBYTE.

So I give you guys every right to make fun of me :o)

AliR.

"Tom Serface" <tserface@msn.com> wrote in message
news:uA30ANG%23GHA.1128@TK2MSFTNGP05.phx.gbl...
> I only use GetBuffer() i fI need to modify the buffer and I just don't
want
> to create another copy.  Othewise, assignment works just fine and CString
> does all the work for us.  It always has worked for me so I don't really
> have an aversion to it, but I just don't think it's useful for anything
> except passing a buffer to a function that wants to modify the buffer.
>
> Tom
>
> "David Wilkinson" <no-reply@effisols.com> wrote in message
> news:OFPh$WF%23GHA.360@TK2MSFTNGP04.phx.gbl...
>
> > AliR:
> >
> > Personally I have a great aversion to GetBuffer(), so I almost never use
> > it. And never if all I want is a LPCTSTR, as here.
> >
> > David Wilkinson
>
>


0
AliR3470 (3235)
10/25/2006 6:39:27 PM
For all the times you've been "right" you get off easy... :o)

Tom

"AliR (VC++ MVP)" <AliR@online.nospam> wrote in message 
news:453faf61$0$2910$a8266bb1@reader.corenews.com...
> Hey Tom,
>
> You know what, you guys are both right in that situation. In the OP he was
> casting to LPBYTE and I thought that RegSetKeyEx really took a LPBYTE, and
> not a const LPBYTE.  I was just thinking to myself that it doesn't make
> since for it not to take a const to begin with.  So I looked it up and 
> what
> do you know, it takes a const LPBYTE.
>
> So I give you guys every right to make fun of me :o)
>
> AliR.


0
tserface (3860)
10/25/2006 9:24:34 PM
Reply:

Similar Artilces:

Template path
Hi! I have a bunch of documents with a template-path to a server "\\Server1\Office\Section_2\Templates\Template.dot" <-- one of them. How can I replace the path to "blank" or another path? I want something that doesn´t have to open the documents, just replace the path. I search google, and found a bunch of VB-scripts that doesen´t work at all! How can I fix this? I have 1000+ documents and its making me nuts. It takes 5 min to open a document. Thnx! If your documents were in Word 2007 (docx, docm) format, you could edit the xml out...

Count the number of characters created by string text
Is there a formula that will count the number of characters, and spaces between characters, in a short paragraph created by a string text? It is acceptible if spaces cannot be counted. Thanks. Michael Answered in another group you posted to. In article <1169220981.833905.146790@m58g2000cwm.googlegroups.com>, mrlanier@hotmail.com wrote: > Is there a formula that will count the number of characters, and spaces > between characters, in a short paragraph created by a string text? It > is acceptible if spaces cannot be counted. Thanks. > > Michael Thanks. Michael ...

Getting the path of Temporary Internet Files
Hi How can I get the path of the Temporary Internet Files folder in MFC? Regards, Mystique Take a look at the following APIs. SHGetFolderLocation() SHGetFolderPath() SHGetSpecialFolderLocation() SHGetSpecialFolderPath() -- Cheers Check Abdoul [VC++ MVP] ----------------------------------- "Mystique" <misic@softhome.net> wrote in message news:eX2zzcVrFHA.240@tk2msftngp13.phx.gbl... > Hi > > How can I get the path of the Temporary Internet Files folder in MFC? > > Regards, > Mystique > > thanks Abdoul here is what i came up with...

Filename and path or a handle on mouse click
Hi, Is there a way to obtain a filename and path (or just a handle of a file, but without knowing its name nor path) of a file(s) selected on the desktop (with LEFT click). As far as I know there's no such api function. "Shell extensions on right click" are NOT what I'm looking for... When I click a file in any window, Explorer runs a few functions like ReadFile, CreateFile and in some magical way gets it's name and path. I searched the web but with no luck. I could make a filesystem hook and intercept calls on functions like ReadFile or CreateFile, but I would need only...

SHBrowseForFolder
I want to set the pidlRoot member of the BROWSEINFO structure to a default location. How do I get a PIDL from a path represented by a text string like this: _T("C:\Program Files")? Thanks I'm not certain about the pidl for an arbitrarily named folder, but if your real interest is the "Program Files" folder, then you shouldn't use a text string anyway, since the text is user-selectable and in fact changes based on language locales. For "Program Files" and other special folders, you can get the pidl using the SHGetFolderLocation function, passing in a CS...

Fastest way to insert 6MB of strings into 64MB List of strings?
It seems to take about 30 seconds to insert only 6MB of strings into random locations in an array of about 64MB of strings. This is way too slow, I need to be able to insert objects into a large list much much faster. Any tips? static void Main(string[] args) { Random rnd = new Random(); List<string> db = new List<string>(6710886); for (int i = 0; i < 6710886; i++) { db.Add(rnd.Next().ToString() + "," + rnd.Next().ToString()); } int ...

Get the file path from Textbox
hello i want to get the path of file from textbox and then attach it to already opened window(it would be a Plugin)i am unable to get is it possible i give file path in Textbox and on clicking a button on form say "Attach it",it attacch file on mail window? thanks -adnan -- Message posted via http://www.officekb.com ...

full UNC path in footer
How do I display the full UNC path (i.e. \\server\home\user\filename.xls) instead of the mapped drive path (x:\filename.xls) in the footer of an excel (or word) document? All of our user's home folders are mapped to Drive X and when they put the path on the footer of the document they are looking on, it shows x:\filename.xls. It is not a problem if you know who printed the document, but if you don't, then it is a pain to search for that particular document in all the users' home folders There is an article at MS to get a UNC Path http://support.microsoft.com/kb/q151027/...

why put a string be put in the string table and not a header file?
I have found it is easier to work with string defintitions that are placed in a separate header file (i.e. files with extensions '.h') than placing them in the string table. For example, all error messages can be placed in a file named 'ErrorMessages.h'. If different languages are to be supported, one could create a separate header file for each language (e.g. EnglishErrorMessages.h, FrenchErrorMessages.h, etc). It is easier to work with a simple header file than the string table. Furthermore, using the resource editor to edit a string table is a slow and tedious work, p...

Can i convert numbers into string format?
Is there a way in Execl (2002) to convert numbers into string format? For Example 1234 to "One thousand two hundred thirty four". Hi This is one of the features included in the free ASAP Untilities' add-in. There are loads of other useful functions included as well. Their address is www.asap-utilities.com -- Andy. "talia_k" <talia_k@discussions.microsoft.com> wrote in message news:B72BEC8B-1571-46D9-94D5-2A161D7ED9AB@microsoft.com... > Is there a way in Execl (2002) to convert numbers into string format? For > Example 1234 to "One thousand two...

new string started on PF contact folder issue
Thanks so much for taking the time to look at my question. I wanted to clear the air on my original message, I think it had some confusing/incorrect syntax. As I re-read my post, it doesn't make sense, so I'll rephrase. Forget all the references to the GAL as in my 1st post. When the SBS server user creates a PF containg contact items, by default the properties/OAB tab/'show this folder as an email address list' ISN'T ticked. When he does tick it on the server-side, the Outlook 2003 clients open a new email clicks on To: and in the address lists available, the newly c...

SHBrowseForFolder Subclassing.
I would like to change the name of the "cancel" button. Is that possible with Subclassing, Superclassing, etc.? ....Bruce Maybe this article can help you: http://www.codeproject.com/dialog/browse_for_folder_dialog.asp -- Mav Rossi "Bruce Arnold" <b_a_r_n_o_l_d@b_l_a_s_t.n_e_t> ha scritto nel messaggio news:cka5tv4rf6mq086b1nf6t6gom5rgds0a33@4ax.com... > I would like to change the name of the "cancel" button. Is that > possible with Subclassing, Superclassing, etc.? > ...Bruce > > And this too: http://www.codeproject.com/dialog/browse...

get the running path
Hi, i know there was an possibility to get the application exe path from the main args. But I do not remember how to extract the information. Could somebody give me the example? Thanks, Holger hi holger, try this TCHAR szPath[MAX_PATH]; GetModuleFileName(GetModuleHandle(GetExeName()), szPath, MAX_PATH); -- kind regards, muechel while(!sleep()) ++sheep; hi, Try GetModuleFileName() AfxGetInstanceHandle() Dont remember which one will give the path. hth gangadhar Holger Krei�l wrote: > Hi, > > i know there was an possibility to get the application exe path from t...

string value
I am using a loop to iterate through a list and sometimes need one vbTab in the code, other times need (2): vbTab & vbTab : For each Tcolumn in rs.Fields strMy=strMy & vbTab & column.Name & vbCrLf Next Tcolumn How can I do this? If I use a variable, it is not recognized by Access as the vbTab code. Thanks! Sam strMy=strMy & vbTab & iif(Needs2, vbTab, "") & column.Name & vbCrLf Replaces Needs2 with an expression that is true when you need two tabs. HTH John ################################## Don't Print - Save trees smk23 wrote: > I ...

Converting A String to a Column of Data
I have some strings like this (some are as long as 4000 separated values): A;AA;AAI;AAP;AAPL I am looking for a way to convert these strings into column data like this: A AA AAI AAP AAPL Thank you in advance. Data - Text to Columns, delimited by semicolon. Select Data, copy, paste special - transpose. -- Best Regards, Luke M "carl" <carl@discussions.microsoft.com> wrote in message news:E828806F-40A2-4C85-8D01-D55BD8ED28BB@microsoft.com... >I have some strings like this (some are as long as 4000 separated values): > > A;AA;AAI;AAP;AAP...

CRM 4.0 Outlook installation error "The network Path was not found
Hello All, I'm trying to install crm 4.0 on outlook 2007. I keep getting an error at Databaseinsaller.progressmessage "Action Microsoft.Crm.Config.Common.InstallDatabaseAction failed. The network path was not found." I read that if I add the user to Server Surface Area Configuration utility it would work, but it did not for me. I'm running vista ultimate and windows 2008 64 bit. Any help is appreciate it. I can't believe that this install is so difficult. What gives!!! Thanks ...

path...
I created an executable file that opens a .pdf file. The path I use is "MyFolder\\MyFile.pdf". However, when I installed the .exe and MyFolder in the same location it did not open the .pdf file. However, when I put the FULL path to the .pdf file it worked fine. Do I need somthing like the following? "..\\MyFolder\\MyFile.pdf". Thanks in advance, RABMissouri Are you running the exe through a shortcut? Make sure the startup path is the same as the executable path. A better solution would be to get the path of the Exe and use that. GetModuleFileName() AliR. "...

break a text string and export to cell range
Hi All, I am creating a pricing list and from a few hundred possible optio select only a small percentage. Those options are CONCATENATED into cell and seperated by a delimiter (#). Simply cell A1= option a#option c#option q#option r# I need to break this list up so I can see clearly the selecte options. How can I break this apart at the delimiter and place output in cells Something like: c1= option a c2= option c c3= option q c4= option r If there is a better way to go about this Im open to suggestions. Thank -- Message posted from http://www.ExcelForum.com I'd use the text to ...

SHBrowseForFolder question
Ok, I managed to get SHBrowseForFolder to work and it pops up its dialog box, but I would like to be able to use the info in a drop down combobox integrated into my dialog form. Is there a way to do this. What I have is a combobox that I want to show and select the path in, then a list box to display the files, and another combobox to select which drive. I have a specific reason to do it this way and I was wondering if I can use some of the info from the SHBrowseForFolder to do this. It seems like I should be able to, but I have not been able to find any helpful information on just how...

Extracting numbers of a string
Hi. I have many strings like 10+33+98+3+10 and 3+45+33+21+1, each one in a diferent field of a sheet. I want pass the values to individual fields, like A1 (10); B1 (33); C1 (98); D1 (3); E1 (10); I try with MID, LEFT and RIGHT combinate, but the length of the string is different in each string. I need something that remove the "+" between the numbers. Thanks, Apaxe2000 Use Text to Columns and the "+" as the delimiter. Using your sample data in A1 and A2. Select A1 & A2. Go to Data, Text to Columns. Select "Delimited" as your option and click nex...

Pulling out string below certain cells using if statement
Alright i have a huge list of names, cities, emails, numbers an directory listing #'s. I want to somehow pull out all the names in th excel sheet but the names arent' the same number of rows apart an don't have a field identifier with them. The only consistency I coul find is that the name is always directly below the directory numbe which is always listed like abcd*********. So my question is, is ther a way to do an if statement or something similar to this to say if yo hit a directory number pull the cell above it to the right or somethin along those lines. thanks for any sugg...

Expanding string
Hi gents, my scripts are loading configuration settings from external XML files. My problem is that I would like to support also variables in it, however it's automatically saved as string. Therefore $PWD is NOT folder, but '$PWD'. As a workaround, I am using [string]$Var = Invoke-Expression, however it's very easy to inject some code in it, therefore I would like to have just something to expand string. For regular environment variables (%var%), I can of course use [System.Environment]::ExpandEnvironmentVariables, however I am curious if someone knows a...

Getting document name or path not valid msg
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I get a document name or path is not valid. Try one or more of the following: check the path to make sure it was typed correctly; on the file menu click open, search for the file using this dialog box. <br><br>I have tried the disk utility to no avail. This began happening with OS X updates (2 updates ago). If I follow from earlier postings, I should re-install office. Is this correct? I use Entourage and do not want to loose the emails as well as the word documents. Can I safely remove with the Rem...

Relative path to linked graphic
Hi! Is there a way to specify that a linked graphic is on a relative path (e.g., ...\images) instead of the absolute path that Publisher 2002 defaults to? I want to move a document to another folder but the 100+ images in this document will be a pain to update, although they are all in the relative path ...\images. Thanks! Jamon oooohhhh ouch 100+ images - not at all fun. -- :-( no... "���MS�Publisher���" <donotknock@nobodyhome.com> wrote in message news:%23qbD$hVgDHA.1832@TK2MSFTNGP09.phx.gbl... > oooohhhh ouch 100+ images - not at all fun. > > -- > &...

Searching String
I would like to extract numeric values from a alphanumeric field. I can't find an example of what I am trying to do. Example; 1. Cell contains "bpnth500unwumm". Looking for a result in a different cell 500. 2. Cell contains "Natp350rummunw". Looking for a result in a different cell of 1350. 3.Cell contains "napt450rummunw56". Looking for a result in a different cell of 450. 4. Cell contains "a2000ronNa". Looking for a result in a different cell of 2000. 5. Cell contains c40bronmAA16. Looking for a result in a different cell of 40. I have sever...