I'm working on a program that needs to show which control that the user has selected currently. To do this I draw a red box around the gadget using setbuffer(desktopbuffer()). However, I have no good way to get rid of the red box once I draw it. I've been trying to use USER32.DLL userlib commands for quite a while, but for the life of me I can't figure out how to get a control to redraw itself to remove this red box. My latest attempt has been to add this line to my program
RedrawWindow(QueryObject(mainwin,1),0,0,1+256+128) ;This means that RDW_ALLCHILDREN(128), RDW_INVALIDATE(1), And RDW_UPDATENOW(256) are set
I have the userlib installed correctly, (I'm pretty sure at least) but this command causes a crash whenever I run the program. Can anyone tell me why this command crashes the program? Here's a link to the msdn command page. http://msdn2.microsoft.com/en-us/library/aa921313.aspx
RedrawWindow(QueryObject(mainwin,1),0,0,1+256+128) ;This means that RDW_ALLCHILDREN(128), RDW_INVALIDATE(1), And RDW_UPDATENOW(256) are set
I have the userlib installed correctly, (I'm pretty sure at least) but this command causes a crash whenever I run the program. Can anyone tell me why this command crashes the program? Here's a link to the msdn command page. http://msdn2.microsoft.com/en-us/library/aa921313.aspx