I am using VS 2010 c++. I have a dialog window containing an array of 126 identical pushbutton controls sharing the same value for control ID.
When a button is clicked and the host dialog window receives the resulting WM_COMMAND message, how can the dialog window identify which pushbutton is pressed?
I could use 126 different control ID values, but I was hoping for something a little more concise.
Can anyone help?
How to identify the sender of a WM_COMMAND message?
823 Views Asked by The Bard of Chelsea At
1
There are 1 best solutions below
Related Questions in VISUAL-C++
- Visual Studio C++, breakpoints not stopping debugging DLL (GODOT GDExtention)
- MSVC Compiler Template Sizeof...() not working
- Visual Studio C++ Access to path is denied
- How can I use CsvHelper to parse a string into a list of tokens?
- Unable to add request headers via CHttpFile - C++/MFC
- Is there a worked example of using CStrBufT with a CString?
- wxMediaCtrl causes access read violation when loading
- Why do I get weird class method redefinition errors when I compile with Visual C++ 2022?
- How to make VCPKG copies dependencies pdb files in output directory
- Difference between INT_MIN , INT8_MIN , INT16_MIN. For MAX too
- 'pip install mariadb' states that it cannot find include file 'mysql.h' on my Windows 10 dekstop
- Windows Custom Credential Provider is not displaying tile on logon for all users in a pc
- Why does MSVC never return struct in RAX for member-functions?
- Configure target system
- UI Interface Crashes and Hanging Issues in MFC Application
Related Questions in WM-COMMAND
- WM_COMMAND not received in subclassed WinAPI button
- Is there any way to track wm_messge (or wm_command) of other proccess?
- Why does Save As dialog block the sender?
- Menus in WinAPI: Do I use LPARAM or WPARAM for WM_COMMAND?
- How to identify the sender of a WM_COMMAND message?
- How to access wm_command from outside the window function
- Any way to catch global WM_COMMAND message?
- Win32 API C++, Identifier not Received with WM_COMMAND
- What message causes a button to send a WM_COMMAND message
- Windows keyboard accelerators and child windows
- How to programmatically select popup menu item in Windows?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
ID itself means "what identifies" an object. So you will need to have separate control ID.
There has to be something different about each button control to identify a particular one.
If you want to keep the same control ID, then you can keep track of the handle (HWND) of each button that is created and use the LPARAM parameter of WM_COMMAND message to identify the control by handle.
If you are having unique text for each button then you can use the text property also of the button.