case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
switch (wmId)
{
case IDC_NEXTBTN:
QueNo++;
NMHDR nmh;
nmh.code = NM_CLICK;
nmh.idFrom =IDC_NEXTBTN;
nmh.hwndFrom = NextBtn;
SendMessage(GetParent(NextBtn), WM_NOTIFY, nmh.idFrom, (LPARAM)&nmh);
break;
Based on the link given by Konfeld.
And many thanks to all of you who contributed.
@CPallini: l would have but it wouldn't be much better than as l wanted.