MCPcopy Create free account
hub / github.com/TASEmulators/fceux / CollapseWindow

Function CollapseWindow

src/drivers/win/memwatch.cpp:1159–1181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1157}
1158
1159void CollapseWindow(void)
1160{
1161 RECT wrect;
1162
1163 GetWindowRect(hwndMemWatch,&wrect); //Get currect window size
1164
1165 if (!MemWCollapsed) //If window is full size collapse it
1166 {
1167 wrect.right = (wrect.right - ((wrect.right-wrect.left)/2));
1168 MemWCollapsed = true;
1169 SetDlgItemText(hwndMemWatch, MEMW_EXPANDCOLLAPSE, ">");
1170 ChangeMemwMenuItemText(MEMW_OPTIONS_EXPANDCOLLAPSE, "&Expand to 2 columns");
1171 }
1172 else //Else expand it
1173 {
1174 wrect.right = (wrect.right + (wrect.right-wrect.left));
1175 MemWCollapsed = false;
1176 SetDlgItemText(hwndMemWatch, MEMW_EXPANDCOLLAPSE, "<");
1177 ChangeMemwMenuItemText(MEMW_OPTIONS_EXPANDCOLLAPSE, "&Collapse to 1 column");
1178 }
1179
1180 SetWindowPos(hwndMemWatch,NULL,MemWatch_wndx,MemWatch_wndy,(wrect.right-wrect.left),(wrect.bottom-wrect.top),NULL);
1181}

Callers 2

MemWatchCallBFunction · 0.85
CreateMemWatchFunction · 0.85

Calls 1

ChangeMemwMenuItemTextFunction · 0.85

Tested by

no test coverage detected