WndProc e FindWindow

  • Thread starter Thread starter crino
  • Start date Start date
C

crino

Hi,
it's normal that findwindow() doesn't returns the same handler of
MessageWindow in CF??
if no...
why MessageWindow doesn't match with FindWindow??

thanks in advance ;)
 
What do you mean? Can you provide code that shows the descrepancy?

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate
 
in my main form i written:
internal class MsgWindow: MessageWindow
{
public MsgWindow()
{
}
protected override void WndProc(ref Message m)
{
switch(m.Msg)
{
case 5000:
break;
}
base.WndProc (ref m);
}
}
in form constructor:
msg = new MsgWindow();
IntPtr hwndInMain = msg.Hwnd;

in an other app i'm tring to send a message to the main application,
so:
IntPtr hwndOfMain = FindWindow(null, "MyApp");
if (hwndOfMain != IntPtr.Zero)
{
int ret = SendMessage(hwndOfMain, 5000, 1, 0);
}

why hwndOfMain is different of hwndInMain ??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top