[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Static text problems



Many thanks to those who sent me help on my questions about changing the title
in a static text control.  It turns out that I was doing everything right!

I have my resource ID's stored in constants in Pascal.  So, when doing a
SetCtlTitle, I do...

   SetCtlTitle(AnyConstant,GetCtlHandleFromID(theWindowPtr,AnyCtlID));

It turns out Pascal was interpreting AnyConstant as an integer, when it should
have been a longint, and it was appending two bytes of crap into the most
significant word of what got passed to SetCtlTitle.  That's why it could never
find the resource that AnyConstant contained!

AAAAAARRRRRGGGGGGHHHHHHH!  I hate problems like this!  But at least I got it
to work now.  Thanks again.
-- 
Kevin McCormick                           | "The more we try to control, the
kmccorm@access.digex.com                  |  less we are really in control."
IRC: Xenophon                             |        - Robert J. Oppenheimer
This message is costing the net hundreds if not thousands of dollars to send. :)