|
Then you can bank upon Classname i.e. FindWindow find windows using two criteria either it use window caption to find window or Classname.
for getting the classname of that particular windows you can use external software like spy++ which comes with Visual studio.
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
When compiling or running,there is a debug error: " Run-Timeb Chenk Failure #3-the varible 'enVideo' is being used without being defined"
How can I solve this problem? thanks......
HRESULT CAVDlg::DeliverMedia(long lMediaType, RTC_MEDIA_EVENT_TYPE enType, <br />
RTC_MEDIA_EVENT_REASON enReason)<br />
{<br />
RTC_VIDEO_DEVICE enVideo;<br />
BOOL fShow;<br />
HRESULT hr = S_OK;<br />
<br />
<br />
switch (lMediaType)<br />
{<br />
case RTCMT_VIDEO_SEND:<br />
enVideo = RTCVD_PREVIEW;<br />
break;<br />
<br />
case RTCMT_VIDEO_RECEIVE:<br />
enVideo = RTCVD_RECEIVE;<br />
break;<br />
<br />
case RTCMT_T120_SENDRECV:<br />
break;<br />
<br />
default:<br />
return S_OK;<br />
}<br />
<br />
switch (enType) <br />
{<br />
case RTCMET_STARTED:<br />
fShow = TRUE;<br />
break;<br />
<br />
case RTCMET_STOPPED:<br />
::ShowWindow(m_hRecvVideoParent, SW_HIDE);<br />
::SetParent(m_hRecvVideoParent, NULL);<br />
<br />
::ShowWindow(m_hPrevVideoParent, SW_HIDE);<br />
::SetParent(m_hPrevVideoParent, NULL);<br />
<br />
SetState (RTCSS_IDLE);<br />
<br />
SAFE_RELEASE(m_pSession);<br />
<br />
DestroyWindow();<br />
return S_OK;<br />
<br />
case RTCMET_FAILED:<br />
fShow = FALSE;<br />
break;<br />
<br />
default:<br />
return S_OK;<br />
}<br />
<br />
hr = ShowVideo(enVideo, fShow);<br />
<br />
return hr;<br />
<br />
}
|
|
|
|
|
You only assign a value to enVideo in one case so if that case is not executed there will not be a value assigned.
When you declare enVideo assign a default value.
Elaine
The tigress is here
|
|
|
|
|
|
Hi,
I have developed one simulator in MFC/C++ which interact with the realtime control software on the same machine and perform well.Now i want this simulator should also communicated when control software run on different machine.Input for simulator should be the ip of the system where control software running.Can socket programming help in this requirement.
Thanks
|
|
|
|
|
|
Can you please let me know how? If i will use socket programming
1)I need to know the ip of the machine where control software running.
2)Common port should be there for communication.
Do you have any suggestion to overcome performance issue?
Thanks
|
|
|
|
|
|
I am not allow to make any change into control software code.I can only make changes into simulator code.
|
|
|
|
|
itkid wrote:
1)I need to know the ip of the machine where control software running.
yes you need as it reuired for socket connection
itkid wrote:
2)Common port should be there for communication.
if there is no common port how will you communicate betwwen two sockets
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Hi all, I have a project which has sub projects in it..one project will be the start up project.Can i inlcude the header file of one proj in another and Is it sufficient if i make the declaration in the startup file
|
|
|
|
|
You can include files from all over the place. Observe:
// if you want to go up, use ..
#include "../secret.h"
// if you need to go down, use /
#include "/mission/command/base.h"
You could just make one huge header file which includes all the header files. Most people only do this with header files that rarely change because if you change say, base.h and everyone includes base.h then they all have to recompile if the change was drastic enough. Changing the size of an object or type of a function will do it.
|
|
|
|
|
hii,
how if user want to input in binary?
than the display the input...?
like...001001..
i already try if user input in decimal...
and display in binary...it work..
but if i want add some operation like OR and XOR
the value still in decimal...
anybody can help me...some advise or sample...
thanks..
chal
|
|
|
|
|
Could you be more explicit ?
I can't really understand what exactly you need to do
m0n0
|
|
|
|
|
hii..
thanks for your respond..
i want to do statistical test...
like...this example...
the flow :
K1 = 0000;//just example
M1 = 0000;
K2 = x ; ( x is input from user like 0001, 0010, 0100, 1000, etc)
M2 = 0000;
Temp1 = K1 OR M1;
Temp2 = K2 OR M2;
Result = Temp1 XOR Temp2;
from this flow...
I want to read input in binary and do bitwise operator
and printf also in binary..
I don't know how..
i already done but input in decimal and convert in binary..
but if i do bitwise operator, the result not in binary...
hope your idea..
need some guide..
chal
|
|
|
|
|
How about something like:
int ch,
x = 0;
char szInput[64];
printf("Enter a base-2 number: ");
do
{
ch = _getch();
if (ch == '0' || ch == '1')
{
printf("%c", ch);
szInput[x++] = ch;
}
} while (ch != 0xd);
szInput[x] = '\0';
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
thank for your opinion...
but how to print out the value of ch..
after input from user...?
i try do this..
add after the loop
>>printf("output is: %c",ch);
nothing come out..
chal..
|
|
|
|
|
Assuming you are using 0xd as the terminating condition, printing the variable ch after the loop terminates is obviously not going to work as 0xd is a whitespace character.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi friends,
I have one problem regarding Service.I have created service using Service API(i.e Winsvc.h).When I create and install service as LocalSystem account(i.e when its user is system,i.e last 2 parameters in CreateService are NULL) every thing works fine.But my problem requires service to have access to domain resources.So I have to specify the user name and password in last 2 parameters of CreateService function.But doing this doesn't work when I try to start servce after installing it.Starting it gives "logon failure" message.But when I change username and password manually in service property applet then every thing works fine.Can any one guide me where I am making mistake???
Waiting for positive reply.
Regards,
k@lpe$h
|
|
|
|
|
Im having a UI with dialogs embedded within other parent dialogs
say sub dialogs as tabs of a main dlg
I need to do some validation when a current tab is active only
so I used
CWnd* pWnd = GetActiveWindow();<br />
if(pWnd == this)<br />
{<br />
}
however the GetActiveWindow returns the parent window handle and not the sub Windows handle as pointed by this
how do Isolve this??
|
|
|
|
|
Are you using a CTabCtrl or a CPropertySheet?
Use either CTabCtrl::GetCurSel() or CPropertySheet::GetActivePage()
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
CP and MFC Gurus:
I have a CPropertySheet that contains some CPropertyPages (5), a CTreeCtrl, and a CListCtrl.
When I build/test in Debug mode I get/see what I expect. When I build and test in Release mode, I have problems with my CListCtrl.
I create CListCtrl in my PropertySheet::OnInitDialog(). I do the same for the CTreeCtrl. I override CPropertyPage::OnSetActive() to initialize my CListCtrl with data - Header text, item text, a 2 column list, with about 30 items. A few places within processing, I call ::SetActivePage() to update my CListCtrl - like when switching from page to page in the PropertySheet.
What i see in Release is an empty CListCtrl, no text in the rows of the list, and nothing in the Header either. I have used some "print stmnts" to check the filling of the CListCtrl and it does execute the code, but nothing is visible in Release mode.
Any suggestions or where I can look to for help?
Much thanks!
Johnny
|
|
|
|
|
|
hi
is it necessary to have smtp server on that machine to send mail.
suppose i dont have the smtp server than how can i send mail through code(dont tell me the code just what process should be followed), and 2nd query is
is the smtp server is part of mail server or it is present in every ISP including those who dont have the mailing facility.
ddd
|
|
|
|
|
An SMTP server is just a server that receives e-mail messages and then routes them to the appropriate recipient. You don't need one on the machine that's sending the mail. (you can install one if you want, but most ISPs provide one for you)
So when you load your e-mail client up and blast off a message, it gets sent to an SMTP server (the one setup in your client), which then analyzes the message information and relays it to another SMTP server or stores it locally if it has reached its final destination.
I guess a real world analogy of an SMTP server would be a post office. You write the letter (create e-mail), then take it to the post office. (click Send in e-mail client). It doesn't matter which post office you take it to, just as it doesn't matter which SMTP server you send your e-mail to - they all follow the same protocol. Once there, the mailman (code in the server) analyzes the address, then determines the best route (hah) to deliver it. The letter is then transfered to another post office (SMTP server) or is placed in a mailbox. (Inbox)
All background info on SMTP can be found here:
http://www.faqs.org/rfcs/rfc821.html
For sending in code:
1) Nish's New Article
http://www.codeproject.com/tips/CSMTPConnection2.asp
2) MAPI is another common way for sending mail. If you search the MFC code in your Visual Studio install folder, the CDocument class has a function that implements MAPI. (OnFileSend or such)
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|