NOTE:  This course will not be offered again.  As such, this page has been retired and will no longer be updated.

CTEC1638 Windows Programming I

Winter 2010
Instructor:  Mike Boldin Send email to the instructor

Announcements | Notes | Labs | Downloads |

Last modified:  Mon May 03 18:11:26 EDT 2010
What's New

Announcements

  • [Mon May 3 09:14:02 EDT 2010]
    This course will not be offered again.

  • [Mon May 3 09:13:15 EDT 2010]
    Final grades are posted on Blackboard.

  • [Tue Apr 13 16:15:12 EDT 2010]
    Last year's final exam is here [ZIP; 83,759 bytes], including instructions, sample code, skeleton, and solution code.

  • [Mon May 3 09:24:53 EDT 2010]
    Final exam was held on April 28.  The marks were recorded out of 53 (instead of 60).  Solution code is here [ZIP; 4,529 bytes].

  • [Tue Mar 30 12:16:40 EDT 2010]
    The midterm exam was held on March 26.  The marks will be recorded out of 20 (instead of 25).  Solutions are here [ZIP; 92,087 bytes].

  • [Fri Mar 12 11:42:30 EST 2010]
    Multithreading examples from class, built under VS2008, are here [ZIP; 293,299 bytes].

  • [Fri Feb 26 11:24:38 EST 2010]
    Updated version of "week07a" example has been posted here [ZIP; 9,295 bytes] — includes code to handle a checkbox WM_COMMAND message, to enable/disable dialog box controls, and to pass a struct to a dialog box callback.

  • [Fri Feb 26 09:28:34 EST 2010]
    Dialog box code from class is here [ZIP; 169,419 bytes].  Also, "week03" (bitmap/DLL) code from Feb. 9 has been updated to correct project dependencies.  The updated version is here [ZIP; 367,073 bytes].

  • [Tue Feb 9 15:30:56 EST 2010]
    More old code has been imported into Visual Studio 2008:

  • [Fri Jan 29 15:15:17 EST 2010]
    Posted Windows NT overview notes and X86 and Windows NT architecture slideshow (from previous terms).

  • [Fri Jan 29 10:51:43 EST 2010]
    The messages [ZIP; 10,273 bytes] program fro class (Jan.29) has been posted in VS 2008 format, with an updated Windows messages header file (wm7.h) for the Windows 7 version of the Microsoft Windows SDK (i.e., the Win32 API).

  • [Tue Jan 26 15:29:29 EST 2010]
    The rects2 [ZIP; 6,993 bytes] program from class (Jan.26) has been posted in VS 2008 format, with the window information message box and Windows 7 versioning added.

  • [Tue Jan 26 11:08:50 EST 2010]
    The types, types2, and rects from class (Jan.22) have been posted in VS 2008 format [ZIP; 13,332 bytes].

  • [Fri Jan 22 09:34:46 EST 2010]
    Lots of material from previous terms has been posted.

  • [Tue Jan 19 15:22:19 EST 2010]
    More code from last week:

    Note that for all C/C++ Win32 projects, whether Win32 Console Application or Win32 Application, go to Project Properties and change the Character Set to "Not Set" — the default is "Unicode" and does not work well with either Standard C library or Win32 API functions.

  • [Tue Jan 19 11:03:36 EST 2010]
    Here is the test program, with VS2008 project and solution files [ZIP; 2,854 bytes].

  • [Tue Jan 19 11:04:32 EST 2010]
    A link to the old CTEC1335 web site which still contains information pertinent to this course.

  • [Sun Jan 10 14:02:01 EST 2010]
    All three labs and their due dates have been updated.

  • [Sun Jan 10 14:04:06 EST 2010]
    This course is being offered for the last time.  The prerequisite course is CTEC1435.

Notes

Notes and Code

C vs. C++
Intro to GUI programming
Books (requires password)
Win32 Programming Lectures (from previous years) added Fri Jan 22 2010

  • Test1 .cpp a demonstration of pointers and structs as used in week 1 lectures
  • Message Snoop .cpp a demonstration of Windows messages
  • Rect Demo .cpp a demonstration of the use of the RECT structure
  • Mouse Button Demo .cpp a demonstration of the use of mouse clicks
  • Bitmap Demo .cpp a (crude) demonstration of the use of DC's and Bitmaps. Inside the RC file be sure to add the line 'MyBP BITMAP MOVEABLE PURE "BP.BMP"' where BP.BMP is your bitmap filename. Do NOT define a resource number in the resource.h file (see the function prototype for 'LoadBitmap').
  • Thread Demo .cpp a demonstration of threads and how _not_ to 'hang' a program.
  • Semaphore Demo .cpp a demonstration of semaphores and how control a thread.
  • Practice Final Exam from 2007W. Inlcudes all starter files and a solution. Password-protected ZIP file.

Notes and Code from 2009 Winter

added Fri Jan 22 2010

Lab #2-related

  • Notes on using global variables
  • WinHello [ZIP; 341,486 bytes] — "Hello, Cruel World" in Win32
  • WinHello Bitmap [ZIP; 297,404 bytes] — adding a bitmap of "Sexy Bill"
  • WinHello X [ZIP; 298,743 bytes] — painting parts of a bitmap, fixed window size, right justification
  • WinHello Grid [ZIP; 607,197 bytes] — painting X's and O's in a pretty grid pattern
  • WinHello Switch [ZIP; 607,587 bytes] — switching X's and O's using an accelerator; forcing client area refresh
  • Load and paint a bitmap resource [ZIP; 82,041 bytes]
  • Paint the bitmap centered in the client area [ZIP; 82,103 bytes]
  • Add exit confirmation [ZIP; 82,284 bytes]
  • Dialog boxes:

    • version 1 — open and close dialog box; set controls from global variables; handle Defaults and Cancel buttons only [ZIP; 19,622 bytes]
    • version 2 — get controls and set global variables, handle OK button; display a prompt (loaded as a string table resource) in the window [ZIP; 20,043 bytes]
    • version 3 — correct problem with Defaults button; center prompt in window; add menu item and accelerator resources to open the dialog box [ZIP; 20,651 bytes]

Lab #3-related

Other

Notes and Code from 2007 Winter

added Fri Jan 22 2010

Lab #2-related

Lab #3-related

Other

  • Mike Boldin's COMP435 Archive
  • The types program with comments [zipped; 3,432 bytes]
  • The types2 program with comments [zipped; 3,390 bytes]
  • The rectangles with comments [zipped; 5,633 bytes]
  • Updated rectangles program with comments [zipped; 6,416 bytes]
Labs

Labs

  • Lab #1: A Win32 Console Application
    Using Microsoft Visual C++, a basic tic-tac-toe game is developed as a Win32 console application. This lab serves as a review of important concepts such as the use of pointers which is required throughout this course.
    Due on 2010/01/29 by midnight
  • Lab #2: A Win32 Application (Tic-Tac-Toe)
    Using Microsoft Visual C++, a Win-32 based tic-tac-toe game is developed. This lab serves as a vehicle to utilize windows controls and resources such as menus, bitmaps, etc.
    Due on 2010/03/19 by midnight
  • Lab #3: An Advanced Win32 Application
    Using a USB-based temperature sensor, a windows-based temperature logging application will be developed which logs temperature over time. The application will use multithreading to access the hardware including semaphores to interlock processes.
    Due on 2010/04/23 2010/04/16 by midnight
 
Downloads

Downloads

InfoZip UNZIP for Windows (113K, EXE)
InfoZip ZIP for Windows (104K, EXE)

Back to Technology Courses