Use chatGPT to write your RC files !!!

Use chatGPT to write your RC files !!!

Postby Antonio Linares » Fri Apr 21, 2023 3:33 pm

Prompt:
write a Windows .RC file for a dialog box with these elements: "Target:" and a edit at the right, bellow "Result:" with a multiline EDIT, bellow "Input:" and an edit at the right and finally two buttons "Continue" and "End" at the bottom


chatGPT answer:
Code: Select all  Expand view
#include "resource.h"

IDD_DIALOG1 DIALOGEX 0, 0, 250, 170
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog Box"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
    LTEXT           "Target:", IDC_STATIC, 10, 10, 50, 15, SS_CENTERIMAGE
    EDITTEXT        IDC_TARGET_EDIT, 70, 8, 160, 20, ES_AUTOHSCROLL
    LTEXT           "Result:", IDC_STATIC, 10, 45, 50, 15, SS_CENTERIMAGE
    EDITTEXT        IDC_RESULT_EDIT, 70, 43, 160, 60, ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | WS_VSCROLL
    LTEXT           "Input:", IDC_STATIC, 10, 115, 50, 15, SS_CENTERIMAGE
    EDITTEXT        IDC_INPUT_EDIT, 70, 113, 160, 20, ES_AUTOHSCROLL
    PUSHBUTTON      "Continue", IDC_CONTINUE_BUTTON, 30, 140, 80, 20, BS_PUSHBUTTON
    PUSHBUTTON      "End", IDC_END_BUTTON, 140, 140, 80, 20, BS_PUSHBUTTON
END
 


resource.h
Code: Select all  Expand view
#define IDD_DIALOG1             101
#define IDC_TARGET_EDIT         1001
#define IDC_RESULT_EDIT         1002
#define IDC_INPUT_EDIT          1003
#define IDC_CONTINUE_BUTTON     1004
#define IDC_END_BUTTON          1005
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Return to Utilities / Utilidades

Who is online

Users browsing this forum: No registered users and 1 guest

cron