60 likes | 175 Views
System Level Programming Software College of SCU. 四川大学软件学院 舒莉 Email: shuli@scu.edu.cn. Lab 14. Exception and Process/Thread. Practice 1 Show Current Time Practice 2 Add thread to DrawRect Practice 3 Add thread to database searching Practice 4 Two Thread Program.
E N D
System Level ProgrammingSoftware College of SCU 四川大学软件学院 舒莉 Email: shuli@scu.edu.cn
Lab 14. Exception and Process/Thread • Practice 1 Show Current Time • Practice 2 Add thread to DrawRect • Practice 3 Add thread to database searching • Practice 4 Two Thread Program 201001V1.1
Practice 1 Show Current Time • Read and Run Helloworld1 • Read and Run Helloworld2 • Extend Helleloworld3 • Add WM_LBUTTONDOWN message handle case statement so that when you click the left button of your mouse, the time now can be shown just at the position where you click happens. • Tips: • GetLocalTime() • sprintf() • GetDC() amd ReleaseDC() 201001V1.1
Practice 2 Add thread to DrawRect • Add thread to solve the problem in the program 201001V1.1
Practice 3 Add thread to database searching • Add thread to solve the problem in the program • Part II of Exercise6 201001V1.1
Practice 4 Two Thread Program • Read the program, before you run it, guess what the output should be. Then run it, and answer the following questions: • What is the problem in the program? • Give me the term that describe this phenomenon • Why this happen 201001V1.1