alan@doc.dss.com (04/22/91)
Hello - I am new to windows so please excuse me if this is a trivial question or is located in a FAQ file. (Is there a FAQ file and if so where can I get it) I am tring to use an edit control to enter a series of numbers in my main window. The windows build fine and the edit controls work however the only way that I can gain access to the number entered in the edit window is using a EM_GETLINE message. This is not good enough since I would like to be able to check contents of the edit window and make changes to the buffer. I have tried using EM_SETHANDLE and EM_GETHANDLE messages with a local memory handle as in an example in the SDK, however everytime I send EM_GETHANDLE a handle of 0 is returned. If I just try to lock the handle I originally allocated the memory pointer seems to be about 8 bytes before the storage for the edit window. Is this some kind of header that I need to ignore ? Is the EM_GETHANDLE - EM_SETHANDLE the right approach for what I am doing ? I am doing this all within the main window and the main window function. Does it make sense to do it all within a dialog box or does it not matter. Other than the SDK are there any other books or code examples that would be helpful for a windows newcomer ? I have a series of these edit windows and want TAB or ENTER to jump between them. Does it make sense to watch the keystroke messages and send SETFOCUS messages to the next edit window ? Does windows have some sort of mechanism to do this for me ? Thanks in advance, alan@doc.dss.com
drift@qut.edu.au (Glenn Wallace) (04/25/91)
In article <1991Apr22.105818.1@doc.dss.com>, alan@doc.dss.com writes: > I am tring to use an edit control to enter a series of numbers in my > main window. The windows build fine and the edit controls work however the Perhaps you could use SetDlgItemText() and Get~ to do this. It may not provide the flexibility you need, but it is easier to use. > Other than the SDK are there any other books or code examples that > would be helpful for a windows newcomer ? The Petzold Windows 3 book is the "bible" ... see FAQ > I have a series of these edit windows and want TAB or ENTER to jump > between them. Does it make sense to watch the keystroke messages and send > SETFOCUS messages to the next edit window ? Does windows have some sort of > mechanism to do this for me ? Yes, they are TABSTOP styles which can be changed in the Dialog editor in the SDK. It's in the Edit groups (or something) menu item. +-------------------+-----------------------------------------+ | Glenn Wallace | Net: drift@qut.edu.au | | Drift Project | Fone: +61 7 837-7126 Fax: +61 7 221-0173| | Telecom Australia | Snail: 11th Flr 144 Edward St., | +-------------------+ Brisbane, Q4000 Australia | | | | Disclaimer - The opinions expressed must be my own, because | | Telecom is a statuatory authority and as such, | | is not capable of having opinions. | +-------------------------------------------------------------+