'c++ windows application edit the main window

I'm trying to create a simple windows application in cpp. Opening Visual Studio 2019, I noticed that there is, in fact, a project like that, so I opened up a new one.enter image description here

This is the window I get when I run it. Completely normal, as expected from a brand new project.

But... I can't figure out how to edit the main window? When I go into the project rc directory, there's options to edit everything else. Add new dialogue boxes, add proper gui to them, edit the top bar with new options, etc. Does anyone know where is the gui for editing the main window?



Solution 1:[1]

Here is a simple implementation with flat object. Im not sure how would keys be declared if your object might be nested, and you would expect to extract some of N level of nested value/keys

const obj = {
  A: 1,
  B: 2,
  C: 3,
  D: 4
};

function omit(data, keys) {
  let result = {};

  for (let key in data) {
    if (keys.includes(key)) continue;

    result[key] = data[key];
  }

  return result;
}

console.log(omit(obj, ["A", "D"])) // {B: 2, C: 3}

Solution 2:[2]

One approach is use Object.entries() and filter the entries out that have the unwanted keys then use Object.fromEntries() to create the new object from the filtered entries

const omit = (data, keys) => {
  return Object.fromEntries(
    Object.entries(data).filter(([k]) => !keys.includes(k))
  )
}


console.log(omit({ a:1,b:2,c:3,d:4}, ['a', 'b']))

Solution 3:[3]

Converting to entries with Object.entries and Object.fromEntries and then filtering said entries with <Array>.filter might work nicely:

const omit = (obj, keys) => Object.fromEntries(Object.entries(obj).filter(a=>!keys.includes(a[0])));

Solution 4:[4]

You could destructure and rest for a new object.

function omit(object, keys) {
    let _; // prevent to be global
    for (const key of keys) ({ [key]: _, ...object } = object);
    return object;
}

console.log(omit({ a: 1, b: 2, c: 3, d: 4 }, ['b', 'c']));

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eduard
Solution 2 charlietfl
Solution 3 skara9
Solution 4