![]() |
Questions and AnswersWritten by Larry Salomon Jr. |
Gotcha Notes!It appears that if you have the following: DosOpen("A:",...) do { DosDevIOCtl(...,IOCTL_GETDEVICEPARAMS,...) ulSzDestDrive= ... ; if (ulSzSourceDrive!=ulSzDestDrive) promptUser(...); } while (ulSzSourceDrive!=ulSzDestDrive);If the user removes the diskette when prompted, the next call to DosDevIOCtl() will return ERROR_NOT_DOS_DISK even though the diskette is formatted. The way around this is to close the drive and reopen using DosOpen(). Questions and AnswersJames P Robertson (robertso@ecn.purdue.edu) writes: I was just wondering if there was an easy way to have a "tool bar". A menu of buttons underneath the standard system menu. I looked into value set controls, but I don't think that is what I am looking for. It seems as though quite a few applications have this tool bar. Good question, with a complex answer. There are actually two approaches to this problem:
To implement the first solution, you need to do a trick that was used by many wallpaper programs before better techniques were developed. Intercept the WM_PAINT message in your client window procedure as always, but just before exiting the window procedure, call WinSetWindowPos() to change the z-order to HWND_BOTTOM. The second solution requires a bit more coding and lot more patience and involves a couple of steps.
|