ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/RenegadeMapSelector/RenegadeMapSelector.cpp
(Generate patch)

Comparing trunk/RenegadeMapSelector/RenegadeMapSelector.cpp (file contents):
Revision 77 by douglas, 2003-03-13T22:55:21-08:00 vs.
Revision 84 by douglas, 2003-03-14T00:19:14-08:00

# Line 82 | Line 82 | void selector(void);
82  
83   int main(int argc, char* argv[])
84   {
85 <        gtk_init(&argc, &argv);
85 >        if (!gtk_init_check(&argc, &argv))
86 >        {
87 >                cerr << argv[0] << ": Cannot open display, need a clue-by-four?\n";
88 >
89 >                return 1;
90 >        }
91   #endif
92  
93          string error;
# Line 163 | Line 168 | int CALLBACK selector(HWND hwndDlg, UINT
168          {
169          case WM_INITDIALOG:
170                  {
171 +                        RECT rc, rcDlg, rcDesktop;
172 +
173 +                        GetWindowRect(GetDesktopWindow(), &rcDesktop);
174 +                        GetWindowRect(hwndDlg, &rcDlg);
175 +                        CopyRect(&rc, &rcDesktop);
176 +
177 +                        OffsetRect(&rcDlg, -rcDlg.left, -rcDlg.top);
178 +                        OffsetRect(&rc, -rc.left, -rc.top);
179 +                        OffsetRect(&rc, -rcDlg.right, -rcDlg.bottom);
180 +
181 +                        SetWindowPos(hwndDlg, HWND_TOP, rcDesktop.left + (rc.right / 2),
182 +                                rcDesktop.top + (rc.bottom / 2), 0, 0, SWP_NOSIZE);
183 +                }
184 +                {
185                          char* directory = new char[MAX_PATH + 1];
186                          GetCurrentDirectory(MAX_PATH + 1, directory);
187                          if (debug) cerr << "directory = " << directory << "\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines