I'm using the following functions in my program:
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr GetParent(IntPtr hWnd);
My question is: is this approach safe and stable? My development machine is Windows XP and so far I didn't find any problem with its use. I wonder if I can have issues in different versions (e.g. Windows Vista, Windows 7, whatever), different cpus (x64), etc. Can you guys provide some feedback on this and if there are some potencial issues how can I overcome them?
Thanks in advance.
Zubrowka