Skip to content

Commit

Permalink
make the window background black upon fullscreen mode
Browse files Browse the repository at this point in the history
  • Loading branch information
leonid-shevtsov authored and leonid committed Oct 5, 2010
1 parent 667ad5d commit 1241fb4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions gvimfullscreen.c
Expand Up @@ -85,6 +85,7 @@ LONG _declspec(dllexport) ToggleFullScreen()
SetWindowLong(hTop, GWL_STYLE, GetWindowLong(hTop, GWL_STYLE) | WS_THICKFRAME);
SetWindowLong(hTop, GWL_STYLE, GetWindowLong(hTop, GWL_STYLE) | WS_DLGFRAME);


SendMessage(hTop, WM_SYSCOMMAND, SC_RESTORE, 0);
SendMessage(hTop, WM_SYSCOMMAND, SC_MAXIMIZE, 0);
}
Expand All @@ -105,6 +106,8 @@ BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam)
SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_EX_CLIENTEDGE);
SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_STYLE) & ~WS_EX_WINDOWEDGE);
SetWindowPos(hwnd, HWND_TOP, 0, 0, g_dx, g_dy, SWP_SHOWWINDOW);

SetClassLong(hwnd, GCL_HBRBACKGROUND, CreateSolidBrush(RGB(0,0,0)));
}
return TRUE;

Expand Down
2 changes: 1 addition & 1 deletion makefile
@@ -1,5 +1,5 @@
gvimfullscreen.dll: gvimfullscreen.c
cl /LD user32.lib gvimfullscreen.c
cl /LD user32.lib gdi32.lib gvimfullscreen.c

clean:
del *.obj
Expand Down

0 comments on commit 1241fb4

Please sign in to comment.