Recent

Author Topic: ShowWindow(hWnd, Mode) without function  (Read 8559 times)

HHJB

  • New Member
  • *
  • Posts: 12
ShowWindow(hWnd, Mode) without function
« on: November 28, 2011, 12:16:00 pm »
This function is not functional on WinCE and I dont know if it ever worked. Tested with all of my environments (0.9.28.2..0.9.31).

Any ideas?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: ShowWindow(hWnd, Mode) without function
« Reply #1 on: December 12, 2011, 07:32:44 am »
Which function exactly? From the Windows unit? Or from LCLIntf unit?

And why do you need it anyway? You should use TForm.Show

HHJB

  • New Member
  • *
  • Posts: 12
Re: ShowWindow(hWnd, Mode) without function
« Reply #2 on: December 16, 2011, 08:27:47 pm »
From the Windows unit.

I need it, because I want to re-show an existing window if you start another instance.
TForm.Show must be done from inside the existing instance but I want it to be done by the new instance before its termination.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: ShowWindow(hWnd, Mode) without function
« Reply #3 on: December 17, 2011, 05:54:42 pm »
Try sending a custom message, like WM_MYMESSAGE with a number > WM_USER and catch it in the other application via for example WndProc in the mainform of the other app. The Virtual Magnifying Glass has this feature, although I don't remember how I did it. It has this feature for Windows desktop, but it should work similarly to Windows CE:

http://magnifier.svn.sourceforge.net/viewvc/magnifier/trunk/magnifier.dpr?revision=210&view=markup

94         AHandle := FindWindow(nil, szAppTitle);
95         SendMessage(AHandle, MYWM_SHOWGLASS, 0, 0);

Check what it does to handle MYWM_SHOWGLASS

 

TinyPortal © 2005-2018