|
Hi all..
I have the string of the following format.
example: http://server/sharanu/inbox/test.jpg
Now i want to get only the string inbox and sharanu..
can anyone help me..
thank you
|
|
|
|
|
|
|
|
|
Use CString::ReverFind alongwith CString::Right or CString::Left to extract the string you want.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Search for the '/' token
(plain C)
strtok [^]?
(ATL/MFC)
CStringT::Tokenize [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CString str = "http://server/sharanu/inbox/test.jpg";
int i = str.ReverseFind('/');
str = str.Left(i);
CString sValue1 = str.Right(str.GetLength() - str.ReverseFind('/') -1);
i = str.ReverseFind('/');
str = str.Left(i);
CString sValue2 = str.Right(str.GetLength() - str.ReverseFind('/') -1);
|
|
|
|
|
sir i am new in c++.we are just doing general program in c++ like adding two numbers or nested classes.sir can you help me in network nprogramming and how to learn about other headre files and reserved variables like time_now.if you have ebook please give me the link.
|
|
|
|
|
What has to do your message with its title?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Per your post's subject, see SetLocalTime() and SetSystemTime() .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
How do I go about entirely disabling a Tree View's selection? I want my app to focus on a node via the user's mouse and not by the default of the keyboard selection. Otherwise, the keyboard selection does not follow the user's mouse clicks.
|
|
|
|
|
Hi,
I have a custom ListCtrlEx which embeds a combobox in it. When the selection of combobox changes I am sending a user defined message to its parent(ListCtrlEx here) using GetParent()->SendMessage() and from ListCtrlEx again to its parent that is the dialog box(here) and handling the message there for identifying the changed row and coloumn. Now my query is if I use 2 ListCtrlEx controls in one dialog box, How do I identify from which ListCtrlEx I got the notification from?? Whihc parameter should I pack in WPARAM so I can uniquely identify the ListCtrlEx which send the message.
Any help would be appreciated.
With Reagards
Vikas
|
|
|
|
|
the ID or the window
Vikas_123 wrote: Whihc parameter should I pack in WPARAM so I can uniquely identify the ListCtrlEx which send the message.
You may use either the ListView control ID or its window handle.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
I am getting a linking error while using the following code from MSDN.
BOOL IsUserAdmin(VOID)
/*++
Routine Description: This routine returns TRUE if the caller's
process is a member of the Administrators local group. Caller is NOT
expected to be impersonating anyone and is expected to be able to
open its own process and process token.
Arguments: None.
Return Value:
TRUE - Caller has Administrators local group.
FALSE - Caller does not have Administrators local group. --
*/
{
BOOL b;
SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
PSID AdministratorsGroup;
b = AllocateAndInitializeSid(
&NtAuthority,
2,
SECURITY_BUILTIN_DOMAIN_RID,
DOMAIN_ALIAS_RID_ADMINS,
0, 0, 0, 0, 0, 0,
&AdministratorsGroup);
if(b)
{
if (!CheckTokenMembership( NULL, AdministratorsGroup, &b))
{
b = FALSE;
}
FreeSid(AdministratorsGroup);
}
return(b);
}
|
|
|
|
|
|
I have linked Advapi32.lib.. But still getting this error.
|
|
|
|
|
Check whether you've included that library in your both (or all of) configuration (i.e. Release, Debug). I suspect that.
- Malli...!
|
|
|
|
|
No.. It is included. I am using vc++6.0. I doubt whether this works in VC++6.0.. I am not sure.
|
|
|
|
|
Can you please paste the linking error here ?
- Malli...!
|
|
|
|
|
Since CheckTokenMembership() is on Windows 2000+, you may not have
a library in your old SDK that has the export (if you're using an old SDK).
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I have a Parent Dialog on which there is a child dialog with three Group Boxes . Is there any way that i can change the background of the three group boxes. The group boxes are having certain static labels which have value during run time as well as statically.
So please tell me the way to change the background of the group box which is a part of child dialog.
I am working on mfc.
Thanks In Advance.
Dhiraj Kumar Saini
|
|
|
|
|
|
|
I am trying to use the tab control in VS2003, I have added the tab to a dialog template in the dialog editor and used the TCM_INSERTIEM message to add my tabs to the tab control. My question is how do I add a child window to a specified tab? (not using MFC BTW).
|
|
|
|