環境はWindowsで、Visual Studio 2019とDXライブラリで作っています。C言語は習っている最中で完璧には理解できていないレベルです。
<タイトル画面のコード>
#include "DxLib.h"
int Key[256]; // キーが押されているフレーム数を格納する
// キーの入力状態を更新する
int gpUpdateKey() {
    char tmpKey[256]; // 現在のキーの入力状態を格納する
    GetHitKeyStateAll(tmpKey); // 全てのキーの入力状態を得る
    for (int i = 0; i < 256; i++) {
        if (tmpKey[i] != 0) { // i番のキーコードに対応するキーが押されていたら
            Key[i]++;     // 加算
        }
        else {              // 押されていなければ
            Key[i] = 0;   // 0にする
        }
    }
    return 0;
}
// メニュー項目の表示に必要な構造体を用意する
typedef struct {
    int x, y;       // 座標格納用変数
    char name[128]; // 項目名格納用変数
} MenuElement_t;
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) {
    ChangeWindowMode(TRUE), DxLib_Init(), SetDrawScreen(DX_SCREEN_BACK); //ウィンドウモード変更と初期化と裏画面設定
    SetGraphMode(800, 800, 32); //画面の解像度指定
    // メニュー項目要素を2つ作る
    MenuElement_t MenuElement[2] = {
            { 350, 300, "ゲームスタート" }, // タグの中身の順番で格納される。xに80が、yに100が、nameに"ゲームスタート"が
            { 380, 400, "ゲーム終了" },
    };
    int SelectNum = 0; // 現在の選択番号
    // while(裏画面を表画面に反映, メッセージ処理, 画面クリア, キー更新)
    while (ScreenFlip() == 0 && ProcessMessage() == 0 && ClearDrawScreen() == 0 && gpUpdateKey() == 0) {
        // 計算フェーズ 
        if (Key[KEY_INPUT_DOWN] == 1) { // 下キーが押された瞬間だけ処理
            SelectNum = (SelectNum + 1) % 2; // 現在の選択項目を一つ下にずらす(ループする)
            for (int i = 0; i < 2; i++) {              // メニュー項目数である2個ループ処理
                if (i == SelectNum) {          // 今処理しているのが、選択番号と同じ要素なら
                    MenuElement[i].x = 350; // 座標を320にする
                }
                else {                       // 今処理しているのが、選択番号以外なら
                    MenuElement[i].x = 380;// 座標を350にする
                }
            }
        }
        // 描画フェーズ
        LoadGraphScreen(0, 0, "gahag-0073412840-1.png", TRUE);  //背景
        LoadGraphScreen(220, 75, "cooltext373677233987331.png", TRUE);  //タイトルロゴ
        for (int i = 0; i < 5; i++) { // メニュー項目を描画
            DrawFormatString(MenuElement[i].x, MenuElement[i].y, GetColor(0, 0, 0), MenuElement[i].name);
            SetFontSize(32);
            SetFontThickness(4);
            ChangeFontType(DX_FONTTYPE_ANTIALIASING);
        }
    }
    DxLib_End(); // DXライブラリ終了処理
    return 0;
}
#include "DxLib.h"
#define WIN_W 800 //ウインドウの横幅
#define WIN_H 600 //ウインドウの縦幅
#define LANE_SIZE 1 //レーンの数
#define BAR_SIZE 40 //1レーンあたりの最大bar数
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
    char buf[256]; //キー押下状態格納用配列
    int key[LANE_SIZE] = {
        KEY_INPUT_A
    };
    bool bar_f[LANE_SIZE][BAR_SIZE]; //barの存在フラグ
    float bar_y[LANE_SIZE][BAR_SIZE]; //barのY座標
    for (int j = 0; j < BAR_SIZE; j++) {
        for (int i = 0; i < LANE_SIZE; i++) {
            bar_f[i][j] = false; //全てにfalseを代入
        }
    }
    LONGLONG start_time; //開始した時刻
    LONGLONG now_time; //現在のフレームの時刻
    int currentTime; //開始してからの経過時間
    int counter = 0;
    const int bpm = 120;
    SetMainWindowText("リズムの達人"); //ウインドウのタイトルを設定
    ChangeWindowMode(TRUE); //ウィンドウモードで起動
    SetGraphMode(WIN_W, WIN_H, 32); //画面の解像度指定
    SetWindowSizeChangeEnableFlag(FALSE); //画面サイズ変更不可
    if (DxLib_Init() == -1) { return -1; } //DxLib初期化処理
    SetDrawScreen(DX_SCREEN_BACK); //描画先を裏画面に設定
    enum  judge_value {
        NONE, GOOD, MISS
    };
    const int JUDGE_DISPLAY_TIME = 30; // 判定を表示する時間 (フレーム数)
    judge_value judge = NONE; // 表示中の判定
    int judge_time = 10; // 判定を表示する残り時間 (フレーム数)
    //while(裏画面を表画面に反映, メッセージ処理, 画面クリア)
    while (ScreenFlip() == 0 && ProcessMessage() == 0 && ClearDrawScreen() == 0) {
        LoadGraphScreen(1, 1, "a0.png", TRUE);
        if (buf[KEY_INPUT_ESCAPE] == 1) {
            break; // 終了
        }
        //時間関係
        if (counter == 0) {
            start_time = GetNowHiPerformanceCount();
        }
        now_time = GetNowHiPerformanceCount();
        currentTime = (int)((now_time - start_time) / 1000); // ms
        //bar生成
        if (currentTime >= 550000 / bpm * counter) {
            for (int i = 0; i < LANE_SIZE; i++) {
                bar_f[i][counter % BAR_SIZE] = true;
                bar_y[i][counter % BAR_SIZE] = -100.f;
            }
            counter++;
        }
        //DrawFormatString(100, 100, GetColor(255, 255, 255), "currentTime---%d", currentTime);
        //bar座標更新
        for (int i = 0; i < LANE_SIZE; i++) {
            for (int j = 0; j < BAR_SIZE; j++) {
                if (bar_f[i][j]) {
                    bar_y[i][j] += 4.f;
                    //DrawFormatString(100, 120, GetColor(255, 255, 0), "bar_y[i][j]---%f", bar_y[i][j]);
                    if (bar_y[i][j] > WIN_H + 10) {
                        bar_f[i][j] = false; //画面外に出たらfalse
                        // MISSを表示させる
                        judge = MISS;
                        DrawFormatString(10, 10, GetColor(0, 0, 255), "MISS");
                        judge_time = JUDGE_DISPLAY_TIME;
                    }
                }
            }
        }
        // 判定
        GetHitKeyStateAll(buf);
        for (int i = 0; i < LANE_SIZE; i++) {
            for (int j = 0; j < BAR_SIZE; j++) {
                if (bar_f[i][j]) {
                    if (WIN_H / 5 * 4 - 30 < bar_y[i][j] && bar_y[i][j] < WIN_H / 5 * 4 + 30) {
                        if (buf[key[i]] == 1) {
                            bar_f[i][j] = false;
                            // GOODを表示させる
                            judge = GOOD;
                            DrawFormatString(10, 10, GetColor(255, 0, 0), "GOOD");
                            judge_time = JUDGE_DISPLAY_TIME;
                        }
                    }
                }
            }
        }
        if (judge != NONE) {
            if (judge == GOOD) {
                DrawFormatString(10, 10, GetColor(255, 0, 0), "GOOD");
                // GOODを描画する (テキスト・画像など)
            }
            else if (judge == MISS) {
                DrawFormatString(10, 10, GetColor(0, 0, 255), "MISS");
                // MISSを描画する (テキスト・画像など)
            }
            judge_time--;
            if (judge_time <= 0) judge = NONE; // 指定の時間が経過したら、判定を消す
        }
        //判定ライン描画
        DrawLine(0, WIN_H / 5 * 4, WIN_W, WIN_H / 5 * 4, GetColor(255, 255, 255));
        DrawCircleAA(400.f, 480.f, 45.f, 60.f, GetColor(255, 255, 255), FALSE);
        //bar描画
        for (int i = 0; i < LANE_SIZE; i++) {
            for (int j = 0; j < BAR_SIZE; j++) {
                if (bar_f[i][j]) {
                    DrawCircleAA(400.f + i * 1.f, bar_y[i][j] - 10.f,
                        30.f + 1.f + i * 1.f, bar_y[i][j] + 10.f, GetColor(0, 255, 0), TRUE);
                }
            }
        }
    }
    DxLib_End(); //DxLibの終了処理
    return 0; //正常終了
}
#include "DxLib.h"
int Key[256]; // キーが押されているフレーム数を格納する
// キーの入力状態を更新する
int gpUpdateKey() {
    char tmpKey[256]; // 現在のキーの入力状態を格納する
    GetHitKeyStateAll(tmpKey); // 全てのキーの入力状態を得る
    for (int i = 0; i < 256; i++) {
        if (tmpKey[i] != 0) { // i番のキーコードに対応するキーが押されていたら
            Key[i]++;     // 加算
        }
        else {              // 押されていなければ
            Key[i] = 0;   // 0にする
        }
    }
    return 0;
}
// メニュー項目の表示に必要な構造体を用意する
typedef struct {
    int x, y;       // 座標格納用変数
    char name[128]; // 項目名格納用変数
} MenuElement_t;
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) {
    SetBackgroundColor(255, 255, 255);
    ChangeWindowMode(TRUE), DxLib_Init(), SetDrawScreen(DX_SCREEN_BACK); //ウィンドウモード変更と初期化と裏画面設定
    SetMainWindowText("スコア画面"); //ウインドウのタイトルを設定
    SetGraphMode(800, 600, 32); //画面の解像度指定
    // メニュー項目要素を2つ作る
    MenuElement_t MenuElement[2] = {
            { 270, 400, "もう一度プレイする" }, // タグの中身の順番で格納される。xに80が、yに100が、nameに"ゲームスタート"が
            { 300, 450, "タイトルへ戻る" },
    };
    int SelectNum = 0; // 現在の選択番号
    // while(裏画面を表画面に反映, メッセージ処理, 画面クリア, キー更新)
    while (ScreenFlip() == 0 && ProcessMessage() == 0 && ClearDrawScreen() == 0 && gpUpdateKey() == 0) {
        // 計算フェーズ 
        if (Key[KEY_INPUT_DOWN] == 1) { // 下キーが押された瞬間だけ処理
            SelectNum = (SelectNum + 1) % 2; // 現在の選択項目を一つ下にずらす(ループする)
            for (int i = 0; i < 2; i++) {              // メニュー項目数である2個ループ処理
                if (i == SelectNum) {          // 今処理しているのが、選択番号と同じ要素なら
                    MenuElement[i].x = 270; // 座標を270にする
                }
                else {                       // 今処理しているのが、選択番号以外なら
                    MenuElement[i].x = 300;// 座標を300にする
                }
            }
        }
        // 描画フェーズ
        LoadGraphScreen(0, 0, "hanakazari_waku_ao.png", TRUE);  //背景
        LoadGraphScreen(270, 75, "cooltext373678716545718.png", TRUE);  //スコアロゴ
        for (int i = 0; i < 5; i++) { // メニュー項目を描画
            DrawFormatString(MenuElement[i].x, MenuElement[i].y, GetColor(0, 0, 0), MenuElement[i].name);
            SetFontSize(32);
            SetFontThickness(4);
            ChangeFontType(DX_FONTTYPE_ANTIALIASING);
        }
    }
    DxLib_End(); // DXライブラリ終了処理
    return 0;
}