Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- realtime-search.cpp file::
- #include <Windows.h>
- #include <fstream>
- #include <sstream>
- #include <string>
- #include <algorithm>
- #include <vector>
- #include "resource2.h"
- using namespace std;
- // Structure to represent a dictionary entry
- struct DictionaryEntry {
- wstring word;
- wstring definition;
- };
- // Structure to represent a node in the linked list
- struct Node {
- DictionaryEntry data;
- Node* next;
- };
- Node* dictionary = nullptr;
- vector<wstring> words;
- // Function prototypes
- void insertNode(Node*& head, const DictionaryEntry& entry);
- //void addWord(Node*& head, const wstring& word, const wstring& definition);
- bool addWord(Node*& head, const wstring& word, const wstring& definition);
- void deleteWord(Node*& head, const wstring& keyword);
- wstring InputBox(HWND hwnd, const wstring& prompt, const wstring& title);
- void DisplayDefinition(HWND hwnd, const wstring& word, const wstring& definition);
- void editWord(Node* head, const wstring& oldWord, const wstring& newWord, const wstring& newDefinition);
- void listWords(const Node* head, vector<wstring>& words);
- void serializeDictionary(const Node* head, const wstring& filename);
- void deserializeDictionary(Node*& head, const wstring& filename);
- void searchWordRealtime(const Node* head, const wstring& keyword, vector<wstring>& suggestions);
- int pruneDictionary(Node*& head);
- void updateDictionaryAfterPrune(Node*& head, vector<wstring>& words, HWND hwnd);
- void updateListBox(HWND hwnd, const vector<wstring>& words);
- // Function implementations
- void insertNode(Node*& head, const DictionaryEntry& entry) {
- Node* newNode = new Node{ entry, nullptr };
- if (!head) {
- head = newNode;
- }
- else {
- Node* current = head;
- while (current->next) {
- current = current->next;
- }
- current->next = newNode;
- }
- }
- bool addWord(Node*& head, const wstring& word, const wstring& definition) {
- // Check if the word already exists
- Node* current = head;
- while (current) {
- if (current->data.word == word) {
- return false; // Word already exists, don't add
- }
- current = current->next;
- }
- // Word doesn't exist, add it
- insertNode(head, { word, definition });
- return true;
- }
- // w/o duplicates
- /* // Modify the addWord function to check for duplicates
- bool addWord(Node*& head, const wstring& word, const wstring& definition) {
- // Check if the word already exists
- Node* current = head;
- while (current) {
- if (current->data.word == word) {
- return false; // Word already exists, don't add
- }
- current = current->next;
- }
- // Word doesn't exist, add it
- insertNode(head, { word, definition });
- return true;
- }*/
- // /w duplicates
- /*void addWord(Node*& head, const wstring& word, const wstring& definition) {
- insertNode(head, { word, definition });
- }*/
- void deleteWord(Node*& head, const wstring& keyword) {
- if (!head) return;
- if (head->data.word == keyword) {
- Node* temp = head;
- head = head->next;
- delete temp;
- return;
- }
- Node* current = head;
- while (current->next && current->next->data.word != keyword) {
- current = current->next;
- }
- if (current->next) {
- Node* temp = current->next;
- current->next = current->next->next;
- delete temp;
- }
- }
- // Modify the InputBox function to pre-populate the input
- wstring InputBox(HWND hwnd, const wstring& prompt, const wstring& title, const wstring& defaultValue = L"") {
- wstring input = defaultValue;
- DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_INPUT), hwnd,
- [](HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) -> INT_PTR {
- static wstring* pInput;
- switch (message) {
- case WM_INITDIALOG:
- pInput = (wstring*)lParam;
- SetDlgItemText(hDlg, IDC_INPUT, pInput->c_str());
- SendDlgItemMessage(hDlg, IDC_INPUT, EM_SETSEL, 0, -1); // Select all text
- return (INT_PTR)TRUE;
- case WM_COMMAND:
- if (LOWORD(wParam) == IDOK) {
- HWND hEdit = GetDlgItem(hDlg, IDC_INPUT);
- int len = GetWindowTextLength(hEdit) + 1;
- wchar_t* buffer = new wchar_t[len];
- GetWindowText(hEdit, buffer, len);
- *pInput = buffer;
- delete[] buffer;
- EndDialog(hDlg, IDOK);
- return (INT_PTR)TRUE;
- }
- else if (LOWORD(wParam) == IDCANCEL) {
- EndDialog(hDlg, IDCANCEL);
- return (INT_PTR)TRUE;
- }
- break;
- }
- return (INT_PTR)FALSE;
- }, (LPARAM)&input);
- return input;
- }
- /*wstring InputBox(HWND hwnd, const wstring& prompt, const wstring& title) {
- wchar_t input[156] = L"";
- if (DialogBoxParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_INPUT), hwnd,
- [](HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) -> INT_PTR {
- static wchar_t input[156];
- switch (message) {
- case WM_INITDIALOG: {
- HWND hEdit = GetDlgItem(hDlg, IDC_INPUT);
- SetWindowText(hEdit, (LPCWSTR)lParam);
- SendMessage(hEdit, EM_SETSEL, 0, -1); // Select all text
- break;
- }
- case WM_COMMAND:
- if (LOWORD(wParam) == IDOK) {
- GetDlgItemText(hDlg, IDC_INPUT, input, 156);
- EndDialog(hDlg, IDOK);
- return (INT_PTR)TRUE;
- }
- else if (LOWORD(wParam) == IDCANCEL) {
- EndDialog(hDlg, IDCANCEL);
- return (INT_PTR)TRUE;
- }
- break;
- }
- return (INT_PTR)FALSE;
- }, (LPARAM)prompt.c_str()) == IDOK) {
- return (wstring)input;
- }
- return L"";
- }*/
- void DisplayDefinition(HWND hwnd, const wstring& word, const wstring& definition) {
- wstring message = L"Definition of '" + word + L"':\n\n" + definition;
- HWND hDlg = CreateDialogParam(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DEFINITION), hwnd, [](HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) -> INT_PTR {
- switch (message) {
- case WM_INITDIALOG:
- {
- wstring* definition = (wstring*)lParam;
- SetDlgItemText(hDlg, IDC_DEFINITION_EDIT, definition->c_str());
- delete definition;
- }
- return (INT_PTR)TRUE;
- case WM_COMMAND:
- if (LOWORD(wParam) == IDCANCEL) {
- EndDialog(hDlg, LOWORD(wParam));
- return (INT_PTR)TRUE;
- }
- break;
- case WM_CLOSE:
- EndDialog(hDlg, 0);
- return (INT_PTR)TRUE;
- }
- return (INT_PTR)FALSE;
- }, (LPARAM)new wstring(message));
- ShowWindow(hDlg, SW_SHOW);
- }
- /*void DisplayDefinition(HWND hwnd, const wstring& word, const wstring& definition) {
- wstring message = L"Definition of '" + word + L"':\n\n" + definition;
- MessageBox(hwnd, message.c_str(), L"Word Definition", MB_OK | MB_ICONINFORMATION);
- }*/
- void editWord(Node* head, const wstring& oldWord, const wstring& newWord, const wstring& newDefinition) {
- Node* current = head;
- while (current) {
- if (current->data.word == oldWord) {
- current->data.word = newWord;
- current->data.definition = newDefinition;
- return;
- }
- current = current->next;
- }
- }
- void listWords(const Node* head, vector<wstring>& words) {
- words.clear();
- const Node* current = head;
- while (current) {
- words.push_back(current->data.word);
- current = current->next;
- }
- }
- void serializeDictionary(const Node* head, const wstring& filename) {
- wofstream file(filename);
- const Node* current = head;
- while (current) {
- file << current->data.word << L";" << current->data.definition << endl;
- current = current->next;
- }
- file.close();
- }
- void deserializeDictionary(Node*& head, const wstring& filename) {
- wifstream file(filename);
- wstring line;
- while (getline(file, line)) {
- size_t pos = line.find(L';');
- if (pos != wstring::npos) {
- wstring word = line.substr(0, pos);
- wstring definition = line.substr(pos + 1);
- addWord(head, word, definition);
- }
- }
- file.close();
- }
- // Add this function to convert a string to lowercase
- wstring toLower(const wstring& str) {
- wstring lower = str;
- transform(lower.begin(), lower.end(), lower.begin(), ::towlower);
- return lower;
- }
- // Modify the searchWordRealtime function to be case-insensitive
- void searchWordRealtime(const Node* head, const wstring& keyword, vector<wstring>& suggestions) {
- suggestions.clear();
- const Node* current = head;
- wstring lowercaseKeyword = toLower(keyword);
- while (current) {
- wstring lowercaseWord = toLower(current->data.word);
- if (lowercaseWord.find(lowercaseKeyword) != wstring::npos) {
- suggestions.push_back(current->data.word);
- }
- current = current->next;
- }
- }
- // Prune Functions
- int pruneDictionary(Node*& head) {
- if (!head) return 0;
- int duplicatesRemoved = 0;
- Node* current = head;
- while (current && current->next) {
- Node* runner = current;
- while (runner->next) {
- if (current->data.word == runner->next->data.word) {
- Node* duplicate = runner->next;
- runner->next = runner->next->next;
- delete duplicate;
- duplicatesRemoved++;
- }
- else {
- runner = runner->next;
- }
- }
- current = current->next;
- }
- return duplicatesRemoved;
- }
- // Prune Functions
- void updateDictionaryAfterPrune(Node*& head, vector<wstring>& words, HWND hwnd) {
- listWords(head, words);
- updateListBox(hwnd, words);
- serializeDictionary(head, L"dictionary.txt");
- }
- void updateListBox(HWND hwnd, const vector<wstring>& words) {
- HWND hListBox = GetDlgItem(hwnd, IDC_LISTBOX);
- SendMessage(hListBox, LB_RESETCONTENT, 0, 0);
- for (const auto& word : words) {
- SendMessage(hListBox, LB_ADDSTRING, 0, (LPARAM)word.c_str());
- }
- }
- // Dialog procedure
- // Modify the DialogProc function
- INT_PTR CALLBACK DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
- switch (uMsg) {
- case WM_INITDIALOG:
- deserializeDictionary(dictionary, L"dictionary.txt");
- listWords(dictionary, words);
- updateListBox(hwnd, words);
- return TRUE;
- case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDC_ADD_WORD: {
- wchar_t word[256], definition[1024];
- GetDlgItemText(hwnd, IDC_WORD_INPUT, word, 256);
- GetDlgItemText(hwnd, IDC_DEFINITION_INPUT, definition, 1024);
- if (wcslen(word) > 0) {
- if (!addWord(dictionary, word, definition)) {
- // Word already exists, show confirmation box
- wstring message = L"An entry with the name '";
- message += word;
- message += L"' already exists. Do you want to add a duplicate entry?";
- int result = MessageBox(hwnd, message.c_str(), L"Confirm Duplicate Entry", MB_YESNO | MB_ICONQUESTION);
- if (result == IDYES) {
- // User confirmed, add the duplicate entry
- insertNode(dictionary, { word, definition });
- listWords(dictionary, words);
- updateListBox(hwnd, words);
- serializeDictionary(dictionary, L"dictionary.txt");
- SetDlgItemText(hwnd, IDC_WORD_INPUT, L"");
- SetDlgItemText(hwnd, IDC_DEFINITION_INPUT, L"");
- }
- // If result is IDNO, do nothing (silently ignore)
- }
- else {
- // Word added successfully
- listWords(dictionary, words);
- updateListBox(hwnd, words);
- serializeDictionary(dictionary, L"dictionary.txt");
- SetDlgItemText(hwnd, IDC_WORD_INPUT, L"");
- SetDlgItemText(hwnd, IDC_DEFINITION_INPUT, L"");
- }
- }
- return TRUE;
- }
- // w/o duplicates
- /*case IDC_ADD_WORD: {
- wchar_t word[256], definition[1024];
- GetDlgItemText(hwnd, IDC_WORD_INPUT, word, 256);
- GetDlgItemText(hwnd, IDC_DEFINITION_INPUT, definition, 1024);
- if (wcslen(word) > 0) {
- if (addWord(dictionary, word, definition)) {
- listWords(dictionary, words);
- updateListBox(hwnd, words);
- serializeDictionary(dictionary, L"dictionary.txt");
- SetDlgItemText(hwnd, IDC_WORD_INPUT, L"");
- SetDlgItemText(hwnd, IDC_DEFINITION_INPUT, L"");
- }
- // If addWord returns false, it means the word already exists.
- // We silently ignore it as per the requirement.
- }
- return TRUE;
- }*/
- // /w duplicates
- /*case IDC_ADD_WORD: {
- wchar_t word[256], definition[1024];
- GetDlgItemText(hwnd, IDC_WORD_INPUT, word, 256);
- GetDlgItemText(hwnd, IDC_DEFINITION_INPUT, definition, 1024);
- if (wcslen(word) > 0) { // Only check if word is not empty
- addWord(dictionary, word, definition);
- listWords(dictionary, words);
- updateListBox(hwnd, words);
- serializeDictionary(dictionary, L"dictionary.txt");
- SetDlgItemText(hwnd, IDC_WORD_INPUT, L"");
- SetDlgItemText(hwnd, IDC_DEFINITION_INPUT, L"");
- }
- return TRUE;
- }*/
- case IDC_DELETE_WORD: {
- int index = SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_GETCURSEL, 0, 0);
- if (index != LB_ERR) {
- wchar_t word[256];
- SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_GETTEXT, index, (LPARAM)word);
- // Create the confirmation message
- wstring message = L"Are you sure you want to delete the word '";
- message += word;
- message += L"'?";
- // Show the confirmation box
- int result = MessageBox(hwnd, message.c_str(), L"Confirm Deletion", MB_YESNO | MB_ICONQUESTION);
- // If the user clicks "Yes", proceed with deletion
- if (result == IDYES) {
- deleteWord(dictionary, word);
- listWords(dictionary, words);
- updateListBox(hwnd, words);
- serializeDictionary(dictionary, L"dictionary.txt");
- }
- }
- return TRUE;
- }
- case IDC_EDIT_WORD: {
- int index = SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_GETCURSEL, 0, 0);
- if (index != LB_ERR) {
- wchar_t wordToEdit[256];
- SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_GETTEXT, index, (LPARAM)wordToEdit);
- Node* current = dictionary;
- while (current) {
- if (current->data.word == wordToEdit) {
- wstring newWord = InputBox(hwnd, L"Edit Word", L"Edit Word", current->data.word);
- if (!newWord.empty()) {
- wstring newDefinition = InputBox(hwnd, L"Edit Definition", L"Edit Definition", current->data.definition);
- // newDefinition can be empty now
- SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_DELETESTRING, index, 0); // Delete the old word
- editWord(dictionary, wordToEdit, newWord, newDefinition);
- listWords(dictionary, words);
- updateListBox(hwnd, words);
- for (int i = 0; i < words.size(); i++) {
- if (words[i] == newWord) {
- SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_SETCURSEL, i, 0); // Select the edited word
- break;
- }
- }
- serializeDictionary(dictionary, L"dictionary.txt");
- }
- break;
- }
- current = current->next;
- }
- if (!current) {
- MessageBox(hwnd, L"Word not found in the dictionary.", L"Error", MB_OK | MB_ICONERROR);
- }
- }
- return TRUE;
- }
- // /w duplicates (does not affect duplicates tho only no check for blank definitions
- /*case IDC_EDIT_WORD: {
- int index = SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_GETCURSEL, 0, 0);
- if (index != LB_ERR) {
- wchar_t wordToEdit[256];
- SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_GETTEXT, index, (LPARAM)wordToEdit);
- Node* current = dictionary;
- while (current) {
- if (current->data.word == wordToEdit) {
- wstring newWord = InputBox(hwnd, L"Edit Word", L"Edit Word", current->data.word);
- if (!newWord.empty()) {
- wstring newDefinition = InputBox(hwnd, L"Edit Definition", L"Edit Definition", current->data.definition);
- SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_DELETESTRING, index, 0); // Delete the old word
- editWord(dictionary, wordToEdit, newWord, newDefinition);
- listWords(dictionary, words);
- updateListBox(hwnd, words);
- for (int i = 0; i < words.size(); i++) {
- if (words[i] == newWord) {
- SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_SETCURSEL, i, 0); // Select the edited word
- break;
- }
- }
- serializeDictionary(dictionary, L"dictionary.txt");
- }
- break;
- }
- current = current->next;
- }
- if (!current) {
- MessageBox(hwnd, L"Word not found in the dictionary.", L"Error", MB_OK | MB_ICONERROR);
- }
- }
- return TRUE;
- }*/
- case IDC_VIEW_DEFINITION: {
- int index = SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_GETCURSEL, 0, 0);
- if (index != LB_ERR) {
- wchar_t word[256];
- SendDlgItemMessage(hwnd, IDC_LISTBOX, LB_GETTEXT, index, (LPARAM)word);
- Node* current = dictionary;
- while (current) {
- if (current->data.word == word) {
- DisplayDefinition(hwnd, current->data.word, current->data.definition);
- break;
- }
- current = current->next;
- }
- }
- return TRUE;
- }
- case IDC_SEARCH_INPUT: {
- if (HIWORD(wParam) == EN_CHANGE) {
- wchar_t query[256];
- GetDlgItemText(hwnd, IDC_SEARCH_INPUT, query, 256);
- if (wcslen(query) == 0) {
- updateListBox(hwnd, words);
- }
- else {
- vector<wstring> suggestions;
- searchWordRealtime(dictionary, query, suggestions);
- updateListBox(hwnd, suggestions);
- }
- }
- return TRUE;
- }
- case IDC_CLEAR_SEARCH: {
- SetDlgItemText(hwnd, IDC_SEARCH_INPUT, L"");
- updateListBox(hwnd, words);
- return TRUE;
- }
- //Prune Functions
- case IDC_PRUNE: {
- int result = MessageBox(hwnd, L"Are you sure you want to prune the list and remove duplicates?", L"Confirm Prune", MB_YESNO | MB_ICONQUESTION);
- if (result == IDYES) {
- int duplicatesRemoved = pruneDictionary(dictionary);
- updateDictionaryAfterPrune(dictionary, words, hwnd);
- wstring message = L"Pruning complete. ";
- message += to_wstring(duplicatesRemoved);
- message += L" duplicate entries were removed.";
- MessageBox(hwnd, message.c_str(), L"Prune Results", MB_OK | MB_ICONINFORMATION);
- }
- return TRUE;
- }
- case IDCANCEL:
- DestroyWindow(hwnd);
- PostQuitMessage(0);
- return TRUE;
- }
- break;
- case WM_CLOSE:
- DestroyWindow(hwnd);
- PostQuitMessage(0);
- return TRUE;
- }
- return FALSE;
- }
- int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) {
- HWND hDlg = CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_MAINDIALOG), 0, DialogProc, 0);
- if (!hDlg) {
- MessageBox(NULL, L"Failed to create dialog", L"Error", MB_ICONERROR | MB_OK);
- return 1;
- }
- ShowWindow(hDlg, nCmdShow);
- MSG msg;
- BOOL bRet;
- while ((bRet = GetMessage(&msg, nullptr, 0, 0)) != 0) {
- if (bRet == -1) {
- // Handle the error and possibly exit
- break;
- }
- else if (!IsWindow(hDlg) || !IsDialogMessage(hDlg, &msg)) {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
- return (int)msg.wParam;
- }
- Resource2.rc file::
- #include <windows.h>
- #include "resource2.h"
- IDD_MAINDIALOG DIALOGEX 0, 0, 320, 240
- STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
- CAPTION "Dictionary Application"
- FONT 8, "MS Shell Dlg", 400, 0, 0x1
- BEGIN
- LTEXT "Word:", -1, 10, 10, 30, 8
- EDITTEXT IDC_WORD_INPUT, 50, 8, 100, 14, ES_AUTOHSCROLL
- LTEXT "Definition:", -1, 10, 30, 40, 8
- EDITTEXT IDC_DEFINITION_INPUT, 50, 28, 200, 14, ES_AUTOHSCROLL
- PUSHBUTTON "Add Word", IDC_ADD_WORD, 260, 8, 50, 14
- PUSHBUTTON "Delete Word", IDC_DELETE_WORD, 260, 28, 50, 14
- PUSHBUTTON "Edit Word", IDC_EDIT_WORD, 260, 48, 50, 14
- PUSHBUTTON "View Definition", IDC_VIEW_DEFINITION, 205, 8, 55, 14
- PUSHBUTTON "Prune", IDC_PRUNE, 160, 8, 25, 14
- PUSHBUTTON "Clear", IDC_CLEAR_SEARCH, 185, 8, 20, 14
- LTEXT "Search:", -1, 10, 50, 30, 8
- EDITTEXT IDC_SEARCH_INPUT, 50, 48, 200, 14, ES_AUTOHSCROLL
- LISTBOX IDC_LISTBOX, 10, 70, 300, 160, LBS_SORT | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
- END
- IDD_INPUT DIALOGEX 0, 0, 250, 120
- STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
- CAPTION "Input"
- FONT 8, "MS Shell Dlg", 400, 0, 0x1
- BEGIN
- LTEXT "Input:", -1, 7, 14, 50, 8
- EDITTEXT IDC_INPUT, 7, 30, 230, 20, ES_AUTOHSCROLL
- DEFPUSHBUTTON "OK", IDOK, 70, 60, 50, 14
- PUSHBUTTON "Cancel", IDCANCEL, 130, 60, 50, 14
- END
- IDD_DEFINITION DIALOGEX 0, 0, 300, 200
- STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
- CAPTION "Definition"
- FONT 8, "MS Shell Dlg"
- BEGIN
- EDITTEXT IDC_DEFINITION_EDIT, 7, 7, 286, 186, ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | WS_VSCROLL
- END
- /*IDD_INPUT DIALOGEX 0, 0, 200, 100
- STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
- CAPTION "Input"
- FONT 8, "MS Shell Dlg"
- BEGIN
- LTEXT "Input:", -1, 7, 14, 50, 8
- EDITTEXT IDC_INPUT, 7, 24, 186, 12, ES_AUTOHSCROLL
- DEFPUSHBUTTON "OK", IDOK, 139, 7, 50, 14
- PUSHBUTTON "Cancel", IDCANCEL, 139, 24, 50, 14
- END*/
- //EDITTEXT IDC_WORD_INPUT, 50, 8, 100, 14, ES_AUTOHSCROLL
- //PUSHBUTTON "Add Word", IDC_ADD_WORD, 260, 8, 50, 14
- //PUSHBUTTON "View Definition", IDC_VIEW_DEFINITION, 260, 68, 50, 14
- resource2.h file::
- #ifndef RESOURCE2_H
- #define RESOURCE2_H
- #define IDD_MAINDIALOG 101
- #define IDC_WORD_INPUT 1001
- #define IDC_DEFINITION_INPUT 1002
- #define IDC_ADD_WORD 1003
- #define IDC_DELETE_WORD 1004
- #define IDC_SEARCH_INPUT 1005
- #define IDC_LISTBOX 1006
- #define IDC_INPUT 1007 // Add this line if you're using IDC_INPUT
- #define IDC_EDIT_WORD 1008
- #define IDC_VIEW_DEFINITION 1009
- #define IDD_INPUT 1010
- #define IDD_DEFINITION 1011
- #define IDC_DEFINITION_EDIT 1012
- #define IDC_CLEAR_SEARCH 1013
- #define IDC_PRUNE 1014
- #endif // RESOURCE2_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement