I am trying to check a checkbox inside an AviReComp program and I cannot do this. I tried all kinds of codes:
//Check the checkbox IntPtr SubtitlesSection = FindWindowEx(MoreOptions, IntPtr.Zero, null, "Subtitles"); IntPtr AddSubtitlesCheckbox = FindWindowEx(SubtitlesSection, IntPtr.Zero, null, "Enable/Disable"); SendMessage(AddSubtitlesCheckbox, BM_SETSTATE, 1, IntPtr.Zero); SendMessage(AddSubtitlesCheckbox, BM_SETCHECK, 1, IntPtr.Zero); SendMessage(AddSubtitlesCheckbox, WM_PAINT, 0, IntPtr.Zero); SendMessage(AddSubtitlesCheckbox, WM_LBUTTONDOWN, 1, MakeLParam(10, 10)); SendMessage(SubtitlesSection, WM_PARENTNOTIFY, (int)MakeLParam((int)AddSubtitlesCheckbox, WM_LBUTTONDOWN), MakeLParam(26, 31)); SendMessage(SubtitlesSection, WM_PARENTNOTIFY, (int)MakeLParam((int)AddSubtitlesCheckbox, WM_LBUTTONUP), MakeLParam(26, 31));
The checkbox is located on the "Add-ons" tab under the "Subtitles" section and is called "Enable / Disable".
Am I doing something wrong?
Thanks for any help!
Edit: Now I see that this code really works and it checks the checkbox, but I still have a problem, since it does not change all the controls that should change when I check the box manually, and not inside my program. Is there a way to force the parent to repaint itself or to trigger a change event when I check the box as checked?