Hellooooooooooo, I was thinkin about making a simple alarm clock program; in it I want to use some listboxes for the info (like hours and minutes). My main question is how do I enter in the preset values of the listbox. I'm pretty sure it's via my resource file, but I have no clue on how to do this. Gulp, *unknown*
Posted on 2001-04-22 22:45:00 by *unknown*
Look up LB_ADDSTRING and LB_INSERTSTRING in the api helps.
Posted on 2001-04-22 23:39:00 by 4oh4
.....thanx.......what 'bout my resource though? *unknown*
Posted on 2001-04-23 11:51:00 by *unknown*
Before you begin, look at my Alarm, Countdown Timer, Stopwatch program listed on Iczelion's site (author Joe) It does what you suggest with dropdown boxes for hours, minutes, seconds and fills them for you! Also included is stopwatch and an alarm clock using the DateTimePicker control. With the needed resource file. When the alarm expires, it will play a .wav file of your choice, and will remember your settings for next time. Let me know what you think and if you can improve it. I hope you can! Farrier
Posted on 2001-04-23 12:30:00 by farrier
....thanx ferrier.......
Posted on 2001-04-23 13:08:00 by *unknown*
Sorry about that. I assumed that you just wanted to know how to add the strings to your listbox. Anyways, apparently farrier helped you out. 8n) By any chance does anyone know what message to trap combobox selections?
Posted on 2001-04-23 16:23:00 by 4oh4
I'm not sure how clear my question was. Here's an excerpt from the api help:
When the user edits the content of the selection field, the parent window or dialog box procedure receives notification messages. CBN_EDITUPDATE is sent first, indicating that the text in the selection field has been edited. After the altered text is displayed, Windows sends CBN_EDITCHANGE. When the selection field content changes as the result of a list item being selected, these messages are not sent.
So short of making a CB_GETITEMDATA (as an example) call to the combobox in a timed loop, is there any way to monitor for user selection changes in the drop down list?
Posted on 2001-04-24 08:47:00 by 4oh4
Try: CBN_DBLCLK or CBN_SELCHANGE I'm not sure CBN_SELCHANGE is exactly what you want but it may be the closest alternative I can find. Farrier
Posted on 2001-04-24 10:04:00 by farrier
Thanks farrier. CBN_SELCHANGE appears to be exactly what I was wanting.
Posted on 2001-04-24 12:48:00 by 4oh4