Now that I have found how to make another window how do I interact with it

This is my code.

//main.cpp

#include “ofMain.h”
#include “ofApp.h”

int main( ){
ofSetupOpenGL(1024,768,OF_WINDOW); // <-------- setup the GL context
ofGLFWWindowSettings settings;

settings.resizable = false;
settings.decorated = false;
settings.setPosition(ofVec2f(100, 100)); // 4K display, portrait
settings.setSize(500, 500);
//auto window = ofCreateWindow(settings);

shared_ptr<ofAppBaseWindow> mainWindow = ofCreateWindow(settings);
shared_ptr<ofApp> mainApp(new ofApp);


ofRunApp(mainWindow, mainApp);
ofRunMainLoop();

}
//ofApp.h
#include “ofMain.h”

class ofApp : public ofBaseApp{

public:
	void setup();
	void update();
	void draw();

	void keyPressed(int key);
	void keyReleased(int key);
	void mouseMoved(int x, int y );
	void mouseDragged(int x, int y, int button);
	void mousePressed(int x, int y, int button);
	void mouseReleased(int x, int y, int button);
	void mouseEntered(int x, int y);
	void mouseExited(int x, int y);
	void windowResized(int w, int h);
	void dragEvent(ofDragInfo dragInfo);
	void gotMessage(ofMessage msg);

};

class mainWindow : public ofBaseApp {

public:
void setup();
void update();
void draw();

};

//ofApp.cpp
#include “ofApp.h”

//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(0,0,0);
}
void mainWindow::setup() {
ofBackground(0,0,0);
}
//--------------------------------------------------------------
void ofApp::update(){

}

void mainWindow::update() {

}
//--------------------------------------------------------------
void ofApp::draw(){
ofColor(255);
ofDrawRectangle(100, 100, 50, 50);
}

void mainWindow::draw() {
ofColor(255,0,0);
ofDrawRectangle(100, 100, 50, 50);

}