The general principle is to use the findwindow function to find the relevant window handle, and then automatically select or remove some attributes and confirm the operation ..
Uint K = winexec ("rundll32.exe shell32.dll, control_rundll desk. Cpl", sw_show );
If (k <32)
{
Cstring X;
X. Format ("% d", k );
MessageBox (x); // return after error, the same below
}
Hwnd WD =: findwindow (null, "display attribute ");
If (WD = NULL)
MessageBox ("error1 ");
: Showwindow (WD, sw_hide );
Hwnd WTD = find1_wex (WD, null, "systabcontrol32", null );
If (WTD = NULL)
MessageBox ("error2 ");
Tabctrl_setcurfocus (WTd, 2 );
Hwnd wd1 = find1_wex (WD, null, null, "appearance ");
If (wd1 = NULL)
MessageBox ("error3 ");
Hwnd CB1 = find1_wex (wd1, null, "ComboBox", null );
If (CB1 = NULL)
MessageBox ("error4 ");
: Sendmessage (CB1, cb_selectstring,-1, (long) "light green ");
Long id =: getdlgctrlid (CB1 );
: Sendmessage (wd1, wm_command, makelong (ID, cbn_selchange), (long) CB1 );
Hwnd CB2 = find1_wex (wd1, CB1, "ComboBox", null );
If (CB2 = NULL)
MessageBox ("error5 ");
// The Same as above can be modified here
// Or other attributes
Hwnd bb1 = find1_wex (WD, null, null, "OK ");
If (bb1 = NULL)
MessageBox ("error6 ");
Id =: getdlgctrlid (bb1 );
: Sendmessage (WD, wm_command, makelong (ID, bn_clicked), (long) bb1 );