|
Hi!
I currently write an application as a server that translate user uploaded office files into html or pdf. I write it in VB now, but I am also a VC coder.
My trouble is office will pop up dialog and wait for user to response sometimes. I trace the problems and do some prepare to make it not pop up. But I think I can't trace all the reasons to make office pop up. Is there any solution to make office work without asking question? I can accept it dont process on some file, but can't accept it stop working and have to press a button by human.
If there isn't such a solution. I think I have to use another "police" server that kill the application and recreate a new process when the application seems blocked and don't work for a long time.
I really wanna an elegant solution. Can any guru give me some suggestion?
|
|
|
|
|
hi all
if you want to hear my problem briefly
it's that i have created a rich edit box in my
dialog and now i cant put text in it properly
is there a function or i should do it by first taking its DC(device context) .
lots of thanks you kind professional
|
|
|
|
|
Add Vairable of CString type with ur rich edit Box by Class Wizard ..
then assiagn ur trext to its CString variable.
then use
UpdateData(FALSE);
i.e.
m_strVariable = " My Text ";
UpdateData(FALSE);
i hope u will get it n it works
thanx
zahid
|
|
|
|
|
ramtinbahal wrote:
i have created a rich edit box in my
dialog and now i cant put text in it properly
is there a function
Create a CRichEditCtrl member variable and then use SetWindowText() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
thanks for your simple response
but now i'm trying to put text in a rich edit control
while accessing the way i put it there .
i mean how i can put text at a line number and a column i wish (example line 5 column 20 ) ?
setwindowtext() is good for one line rich edit
but i have a multiline rich edit box .so i need a way to write text in it
how i wish .
Strangely there is no function in rich edit class to do it (except SetWindowText() ) or maybe i dont know because i searched MSDN entirely but nothing found .
lots of thanks
|
|
|
|
|
SetWindowText() can be used, but you'll either need to call GetWindowText() , or have the text stored in a separate buffer. For example:
CString strBuffer1;
...
strBuffer1 = strBuffer1 + "\r\n" + ...
m_edit.SetWindowText(strBuffer1); The other way would look like:
CString strBuffer2;
m_edit.GetWindowText(strBuffer1);
strBuffer2 = strBuffer1 + "\r\n" + ...
m_edit.SetWindowText(strBuffer2); You can also use ReplaceSel() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
realy thank you david
it did work .
i was going to be realy disappoited with microsoft .
but you saved them
good luck
|
|
|
|
|
realy thank you david
it did work .
i was going to be realy disappoited with microsoft .
but you saved them
good luck
|
|
|
|
|
I have hyperlink that is more than 50 character
when I specify it as the following to launch the outlook
CString str_content = "click here";
ShellExecute( NULL, "Open", "mailto:my@domain.com?Body=" + str_content, NULL, NULL, SW_SHOWNORMAL );
If i have shorter str_content and I launch, I can see hyperlink in
my outlook. However, if str_content becomes longer just text displayed in outlook content with all hyperlink code.
How can i get the hyperlink in outlook when i have longer string.
777
|
|
|
|
|
never mind i resolve the problem.
I write to a email file ****.eml and launch the file.
instead of handling everything in memory.
Thanks
777
|
|
|
|
|
A member has tell me: FindFisrtChangeNotification can help me detect a file has been modified on my Computer.
Yeah, but now i wanna know that who has performed a task on my Shared Folders (his is on my Lan NetWork) : " who is the person has pasted the file on my Shared Folder???" or "which computer has done that task???"
Help, Help, Help me.....
(Sorry , my English is not well)
thanks
thanks
|
|
|
|
|
Hi,
Hope this helps
Retrieving the owner of a file requires:
obtain the security descriptor for the file, Use GetFileSecurity()
then using the security descriptor to get a pointer to the owner's Security Identifier (SID). GetSecurityDescriptorOwner()
Finally, you use the owner's SID to obtain the owner and domain name of the file LookupAccountSid()
Cheers
It is Illogical to define an inventor by his invention
|
|
|
|
|
thanks, could you give me a simple example???,
i've tried but it's not resposible:
CString TheFile;
TheFile=CString(Buffer[i].FileName).Left(Buffer[i].FileNameLength / 2);
SECURITY_DESCRIPTOR sd;
DWORD sob;
GetFileSecurity(TheFile,OWNER_SECURITY_INFORMATION,&sd,sizeof(sd),&sob);
SID pOwner;
BOOL OwnerDefault;
GetSecurityDescriptorOwner(&sd,(PSID*)&pOwner,&OwnerDefault);
char AccountName[80];
char DomainName[80];
DWORD cbDomain;
DWORD cbName;
LookupAccountSid(NULL,&pOwner,(LPTSTR)AccountName,&cbName,(LPTSTR)DomainName,&cbDomain,NULL);
::AfxMessageBox(AccountName,0,0);
help me please???!!!
thanks
|
|
|
|
|
When a multiplayer game server outputs commands to your computer, where do they go? Is it possible to catch and log them?
|
|
|
|
|
It depends on the protocol used.
Run Network monitor and view the activity on your machine. Then save captured data to cap files.
It is Illogical to define an inventor by his invention
|
|
|
|
|
void OnButton1Click()
{
CMenu*t=GetMenu();
t->EnableMenuItem(0,MF_BYPOSITION | MF_DISABLED);
}
when i clicked the button1, the menuitem didn't change to disable. it just change to disable when i put the mouse pointer above it.
So please show me the way to change the menuitem to disable when i press the button1.
thanks...
|
|
|
|
|
You need to use MF_GRAYED instead of MF_DISABLED.
MF_DISABLED - Disables the menu item so that it cannot be selected but does not dim it.
MF_GRAYED - Disables the menu item so that it cannot be selected and dims it.
<font=arial>Weiye Chen
When pursuing your dreams, don't forget to enjoy your life...
|
|
|
|
|
A lot of programs that when run in win98 they have the classical interface but in winxp they have another interface (xp style).
But my program when run in winxp, it also have classical interace.
Please show me the way to solve this problem !
thanks...
|
|
|
|
|
|
Hello I'm writing client/server program, I use pipe message to communicate between client and server.
Here is my question.
A server supposes to listen to clients.
So I CreateNamedPipe(), then write the pipe name ""\\\\.\\pipe\\servername" into a text file.
Then called
ConnectNamedPipe(hPipe, NULL) ? TRUE : (GetLastError() == ERROR_PIPE_CONNECTED)
The Client get the string from a text file, then starts to talk to Server by calling CreateFile(), in Server program ConnectNamedPipe() doesn't return until the client get connected (it is true for very first client. I'll explain more later). After the conversation is done, the client closes the pipe, Server call ConnectNamedPipe() again to see whether another client is talking.
server
CreateNamePipe()<br />
while(1)<br />
{<br />
fSuccess = ConnectNamedPipe(hPipe, NULL) ? TRUE : (GetLastError() == ERROR_PIPE_CONNECTED)if(failed)<br />
if (! fSuccess || cbBytesRead == 0) <br />
break;<br />
do conversation,<br />
}<br />
FlushFileBuffers(hPipe); <br />
DisconnectNamedPipe(hPipe); <br />
CloseHandle(hPipe); <br />
When the server call ConnectNamedPipe second time, fSuccess is always failed and close the pipe. How can Server keeps the pipe open until one of the client said, finished all the job.
When the Server is executing ConnectNamePipe, and there is no client talking to him, All the server GUI are died. I cannot click on the button to tells the client to stop waiting if there is no body is talking to him and stay idle.
Is there message handler for a pipe?
Thank you.
|
|
|
|
|
Hi!
I'm going to build a tool that should upload Windows 2000 domain user accounts on a webserver for login purposes... (It's needed for our school website www.leibniz-gymnasium.de to easily manage accounts for pupils)
Is there a way to get the account passwords (encrypted hashes are enough)?
And which encryption algorithm uses Windows 2000 Server? (to generate hashes from the user typed passwords)
I know that a level 3 NetGetUserInfo query returns a pointer structure (USER_INFO_3) containing a pointer to the password string - but this seems to be a null pointer in a Windows 2000 domain environment (as msdn tolds)
Thank you for helping!
Martin
|
|
|
|
|
I don't thing yo'll be able to get this information about the encripting algorithm because if someone knew it windows security would be very vulnerable if you know what I mean.
I you school there try to make an application like server<->client thing.
gabby
|
|
|
|
|
hi
ok, you may be right... but I thougt Windows uses some general algorithm like MD5 or anything else.
But the idea with an client<->server app is not bad. It's easier to use.
thx
Martin
|
|
|
|
|
A program I'm working on has been linking incredibly slowly. It'll show "Linking..." for less than half of the linking time, and then the rest of the time is spent "Creating library [programname].lib and object [programname].exp". The thing is, the program is an executable and thus shouldn't be making those files (which are only a few kilobytes in size), right? I can't find a reference to those files anywhere in the solution or project files, and none of the compiler/linker settings I've enabled/disabled have affected it. How do I stop those files from being built?
|
|
|
|
|