Home > Software engineering >  In win10, create a desktop, the start menu can't pop up
In win10, create a desktop, the start menu can't pop up

Time:11-08

In win10, create a desktop, click on the start menu can't pop up, Windows 7 is no problem, please directly, the code is as follows:

Void main ()
{
Char DeskName []="ABC".
STARTUPINFO si={0};
PROCESS_INFORMATION PI={0};
Si. Cb=sizeof (STARTUPINFO);
Si. DwFlags=STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
Si. WShowWindow=SW_SHOW;
Si. LpDesktop=DeskName;

HDESK HDESK=CreateDesktop (DeskName, NULL, NULL, 0, GENERIC_ALL, NULL);

Bool rv=SetThreadDesktop (hdesk);
If (rv==false) {
Int err=GetLastError ();
Printf (" err: % d \ n ", err);
return;
}

SwitchDesktop (hdesk);
CreateProcess (" C: \ \ Windows \ \ explorer exe ", NULL, NULL, NULL, TRUE, 0, NULL, NULL, & amp; Si, & amp; PI);
}

CodePudding user response:

This can go to the Microsoft technology BBS consulting

CodePudding user response:

Microsoft's technology BBS links?

CodePudding user response:

https://social.microsoft.com/Forums/zh-CN/home? Forum=visualcpluszhchs& The filter=alltypes& Sort=lastpostdesc

  • Related