One of the new concepts in Vista is an updated and extended version of the old MsgBox dialog. Vista now comes with someone called Task Dialogs which provide the user with a different, more up-to-date user interface. Basically, the old MsgBox API was there for quick and dirty messages, but people ended up using it for actual user interaction. So Microsoft embraced the idea and you now have a uniform way to interact with the user using a set of new APIs.
Now you can use this new set of APIs in REALbasic using declares.
A task dialog allows you to setup a main instruction, the content area, an icon, what buttons appear, whether there's a "more" widget and a footer, the title, etc. There are two different APIs you can use -- one is the simple one, which is essentially like a beefed-up version of the MessageBox API. The other is a semi-complex one which gives you total control and will allow you to take over the world. We're going to delve into the simple one since I'm feeling lazy and am going to be playing volleyball in a few minutes. ;-)[rbcode]
Function TaskDialog(w as Window, title as String, mainInstruction as String, content as String, buttons as Integer) As TaskButton
Soft Declare Function TaskDialog Lib "ComCtl32" ( parent as Integer, hInstance as Integer, title as WString, mainInstruction as WString, contet as WString, _
buttons as Integer, icon as Integer, ByRef retButton as TaskButton ) as Integer
if System.IsFunctionAvailable( "TaskDialog", "ComCtl32" ) then
dim ret as TaskButton
if 0 <> TaskDialog( w.Handle, 0, title, mainInstruction, content, buttons, 0, ret ) then return TaskButton.Error
return ret
else
return TaskButton.Error
end if
End Function
Enum TaskButton
Ok = &h1
Yes = &h2
No = &h4
Cancel = &h8
Retry = &h10
Close = &h20
Error = -1
End Enum[/rbcode]
As you can see, the TaskDialog API is really simple to use and it comes from the common controls library on Vista. We're going to be using a soft declare since this API only exists on Vista and not on XP or earlier. One other striking thing is the fact that there aren't A and W versions of the TaskDialog API -- since this is Vista-only, there's always Unicode support and so there's no need for an A vs W battle. Yay!
You use this API like this:[rbcode]
dim ret as TaskButton
ret = TaskDialog( self, "This is the title", "Will you clean your room?", _
"If you don't clean your room, you won't get any delicious candy after dinner tonight.", _
Int32( TaskButton.Yes ) + Int32( TaskButton.No ) )[/rbcode]
Pretty simple to use, eh? It produces output that looks like this:

Now, we could also add support for displaying an icon in the static area of the dialog, or different buttons, etc. However, that should be a relatively easy exercise for anyone who wishes to give it a shot.
Ta da! There's your first new peek at a Vista-specific API. It may not be terribly exciting, but it should be the first of many.
Why are you thinking about programming when Lis is there??? Am I missing something??
Lis has to sleep sometime. ;-)
Yeah, I sleep when I'm bored to death while you sit on your comp. HA!