🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2782

Re: Beginner Help

#2782
From: Bruce Wright
Date: Tue, 21 May 1991 21:38
37 lines
2041 bytes
In article <1991May21.183435.15832@maytag.waterloo.edu> markb@csg.uwaterloo.ca (Mark Brezina) writes:
>
>	I've only been programming windows for a couple of weeks so these 
>	questions may seem obvious...
> 
>	How do I initialize a radio button to be selected?

Use the CheckRadioButton call in the WM_INITDIALOG message processing
for your dialog box.

>	Does a bitmap handle to the clipboard have to be locked (using
>	GlobalLock) before the bits can be examined?

If you are copying them with GetBitmapBits or CopyBitmap, no.  In 
general you need to lock any time you get a long pointer to a
memory address other than your own data segment during the processing
of a single message.

>	How do I create a windows application that is simply a dialoge box
>	(no menu, no window) I would like a file requestor to come up when
>	the application is launched.  No menus or windows are needed.

You do a CreateDialog instead of a CreateWindow call in your WinMain
routine.  Note that you need to allocate extra space in your window
structure by setting wndclass.cbWndExtra = DLGWINDOWEXTRA before you
call the CreateDialog routine - otherwise you will corrupt memory.

All of this is explained in much more detail in Petzold's book
(Programming Windows), which is an excellent introduction to Windows 
programming.  Trying to learn Windows programming without using it 
(or a similar book, though Petzold is probably the best of the lot) 
is like trying to program with both hands tied behind your back.  
Heavily recommended.

Good luck -

						Bruce C. Wright
Technical Details
Message-ID: <1991May21.213854.5222@rti.rti.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!newstop!sun!amdcad!dgcad!dg-rtp!rti!bcw
References: <1652@msa3b.UUCP> <1991May21.183435.15832@maytag.waterloo.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!sun-barr!newstop!sun!amdcad!dgcad!dg-rtp!rti!bcw
From: bcw@rti.rti.org (Bruce Wright)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Beginner Help
Message-ID: <1991May21.213854.5222@rti.rti.org>
Date: 21 May 91 21:38:54 GMT
References: <1652@msa3b.UUCP> <1991May21.183435.15832@maytag.waterloo.edu>
Organization: Research Triangle Institute, RTP, NC
Lines: 36