Intro to Windows Programming Basic Ideas. Program Entry Point Int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)

Slides:



Advertisements
Similar presentations
Prof. Muhammad Saeed. Procedure-Driven Programming Event-Driven Programming Events Messages Event Handlers GUI Windows and Multitasking Queues ( System.
Advertisements

1 Windows Programming CIS 577 Bruce R. Maxim UM-Dearborn.
*** CONFIDENTIAL *** © Toshiba Corporation 2008 Confidential Creating real time screen layouts.
Computer Graphics1 Windows NT Graphics Interface.
Chapter 2 Programming by Example. A Holistic Perspective Three sections separated by blank lines. Program comment File: FileName.java
QT – Introduction C++ GUI Programming with Qt 4 Blanchette and Summerfield, Ch. 1 Miller, 2004.
Introduction to Windows Programming. First Windows Program This program simply displays a blank window. The following code is the minimum necessary to.
Dragan Bojić University of Belgrade Porting XCTL from Borland C++ to Visual C++
Chapter 5 Input/Output Clocks User Interfaces: Keyboard, Mouse Power.
IN-LAB # 1 - GETTING STARTED - BUT FIRST: 1.Project ideas - watch the scope!!! 2.Check accounts 3. Either myself or the TA need to check you off BEFORE.
Simple Gui in C++. Project Selecting So Far Registering the window class Creating the window.
Simple Gui in C++. Project Selecting So Far Registering the window class Creating the window.
First Windows Program Hello Windows. 2 HELLOWIN.C #include LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ; int WINAPI WinMain (HINSTANCE hInstance,
1 CS1253 VISUAL PROGRAMMING UNIT I WINDOWS PROGRAMMING Windows environment – a simple windows program – windows and messages – creating the window – displaying.
MFC Workshop: Intro to MFC. What is MFC? Microsoft Foundation Classes C++ wrappers to the Windows SDK An application framework A useful set of extensions.
GVE, Hallym University, Song, Chang Geun, Ph.D. 컴퓨터 그래픽스 응용 한림대학교 컴퓨터공학부 송 창근.
Win32 API Programming Event-driven, graphics oriented Example: User clicks mouse over a program’s window area (an event) -- – Windows decodes HW signals.
Prepared by Fareeha Lecturer DCS IIUI 1 Windows API.
Overview of Previous Lesson(s) Over View  Visual C++ provides us with 3 basic ways of creating an interactive Windows application  Using the Windows.
Chapter 1: Hello, MFC Windows Programming Model Department of Digital Contents Sang Il Park.
Chapter 1: Hello, MFC Your first MFC Application Department of Digital Contents Sang Il Park.
Lecture Two Event Handling Keyboard and Mouse Input.
QT – Introduction C++ GUI Programming with Qt 4
Introduction to the Windows API n API - Application Programming Interface n an API is the software interface for things such as the OS n an API is the.
Windows programming Graphic Library SNPL. Basic Structure Windows Programming SNPL Application program initialization Exchange Message 1.part of initialization.
Microsoft Foundation Classes. What is MFC? Set of C++ classes written by MS Simplifies writing complex programs Covers many areas: – GUI – I/O – O/S interfaces.
Server Core is the preferred deployment configuration.
Further games and graphics concepts COSE50581 Introduction to Module and Recap Bob Hobbs Faculty of Computing, Engineering and Technology Staffordshire.
BZUPAGES.COM Visual Programming Lecture – 2 Miss. SADAF MAJEED SIAL Computer Science Department Bahauddin Zakariya University Multan.
Direct3D Workshop November 17, 2005 Workshop by Geoff Cagle Presented by Players 2 Professionals.
GAM666 – Introduction To Game Programming You must use special libraries (aka APIs – application programming interfaces) to make something other than a.
Računarska grafika GDI+ (Graphics Device Interface Plus)
Presentation Outline Introduction Painting and Repainting GDI.
GUI-Based Programming ECE 417/617: Elements of Software Engineering Stan Birchfield Clemson University.
© Copyright Khronos Group, Page 1 How to program OpenVG Hwanyong Lee HUONE Inc.
Dialog boxes Modal and modeless dialog boxes Displaying about dialog box: case WM_COMMAND : switch (LOWORD (wParam)) { case IDM_APP_ABOUT : DialogBox (hInstance,
Quanta Confidential QUANTA WBU Study Report 1 昭正 2008/08/01.
Programming Input Devices. Getting the device state Schemes for processing input – Polling – Callbacks Ways to intercept messages from input devices –
The WM_NCHITTEST Message  This is an internal message used by Windows for generating all the other mouse messages.  Though it almost never needs to be.
Menus  Menus is a feature which is common to almost every windows applications. It is the one of the most common user interface elements around.  Windows.
Introduction to OpenGL
Unit 3 Lesson 5 Strings and the String Class Mr. Dave Clausen (modifications from the textbook)
Learning Programming Windows API Morpheus Feb-28, 2008.
Overview of Previous Lesson(s) Over View  Windows Programming  WinMain()  Where execution of the program begins and basic program initialization is.
Our good old first Win32 programme of lecture 8 #include int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
Introduction To GDI GDI Definition : It is a interface present in windows which provide function and related structures that an application can use to.
W indows Programming Lecture 08. Brief History of Win Windows is announced 1984 Work begins on Word for Windows 1.0 November 1985: Windows 1.0.
Lecture 8: Discussion of papers OpenGL programming Lecturer: Simon Winberg Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
Windows Programming Lecture 14. WM_PAINT message Whenever an application receives the WM_PAINT message, whether the entire window needs repainting? WM_PAINT.
Visual Info Processing Programming Guide
Presentation Outline Introduction Painting and Repainting GDI.
Windows Programming Lecture 10.
Visual Programming Lecture 1 & 2
Windows Programming Lecture 09.
Window.
18 & 19.
Windows Programming Model
Aspect-Oriented Programming
Windows Programming using Dev C++
Queued and Nonqueued Messages
The program in traditional OS
Windows Controls & Concepts
Windows Programming Lecture 12
Windows Programming Lecture 13
CS 1253 Visual Programming Unit I Windows Environment
Windows Programming Lecture 15
19.
Windows Development Dynadata Copyright, 2014 © DynaData S.A. 1/10.
Graphics Laboratory Korea University
GUI Socket Application
Presentation transcript:

Intro to Windows Programming Basic Ideas

Program Entry Point Int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) Acts as an entry point just as a main function would act in a C program.

Common Header Files WINDEF.H – Basic type definitions. WINNT.H – Type definitions for Unicode support WINBASE.H – Kernel functions. WINUSER.H – User interface functions WINGDI.H – Graphics device interface functions.

Message Box function int WINAPI messageBox (HWND,LPCSTR,LPCSTR, UINT) Acts as a way do display a message onto the screen.

Different String Functions ILength pString IComp They can do a variety of things such as calculate string lengths, copy strings, concatenate strings, and compare strings.

Handles HINSTANCE – Handle to an “instance” – the program itself HWND – Handle to the window HDC – Handle to a device context The type of the object allows your program to know how to use the handle

Data Structures MSG – Message structure WNDCLASS – Window class structure PAINTSTRUCTURE – Paint structure RECT – Rectangle structure First two data structures are used in WinMain and the second two are used in WndProc

Other Messages wParm – a 32-bit message parameter dependent on the particcular message lParam – same as above Pt – mouse coordinates at the time the message was placed in the message queue