|
Try this one,
www.codeproject.com/dialog/messagemgmt.asp
Grenouille
|
|
|
|
|
|
thankz everyone!
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
I use RegisterWindowMessage() for this.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi all
i don't know how to send messages to other windows or active window...i think i have to have HWND of other windows and then just use API function sendmessage()///but...
please help me
thanks///
|
|
|
|
|
|
First you get the HWND of the window you want. You use a function like FindWindowEx to do this. Using Spy++ is great for figuring out your window hierarchy. Usually you want to get a window by the third parameter, the class because it doesn’t change like the text can change. Here is a short example:
HWND hNotepad = FindWindowEx(0, 0, "Notepad", 0);
if(hNotepad)
SendMessage(hNotepad, WM_SETTEXT, 0, (LPARAM) "Hah, I found you!");
else
MessageBox(0, "Couldn't find notepad.", "Darn", MB_OK);
|
|
|
|
|
so i know API function FindWindowEx but this function only finds other windows that we knew window's name.But i want to send messeages to other windows that i don't know window's name///
waiting...
thanks for...
|
|
|
|
|
Perhaps you're looking for EnumWindows(). Check it out.
|
|
|
|
|
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
|
|
|
|