|
Hope I understood your question
you want to close notepad or anything that open your file
use FindWindow
...
...
ShellExecute(NULL, "open", str ,NULL, NULL, SW_SHOWNORMAL);
MessageBox("A");
HWND hWnd = ::FindWindow("Notepad", NULL);
::SendMessage(hWnd,WM_CLOSE,0,0);
whitesky
|
|
|
|
|
Hi WhiteSky,
Thank you very much ....U are simply great in VC++
Regards,
Vinay Charan.
|
|
|
|
|
if possibe can u tell me what are HWND hwnd ??? is it an handler ??
|
|
|
|
|
yes handle to window
whitesky
|
|
|
|
|
Hi !!!
Your sample:
------------
ShellExecute(NULL, "open", "str" ,NULL, NULL, SW_SHOWNORMAL);
My sample:
----------
ShellExecute(NULL, "open", str ,NULL, NULL, SW_SHOWNORMAL);
You cannot give it into the quotes.
I hope, I helped you.
By.
-:KNOX:-
|
|
|
|
|
Some condition:
1. in sync mode, just for simplification
2. TCP/IP stream mode
Peer A:
send 5 bytes
send another 5 bytes
wait until all the data is received at the buffer of Peer B, then Peer B:
case 1:
recv 20 bytes
Will Peer B get 5 or 10 bytes?
case 2:
recv 2 bytes
Will Peer B get the first 2 bytes of the first 5 byte?
If yes, what is going on by recving 2 bytes a time until all data is recved?
-- modified at 3:49 Tuesday 23rd May, 2006
|
|
|
|
|
followait wrote: For example in sync mode, just for simplification.
Peer A:
send 5 bytes
send another 5 bytes
wait until all the data is received at the buffer of Peer B, then Peer B:
case 1:
recv 20 bytes
Will Peer B get 5 or 10 bytes?
case 2:
recv 2 bytes
Will Peer B get the first 2 bytes of the first 5 byte?
If yes, what is going on by recving 2 bytes a time until all data is recved?
This is may due to the network traffic.
generally people uses the loop until you get whole data and after that process that data.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Suppose that all the data is received at the buffer of Peer B, just waiting for achiving. In this case, there is no network traffic problem, isn't it?
|
|
|
|
|
followait wrote: Suppose that all the data is received at the buffer of Peer B, just waiting for achiving. In this case, there is no network traffic problem, isn't it?
The network traffic is depends on max. bandwidth your network support and type of your connections (Dialup or Broadband).
You receive all the data, no matter but we can't sure that you can get all the data at a time.
So, As per my knowledge whatever you receive in case of PEER B: 2 bytes of 5 Bytes are 'first' 2 bytes of 5 bytes.
hope i understood your problem.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
In case 1, peer B can get anything between 1 to 10 bytes. In case 2, B gets first 1 or 2 bytes. In either case, B must loop until all data is received.
|
|
|
|
|
|
Please sujjest me the related code or info regarding progress bar in SDK.
Thanks in advance..
Ashok.
|
|
|
|
|
Which SDK ? What kind of application are you doing exactly ? Is it pure win32 or with the MFC ?
Anyway, you can simply add a progress bar to your dialog resource and then how you use depends of the type of application.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
It is pure win32 application.please reply.....
Thanks in advance,
Ashok.
|
|
|
|
|
|
|
maybe it is some helpful to you Here[^]
whitesky
|
|
|
|
|
I use movewindow() to change size of tree,after that how to judge whether should show scroll bar?
The tree cant show scrool bar automatically.My app is based on dialog.
I want to show scroll bar according to the widest item
whether full visible. However, how to get the widest item expanded?
-- modified at 3:41 Tuesday 23rd May, 2006
|
|
|
|
|
Hello,
I have derived my class from CRichEditCtrl and now I want to check the handle of this class with NULL. For that I need to retrive the Handle of the CRichEditCtrl window. But CRichEditCtrl don't have any functionthat returns a Handle. How shall I proceed then?
Regards
Rakesh
Rakesh
|
|
|
|
|
Rakesh_Thakur wrote: But CRichEditCtrl don't have any functionthat returns a Handle. How shall I proceed then?
GetSafeHwnd() or m_hWnd (member variable).
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
i have 2 edit controls . whatever i enter in the first control should be added to second control. the second edit control already contains some text. the newly entered text must be added to the second edit control wihtout erasing the contents of second edit control. pls tell me the code to do this
Thanks
|
|
|
|
|
m_Edit1->GetWindowText(str1);
m_Edit2->GetWindowText(str2);
str2.Insert(0,str1);
m_Edit2->SetWindowText (str2);
whitesky
|
|
|
|
|
seems this wont wont work.....
because, when it comes for the second time, repeated characters will be the result.
e.g:
text1: Tes
text2: Fixed
first time output
str2: TesFixed
second time I append a character "t" in text box
the output will be
str2: TestTesFixed
seems he is not seeking for an output like this
SaRath
|
|
|
|
|
this is only one way not code for run i know if use this code it concat str1 to str2 and repeat to....(you can see that i write only str)
I dont know that he wants where use this way
whitesky
|
|
|
|
|
there r 2 edit controls ("name" and "store"). the first control is where text can be entered. the second control stores all the txt eneterd in first control on clck of button
for ex:name : vc++
store:c c++ java html
the store edit control already contains sum text. when i enter vc++ and click a button vc++ shud be added in "store" and the final output wud look like
store:c c++ java html vc++. here nothing can be entered in store control.this is what i want to do
-- modified at 2:54 Tuesday 23rd May, 2006
|
|
|
|