The soft keyboard is controlled by \Windows\softkbd.exe. Running softkbd.exe toggles the keyboard visible state, so you could simply call CreateProcess like this:
CreateProcess(_T("\\Windows\\softkbd.exe""),
NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, NULL);
A call to FindWindow() can be used to determine if it is currently showing.
-----------------
Chris Tacke, eMVP
Applied Data Support