|
Is the impersonation needed for CopyFile() to succeed?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I need to enable a a single CEdit control to show messages from all the languages english, chinese, german, hindi etc, in other terms I wish to make edit control unicode enabled.
1. I create a unicode text(.txt) file, and enter characters from German language like "ÖÄß" etc, and few characters from hindi language "सवबहठ".
2. I read this file using CStdio class, and try to print these characters in my edit control, however i find that string shown on the edit control is "ÖÄß?????".
What am I missing ? what could be done to make it work correctly. Do I need to find a font which supports all the languages in the world and assign this font to my edit control ?
Thanks in advance!
Regards
Suyash
|
|
|
|
|
I am trying the same thing. I tried changing the font of the edit ctrl for the current font for which the character belongs.
But this will make the string look like ÖÄß????? and then make it ???सवबहठ.
So I guess CEdit is of no help.
I tried CRichEdit Control. But this doesnt support unicode atall.
Can any one help?
|
|
|
|
|
Arti,
I tried CRichEdit Control. by default it doesn't support unicode.
l_pWnd->Create( _T( "RichEdit20W" ), NULL, in_dwStyle,
in_rcRect, in_pParentWnd, in_nID );
please note "RichEdit20W" which makes the CRichEditControl unicode enabled, by default its "RichEdit"
hope it helps.
regards
suyash
|
|
|
|
|
i was wondering how do you grey-out / disable the date time picker, is there a flag that can be changed say using a send message?
i have my date time picker as a CDateTimeCtrl type
|
|
|
|
|
Disable:
CDateTimeCtrl yourCtrl;
yourCtrl.EnableWindow(FALSE);
Enable:
CDateTimeCtrl yourCtrl;
yourCtrl.EnableWindow(TRUE); CDateTimeCtrl derives from CWnd, which exposes the EnableWindow function, hence you can use EnableWindow on all CWnd derived objects
- Dy
-- modified at 9:45 Tuesday 11th April, 2006
|
|
|
|
|
Did you try this?
GetDlgItem(IDC_YOUR_DATE_TIME_PICKER)->EnableWindow(FALSE);
regards!
|
|
|
|
|
thanks all, enablewindow works perfect, dont know why i didnt think of that!! i was trying to the the EN_******** to use with a sendmessage!!
|
|
|
|
|
EN_******** messages are for EditBoxes controls
|
|
|
|
|
hi all
i want to show the folder with icons on the dialob box or any other window. and when user clicks on any folder it shows its contents like the windows normally does. how to do this.
Tasleem Arif
|
|
|
|
|
Your question is a bit unclear? What folder, and what dialog box are you referring to?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi tasleem143 ,
Do you need to icon folder in system?
|
|
|
|
|
tasleem143 wrote: hi all i want to show the folder with icons on the dialob box or any other window. and when user clicks on any folder it shows its contents like the windows normally does. how to do this.
Use ListCtrl with view as ICON
|
|
|
|
|
Hello everybody!
I've been working for some hours in a project of a GUI app that runs a console app (ssh) in background. Well, I've been using many examples of code from here (codeproject) and from the internet, but I had aways stoped at the same error. Maybe someone can give me some help... here is what happens:
I create the pipes and begin the execution of the program... everything goes fine, the ssh program ask for the password, and then I use WriteFile to send it the password. >Crash!<
It continues the execution and do not even try to validate the password
I'll put some code here:
if(!CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &secattr, 0))
AfxMessageBox("Error in pipe Out");
SetHandleInformation(hChildStdoutRd, HANDLE_FLAG_INHERIT, 0);
if(!CreatePipe(&hChildStdinRd, &hChildStdinWr, &secattr, 0))
AfxMessageBox("Error in pipe In");
SetHandleInformation(hChildStdinWr, HANDLE_FLAG_INHERIT, 0);
STARTUPINFO sInfo;
ZeroMemory(&sInfo,sizeof(sInfo));
PROCESS_INFORMATION pInfo;
ZeroMemory(&pInfo,sizeof(pInfo));
sInfo.cb=sizeof(sInfo);
sInfo.dwFlags |= STARTF_USESTDHANDLES;
sInfo.hStdInput = cssh->hChildStdinRd;
sInfo.hStdOutput = cssh->hChildStdoutWr;
sInfo.hStdError = cssh->hChildStdoutWr;
CloseHandle(csftp->hChildStdoutWr);
for( ;; ) {
if(!ReadFile(csftp->hChildStdoutRd, buf, 100, &dwRead, NULL) || dwRead == 0)
break;
buf[dwRead] = '\0';
strAux = buf;
cssh->ShowText(strAux);
}
strcpy(strPass, szBuf);
if(!WriteFile(hChildStdinWr, szBuf, strPass.GetLength() ,&dwWritten, NULL))
AfxMessageBox("Error in hChildStdinWr");
if(!CloseHandle(hChildStdinWr))
AfxMessageBox("Error in hChildStdinWr");
After execute the code above, the ssh app runs all the authentication with failure
<br />
user@host's password: <br />
user@host's password: <br />
user@host's password: <br />
user@host's password: <br />
user@host's password: <br />
Using username "user".<br />
Access denied<br />
Access denied<br />
Access denied<br />
Access denied<br />
Access denied<br />
Fatal: Server sent disconnect message<br />
type 2 (SSH_DISCONNECT_PROTOCOL_ERROR):<br />
"Too many authentication failures for user"<br />
Any help, is welcome
cheers!
-- modified at 9:13 Tuesday 11th April, 2006
|
|
|
|
|
|
Hi David, thanks for your quick reply.
Yes, I read those articles. But I still have problems to 'adapt' to a GUI app... they all implement console applications.
thanks anyway
-- modified at 9:23 Tuesday 11th April, 2006
|
|
|
|
|
Hi Dadiv, All.
I found the problem.
if(!CloseHandle(hChildStdinWr))
AfxMessageBox("Erro ao fechar o handle hChildStdinWr");
This handle, must not be close.
Thanks all for the atention,
Regards!
|
|
|
|
|
1)upload ur code somewhere, someone may download and test it for u.
2)u do need to study a sample carefully.
at least, i don't think code like this meaningful:
sInfo.hStdInput = cssh->hChildStdinRd;
before u call
CreatePipe() and CreateProcess()
A special image tool for C++ programmers, don't miss it!
The world unique Software Label Maker is here for you and me ...
A nice hyper tool for optimizing your MS html-help contents.
|
|
|
|
|
Hai,
How can we retrieve the IPAddress from a DNS Site Name. How can we fetch the information regarding a particular site using its IP Address. So Please give a reply for me.
Jeeva
|
|
|
|
|
Jeeva Mary Varghese wrote: How can we retrieve the IPAddress from a DNS Site Name.
Use gethostbyname() .
Jeeva Mary Varghese wrote: How can we fetch the information regarding a particular site using its IP Address.
Information such as?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
Does somebody still has Microsoft Visual C++ 1.5 Professional?
|
|
|
|
|
Yes, I do (have 1.52c).
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Can you please send me a copy?
|
|
|
|
|
mwhahahah, nice try.
even if you did get a copy (which is not legal), i doublt you could do something powerful since the standard is far from this implementation now...
|
|
|
|