--- In [email protected], "entropyreduction" <alancampbelllists+ya...@...> wrote: > > Now, this is weird. > > New dialog plugion trioal (dialogplugin1.19_090102.zip) in usual folder > > http://tech.groups.yahoo.com/group/power-pro/files/0_TEMP_/AlansPluginProvisional/ > > I bunch of messages ago everyone agreed WM_GETFONT probably didn't > work across process boundaries, cause it required passing a point to a > LOGFONT struct. But try this: > > local sTitle = "Untitled - Notepad" > local sApp = "notepad.exe" > local sctrlClass = "c=Edit" > > do(sApp) > wait.for(500) > local hHan = win.childhandlelist(sTitle, sctrlClass) > win.debug(hHan) > > win.debug("Font of notepad edit control: " ++ dialog.get_value(hHan, > "font")) > > For me returns Lucida Sans. Which seems to suggest it's correctly > picking up font of edit box. How? Don't ask me.
Works for me too. I think we had only previously tried set_font on a window in another process. I believe I read somewhere that if a GDI pointer is returned across process you will lose whatever happened to be in a like handle if one existed. ? > > I guess null string is fine. If dialog.choose_font runs on a > > target like that I think I would prefer that it open with no font > > pre-selected. If one needs to be selected, probably the stock gui > > font would be preferable to system font. > > Should be returning null string when can't get a sensible answer. > Thanks. You didn't mention the resource issue. Its definitely much improved, but there is still a GDI leak. I noticed soon after posting the htm file that GDIView's detail doesn't always add up to the "All GDI" total shown. The "All GDI" figure does agree with "GDI Objects" available in Task Manager (at least in XP). I wrote the author, but have not received a reply; I suspect he should be plugging the difference between "All GDI" and the sum of the detail items into "Other GDI". For following stuff I was running empty.pcf. After the first run of regexdialog, "All GDI" now goes up by 65 I think. Subsequent runs it increases by 8. I ran regexdialog (followed its onQuit function), and in a loop set to process 1300 times. At some point it gave this error (in a window which was only partially drawn): ERROR: dialog.create: Can't load image, icon;bad file name? line 5 In GDIView, "All GDI" was maxed out for powerpro, but none of the detail items looked bad. I had downloaded another GDI audit tool called bear.exe <http://www.geocities.com/the_real_sz/misc/Bear.zip> Not as handy as GDIView and no documentation, but it does give some additional information. After canceling the above error, below are the figures bear had for powerpro. Notice the high "Icon/Cursor" figure. Its more than half of the total GDI. Regards, Sheri Process powerpro.exe PID 3800 Sum 20176 Delta 0 DC 20 Region 13 Bitmap 12 Palette 0 Font 11 Brush 55 Other 0 Window 12 Menu 0 Icon/Cursor 4951 DeferWindowPos 0 Hook 7 Clipboard 0 Accel 0 Timer 0 WindowProc 0 Other 3 GDI 9996 USER 4973 Handle 123
