I want to change the Text property of a ComboBox inside the OnChange event. Setting it directly doesn't work presumeably because the OnChange event occurs before the change occurs rather than after.
So I decided the best way to do this would be to send the WM_SETTEXT message using PostMessage with a global variable storing the text... PostMessage(ComboBox1.Handle,WM_SETTEXT,0,Integer(pChar(GlobalString))); But this doesn't work either. I read somewhere that Windows doesn't allow PostMessage to work with string pointers because it's likely the string address on the stack is temporary and will not exist after PostMessage has been sent. This may be correct in most cases but with a global string, the address of the string will be constant, so it would work. SendMessage works with string pointers, but SendMessage waits until the message has been delivered before the procedure continues execution, so that defeats my purpose. Is there anyway to fool Windows into sending a WM_SETTEXT message without waiting. Or do I have to muck about with a timer or send my own user message to get this to work? Thanks, Ross. _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

