|
Hi
Thx's for help.I try this it is working.
But it is working i different way.It is storing d in string b.
I want to cut d and store \\jhdjh\\as.data
Plz help..
|
|
|
|
|
knowvc wrote: I want to cut d and store \\jhdjh\\as.data
Sorry I misunderstood your question. If you want to do so, you can use the Right() function instead of Left().
If you are actually dealing with the file paths and you want to cut the drive information, its better to use PathSkipRoot[^]
|
|
|
|
|
Thx's Again it's help me
Problem solved..
|
|
|
|
|
Hi one more problem i have how can i add drive name and string.
i mean i want to add drive name
c:\\ and
LPCTSTR lp
LPCTSTR lp=file\\file.ed and i want to add here
CopyFile(st, "c:\\" + lp ,TRUE);
Plz help me
|
|
|
|
|
Better use a CString.
CString cs = "c:\\";<br />
cs += "file\\file.ed";<br />
CopyFile(st, cs,TRUE);
|
|
|
|
|
|
Try AfxExtractSubString() .
"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
|
|
|
|
|
IS there any solution to give color to TabControl buttons..........................?????
|
|
|
|
|
|
In a Dialog based MFC program, Can I use class CToolBar? or I just can use CToolBarCtrl?
And how to add two CTolBarCtrls in the dialog based program?
|
|
|
|
|
|
Thanks very much for your reply.
Yes, it will be very kind if you send me your sample. I'm fooled by it.
Send the sample to this email: albertkong1984@gmail.com
Thx.
|
|
|
|
|
The sample is already there in that link. Here is direct link[^]
|
|
|
|
|
Take a quick look at this link[^]">.
Regards,
Rane
modified on Thursday, September 4, 2008 11:59 PM
|
|
|
|
|
And how about adding two CToolBarCtrl in a dialog?
|
|
|
|
|
how can i give or set color of tabcontrol buttons (background color ) in visual c++ code.
|
|
|
|
|
|
hello all:
when i use NetWkstaUserGetInfo function
typedef struct _WKSTA_USER_INFO_1 {
LPWSTR wkui1_username;
LPWSTR wkui1_logon_domain;
LPWSTR wkui1_oth_domains;
LPWSTR wkui1_logon_server;
}WKSTA_USER_INFO_1, *PWKSTA_USER_INFO_1, *LPWKSTA_USER_INFO_1;
_WKSTA_USER_INFO_1 t;
char tm[100]={0};
NetWkstaUserGetInfo(NULL,1,(LPBYTE*)(&t));
strcpy(tm,(char*)t.wkui1_username);
"65168" is the t.wkui1_username value
why is not the current user name?
a beginner
|
|
|
|
|
alphaxz wrote: char tm[100]={0};
NetWkstaUserGetInfo(NULL,1,(LPBYTE*)(&t));
strcpy(tm,(char*)t.wkui1_username);
Since Unicode is defined, why not use:
TCHAR tm[100] = {0};
NetWkstaUserGetInfo(NULL, 1, (LPBYTE *) (&t));
_tcscpy_s(tm, _countof(tm), t->wkui1_username); alphaxz wrote: why is not the current user name?
Because t should be a pointer instead:
LPWKSTA_USER_INFO_1 t;
"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
|
|
|
|
|
I can't understand what do you mean?
a struct or a point to a struct ,any difference?
a beginner
|
|
|
|
|
Just take a look at the below piece of code and hope you will be clear..
DWORD dwLevel = 1; // Specifies the information level of the data
LPWKSTA_USER_INFO_1 pBuf = NULL;
NetWkstaUserGetInfo(NULL,
dwLevel,
(LPBYTE *)&pBuf);
The 3rd parameter is the pointer to the buffer that holds the data.
A point to note here is that this function will work only locally and will fail if you try to enumerate the list of remote users...
Regards,
Rane
|
|
|
|
|
thanks all
I've got the answer
the difference between ansi and unicode
a beginner
|
|
|
|
|
alphaxz wrote: I can't understand what do you mean?
I gave you the code. What's not to understand?
alphaxz wrote: a struct or a point to a struct ,any difference?
Yes, a big one. Notice the third argument to NetWkstaUserGetInfo() is supposed to be a BYTE** . The second pointer is there so that NetWkstaUserGetInfo() can allocate memory for the structure.
Don't forget to call NetApiBufferFree() .
"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
|
|
|
|
|
thank u very much
i've got the answer under your instruction
a beginner
|
|
|
|
|
In the parent window, I use a child window to group controls, and want the parent window to handle their messages. In other words, let the child window only deal with position problems. Does Windows have any mechanism that supports this?
system
|
|
|
|