Lab Contact 1 Lab Assistants: Meng Liu, Group B Sara Abbaspour, Group A
Labs 2 Lab1: Introduction to Win32 API What: Create wrappers for system calls Why: Get a feel for Visual Studio and MSDN Library Lab2: Planetsystem What: Simulate a 2-dimensional planetary system Why: Multithreaded programming: IPC (mailslots), threads, critical sections, … Develop a client server application
Labs 3 Lab 3: Option A: Graphical client What: Make the client from lab2 graphical Why: Event-based programming and Window handling Option B: Improvement of the Planetsystem What: Make improvements of lab 2 (open) Why: Use more knowledge and skills to implement your own ideas Option C: Mini project What: Make a mini project based on your own proposal Why: Use more knowledge and skills to implement your own ideas
Lab 1 4 Set up project in Visual studio Win32 Console application, empty project Visual Studio available through Academic Alliance Don’t use unicode!!!!! Project properties” =>”configuration properties” => ”Character set”: ”Unicode” => ”Multibyte” Find system calls and parameters in MSDN Create threads Mailslots Critcal sections All about diving into MSDN
Lab 2 5 Understand multithreaded programming Start with a labskeleton Understand how this works first!!! You will actually not write that much code DESIGN, DESIGN, DESIGN!!!! Explain to lab assistant to get help More understanding than programming! Look at win32 programming tutorial
Lab 3A 6 Event based programming Call-back functions Message loop … Graphical objects Resource Editor DESIGN, DESIGN, DESIGN Look at win32 programming tutorial
Lab 3B&C 7 Open Assignment Use the template for proposals Specify the utilized knowledge related to the course Proposal for Option B or C should be approved before you start implementation! Deadline of proposal: last session of Lab 2.
Windows in Windows 8 Fönster “handle” OS Händelser som CBF inte tar hand om Default CBF Applikationer Registrera fönserklass Tråden WinMain() Instantiera fönster... /* Meddelande loop */ while (GetMess ()) { process message () } Vad var det för händelse? Init? Destroy? Command? … Callback funktion Varje fönster har en CBF
What do you need to do? 9 Lab 2 fönsterhantering Inte mycket, rita pixlar Mer tråd- och mailboxhantering Lab 3 fönsterhantering Defaultklasser finns för dialog boxar, knappar, … Använd resursreditorn Definiera trådar, Meddelande loop och CBF Registrera fönser class Tråden WinMain() Instantiera fönster... /* Meddelande loop */ while (GetMess ()) { process message () } What was the event? Init? Destroy? Command? … Callback funktion
10 Resurseditorn Klicka bara för Dialog och sen New Knappen registreras här. Inkludera resource.h Knappen vi gjortKnappens ID. Denna kan testas I CBF Verktygslåda, knappar mm
Klicka bara för Dialog och sen New 11 Resurseditorn VS-2012