Article View: rec.games.programmer
Article #1157Windows Programming
From: john woolsey 9209 U
Date: Thu, 12 Nov 1992 00:25
Date: Thu, 12 Nov 1992 00:25
41 lines
2913 bytes
2913 bytes
I just got a copy of Turbo Pascal for Windows second hand, because I wanted to do some windows programming. I used to program in pascal before I moved to C. There are a lot of things that I am not very impressed about, but the most annoying is that there is almost no documented support of using the actual windows routines for creating windows. They seem to want to force you into their form of object oriented programming. This wouldn't be a problem except they have forgotten a few variables that I desperately need for what I am doing in windows. My problem is this. Every time I run the create windows program it cashes with a segmentation fault. The kernel catches it, but it doesn't help my program to work. I think that I am somehow defining some variables wrong that are crashing the machine (brilliant eh :-) When creating a window Class. I am having difficulty. I am unsure on what to use for an hInstance, hIcon, and hCursor value. I have basically made up numbers with varying results for all of them. I also do not know what to do with the variable lpszMenuName. These variables are all from the record used in RegisterClass call, which should be standard from all forms of windows libraries. When creating the window I have a record, which I am pretty sure returns values, but I have set them with values anyways since there is no documentation to explain it. (read sample code needed desperately). lpCreateParams = ''. No idea what they want there. hInstance = 0. hMenu = 0. Probably should create a menu, and patch that in here. hwndParent = 0. I think this creates the first window, but I am not sure. deExStyle = 0. I can't find the defines for this. I used the standard style above. Basically I can't create a window using the standard routines, and I am frustrated. I have found a lot of neat little toys that would come in handy, and I am pretty sure that I understand how they work, but on most of these variables I have little idea where to start, or which one is causing the program to crash uncerimoniously. I can create a window with the object oriented fation, but there are many things I can't do if I go through that method. Please mail me some example code if you have written any non-object oriented code in C, or Pascal. I assume that the function calls would be similar for any type of windows programming. thanx in advance. I will post some working code to the net if anyone is interested, or I will mail to all interested parties the basic code in Turbo Pascal for windows to open, and manipulate a window.
Technical Details
Message-ID:
<BxKuI1.162@mach1.wlu.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!utcsri!skule.ecf!torn!watserv2.uwaterloo.ca!mach1!wool8657Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!skule.ecf!torn!watserv2.uwaterloo.ca!mach1!wool8657 From: wool8657@mach1.wlu.ca (john woolsey 9209 U) Subject: Windows Programming Message-ID: <BxKuI1.162@mach1.wlu.ca> Organization: Wilfrid Laurier University Date: Thu, 12 Nov 1992 00:25:12 GMT Lines: 41