Hello, I have a problem with a simple program who calls some API functions on a WinCE 6.0 device/emulator. When the code is called in a Graphical Free Pascal Application, let's say in a button click or a timer event, everything is fine.
Can you help me to make this program work without forms/GUI?
Thank you, best regards!
this is the code (it just changes the z-order of some windows):
-declarations of functions:
function FindWindow(lpClassName:widestring; lpWindowName:widestring): thandle; stdcall; external 'coredll.dll' name 'FindWindowW';
function SetWindowPos(hWnd:integer; hWnd2:integer; x:integer; y:integer; cx:integer; cy: integer; wFlag:integer): thandle; stdcall; external 'coredll.dll';
-use of them:
hwnd:=FindWindow('49154','');
hwnd2:=FindWindow('SystemInformation.Class','');
SetWindowPos(hwnd2, hwnd, 0, 0, 0, 0, 19);