0

Cでチェックボックス/ラジオボタン/数字ステッパーを作成するにはどうすればよいですか? 次のようなボタンを作成できます。

CreateWindowEx(0, "BUTTON", label, WS_VISIBLE | WS_CHILD, 10, top, 100, 20, hWndDlg, NULL, hInst, NULL);

mingw を使用してコンパイルしています。これを検索したところ、MFCをサポートしていないため、mingwではこれが不可能であることがわかりましたか?

また、私がやろうとしていることを理解しやすいかもしれません:

void renderOptionsTab (HWND hWndDlg, JSONLinkElement *tab) {
    int top = 35;
    do {
        std::string type = std::string((char *)((JSONObject *)tab->value)->getValue("type"));
        char *label = (char *)((JSONObject *)tab->value)->getValue("label");
        void *value = (char *)((JSONObject *)tab->value)->getValue("value");

        char *forComponent = (char *)((JSONObject *)tab->value)->getValue("for");
        char *idComponent = (char *)((JSONObject *)tab->value)->getValue("id");
        char *group = (char *)((JSONObject *)tab->value)->getValue("group");


        char *display = (char *)((JSONObject *)tab->value)->getValue("display");

        if (type == std::string("checkbox")) {
            CreateWindowEx(0, "Button", label, WS_VISIBLE | WS_CHILD, 10, top, 100, 20, hWndDlg, NULL, hInst, NULL);
        } else if (type == std::string("br")) {

        } else if (type == std::string("buildID")) {
            CreateWindowEx(0, "Static", VERSION.c_str(), WS_VISIBLE | WS_CHILD, 10, top, 100, 20, hWndDlg, NULL, hInst, NULL);
        } else if (type == std::string("browse")) {

        } else if (type == std::string("label")) {

        } else if (type == std::string("radio")) {

        } else if (type == std::string("number")) {

        } else if (type == std::string("button")) {
            CreateWindowEx(0, "BUTTON", label, WS_VISIBLE | WS_CHILD, 10, top, 100, 20, hWndDlg, NULL, hInst, NULL);
        }

        if (display != NULL) {
            if (std::string(display) == std::string("inline")) {
                top -= 30;
            }
        }

        top += 30;
        tab = tab->next;
    } while (tab->next != NULL);
}

ボタンは機能しますが、残りを解決する方法がわかりません。

4

1 に答える 1