title: implementing HIDictionaryWinsowShow function and get error: A Carbon window's attributes couldn't be gotten
body: <p>I want to add Dictionary service into my App, So I implementing HIDictioanryWindowShow(). here is my code</p>
  
  <blockquote>
    <p>CFRange range=DCSGetTermRangeInString (NULL,(__bridge CFStringRef)string,0);</p>
  </blockquote>
  
  <pre><code>CTFontRef font =CTFontCreateWithName((__bridge CFStringRef)string, 0.0, NULL);
  CGFloat x= [_window frame].size.width/3;
  CGFloat y = [_window frame].size.height/2;
  </code></pre>
  
  <blockquote>
    <p>HIDictionaryWindowShow(NULL, (__bridge CFStringRef)string, range, font, CGPointMake(x, y), YES, NULL); </p>
  </blockquote>
  
  <p>and when I run my app, there is error say: A Carbon window's attributes couldn't be gotten.
  A Carbon window's features couldn't be gotten. Couldn't get window modality: error=-5600</p>
  
  <p>please help me ! thank you !</p>