I want to add a dictionary service to my application, so I am implementing HIDictioanryWindowShow (). here is my code
Range CFRange = DCSGetTermRangeInString (string NULL, (__ bridge CFStringRef), 0);
CTFontRef font =CTFontCreateWithName((__bridge CFStringRef)string, 0.0, NULL); CGFloat x= [_window frame].size.width/3; CGFloat y = [_window frame].size.height/2;
HIDictionaryWindowShow (NULL, (__bridge CFStringRef) string, range, font, CGPointMake (x, y), YES, NULL);
and when I launch my application, an error occurs: the attributes of the Carbon window cannot be obtained. Carbon windows could not be obtained. Failed to get window modality: error = -5600
Please help me! thanks!
source share