Home > Back-end >  Unable to display graphical interface this program
Unable to display graphical interface this program

Time:05-27

 
Int main ()
{
int a;
Printf (" please select a program used by the system \ n ");
Printf (" 1. Version1.0.1 (can be normal use) ");
Printf (" (2) version2.0.1 (there are a few bugs) ");
Scanf_s (" % d ", & amp; A);
If (a==1)
{
A1 (1);
}
If (a==2)
{
A2 (1);
}
exit(0);
return 0;
}
Void a2 (int a)
{
SetConsoleTitle (TEXT (" WIN10 system small tool software "));
Int b;
Initgraph (WND_WIDTH WND_HEIGHT);
BeginBatchDraw ();
Setbkcolor (WHITE);
cleardevice();
//init (1);
While (1)
{
while (! _kbhit ())
{
Init1 (1);
B=mouse (1);
EndBatchDraw ();
Link (b);
}
}
System (" pause ");
}
Void a1 (int a)
{
SetConsoleTitle (TEXT (" WIN10 system small tool software "));
Int b;
//a=init (1);
While (1)
{
B=init (1);
Link (b);
}
System (" pause ");
}
Void init1 (int a)
{
Setlinecolor (BLACK);
The line (100, 50, 900, 50);
Line (100, 50, 100, 100);
Line (100, 100, 900, 100);
The line (900, 100, 900, 50);
Settextcolor (BROWN);
Outtextxy (300, 60, TEXT (" WIN10 small tool software version 2.0.1 BETA directly, please use the mouse to choose "));
Outtextxy (500, 78, TEXT (" -- -- -- -- -- - powered by Liu Renyu "));
Int I=0, j=0;
For (I=0; i <4. I++)
{
The line (50 + I * 300, 150, 50 + I * 300, 900);
}
For (j=0; j <11. J++)
{
The line (50, 150 + 75 * j, 950, 150 + 75 * j);
}
Show (1);
}
Void show (int a)
{
Settextcolor (BROWN);
Outtextxy (55, 180, TEXT (" 0. Quit this program "));
Outtextxy (355, 180, TEXT (" 1. Win10 improve system performance, may cause the CPU overclocking ")); Outtextxy (355, 200, TEXT (" (WIN10 performance excellence mode) "));
Outtextxy (655, 180, TEXT (" 2. Win10 disk check and repair the damaged files, and ")); Outtextxy (655, 200, TEXT (" sectors "));
Outtextxy (55, 255, TEXT (" 3. Win10 check file with the system in a protective ")); Outtextxy (55, 275, TEXT (" conflict "));
Outtextxy (355, 255, TEXT (" 4. Win10 lists existing power supply mode "));
Outtextxy (655, 255, TEXT (" 5. Win10 fully closed win10 performance excellence mode "));
Outtextxy (55, 330, the TEXT (" 6. Win10 rubbish program (currently only supports the C disk file ")); Outtextxy (55, 350, TEXT (") "));
Outtextxy (355, 330, TEXT (" 7. Win10 start command prompt "));
Outtextxy (655, 330, TEXT (" 8. Win10 start powershell "));
Outtextxy (55, 405, TEXT (" 9. Win10 system file repair "));
Outtextxy (355, 405, TEXT (" 10. Win10 desktop icon abnormal repair "));
Outtextxy (655, 405, TEXT (" 11. Win10 resource manager abnormal repair "));
Outtextxy (55, 480, TEXT (" 12. Win10 start task manager "));
Outtextxy (355, 480, the TEXT (" 13. Win10 python environment perfect (already installed python ")); Outtextxy (355, 500, TEXT (") "));
Outtextxy (655, 480, TEXT (" 14. Win10 python scripts run speed "));
Outtextxy (55, 555, TEXT (" 15. Win10 packaging python scripts for executable file "));
Outtextxy (355, 555, TEXT (" 16. Win10 advanced calculator "));
Outtextxy (655, 555, TEXT (" 17. Win10 mathematical statistical procedure "));
Outtextxy (55, 630, TEXT (" 18. Win10 uninstall activation keys (strongly suggest not to use) "));
Outtextxy (355, 630, TEXT (" 19. Win10 installed version of key enterprises "));
Outtextxy (655, 630, TEXT (" 20. Win10 regular shutdown "));
Outtextxy (55, 705, TEXT (" 21. Win10 cancel regular shutdown "));
Outtextxy (355, 705, TEXT (" more, please look "));
}

Int the mouse (int a)
{
MOUSEMSG m;
FlushMouseMsgBuffer ();
int i=0;
Int j=0;
int b=0;
While (1)
{
//control template
//the following to control an actual example of
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \
While (MouseHit ())
{
M=GetMouseMsg ();
If ((m.x & gt;=105 & amp; & M.x & lt;=282) & amp; & (m.y & gt;=423 & amp; & M.y & lt;=480))//administrator mode
{
Setlinecolor (RED);
A rectangle (105, 423, 282, 480);
If (m.u Msg==WM_LBUTTONDOWN)
{
//n=1;
return;
}
}
if (! ((m.x & gt;=105 & amp; & M.x & lt;=282) & amp; & (m.y & gt;=423 & amp; & M.y & lt;=480)))//mouse on the button color
{
Setlinecolor (WHITE);
A rectangle (105, 423, 282, 480);
}
If ((m.x & gt;=751 & amp; & M.x & lt;=929) & amp; & (m.y & gt;=425 & amp; & M.y & lt;=482))//user mode
{
Setlinecolor (RED);
A rectangle (751, 425, 929, 482);
If (m.u Msg==WM_LBUTTONDOWN)
{
//n=2;
return;
}
}
if (! ((m.x & gt;=751 & amp; & M.x & lt;=929) & amp; & (m.y & gt;=425 & amp; & M.y & lt;=482)))//mouse on the button color
{
Setlinecolor (WHITE);
A rectangle (751, 425, 929, 482);
}
}
A \ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
While (MouseHit ())
{
M=GetMouseMsg ();
For (I=0; i <4. I++)
{
For (j=0; j <11. J++)
{
If ((m.x & gt; (I) 50 + 300 *) & amp; & (m.x & lt; (I) 50 + 300 *) & amp; & (m.y & gt; (150) 75 * j +) & amp; & (m.y & lt; J + 150 (75 *)))
{
B=I + 3 * j;
return j;
}
}
}
}
}
}

Other parts of the test is normal, how to solve? How to generate graphics library?
  • Related