rnd-20091208-1-src
[rocksndiamonds.git] / src / game_sp / TopMost.c
1 // ----------------------------------------------------------------------------
2 // TopMost.c
3 // ----------------------------------------------------------------------------
4
5 #include "TopMost.h"
6
7 #if 0
8
9 // static char *VB_Name = "TopMost_Module";
10 // --- Option Explicit
11 // --- const int SWP_FRAMECHANGED = 0x20;
12 // --- const int SWP_HIDEWINDOW = 0x80;
13 // --- const int SWP_NOACTIVATE = 0x10;
14 // --- const int SWP_NOCOPYBITS = 0x100;
15 // --- const int SWP_NOMOVE = 0x2;
16 // --- const int SWP_NOOWNERZORDER = 0x200;
17 // --- const int SWP_NOREDRAW = 0x8;
18 // --- const int SWP_NOSIZE = 0x1;
19 // --- const int SWP_NOZORDER = 0x4;
20 // --- const int SWP_SHOWWINDOW = 0x40;
21 // --- const int SWP_DRAWFRAME = SWP_FRAMECHANGED;
22 // --- const int SWP_NOREPOSITION = SWP_NOOWNERZORDER;
23
24 // --- const int HWND_BOTTOM = 1;
25 // --- const int HWND_BROADCAST = 0xFFFF;
26 // --- const int HWND_DESKTOP = 0;
27 // --- const int HWND_NOTOPMOST = - 2;
28 // --- const int HWND_TOP = 0;
29 // --- const int HWND_TOPMOST = - 1;
30
31 int SetWindowPos(long h, long hb, int X, int Y, int cx, int cy, int f);
32
33 void TopMost(Object obj)
34 {
35   int i;
36
37   i = SetWindowPos(obj.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE);
38 }
39
40 void UnTopMost(Object obj)
41 {
42   int i;
43
44   i = SetWindowPos(obj.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE);
45 }
46
47 void HideWindow(long hWnd)
48 {
49   int i;
50
51   i = SetWindowPos(hWnd, HWND_BOTTOM, 100, 100, 200, 200, SWP_HIDEWINDOW);
52 }
53
54 #endif