G'day everyone,
in an attempt to automate my VFP IDE start, so that I may find it neat and tidy at all times no matter the video resolution or Windows theme currently in use, I am trying to take some control over the Command window as it opens up in the process.
After dealing with the Program Manager, whose window is a child of the main VFP frame, I have successfully been able to locate the other two 'rebel' windows (Command and Document View), get ther handles, size and position them accordingly at startup (they are actually made of 5 or 6 different windows all layered in parent-child and even sibling levels).
As video resolution and themes are closely related to font names and size, now I am challenged with setting these properties. While most of them are located in the Windows Registry and can be easily read and written, those of the 'rebels' are tucked away in the foxuser.dbf table as binary data (under Type PREFW and Id WINDOWCMD). I am not sure whether it could be possible to mess with that binary data and have the font changed programmatically, so I took a different approach and insisted with Windows API calls. To cut the story short, I managed to send a WM_SETFONT message to the Command window (I can see it through BINDEVENT), the font has been set to my desire (as the function GetTextFace reports) but I still see the old font displayed in the window even after calling UpdateWindow or sending WM_PAINT messages.
Please feel free to make any suggestion on this matter, thank you.
Dario
in an attempt to automate my VFP IDE start, so that I may find it neat and tidy at all times no matter the video resolution or Windows theme currently in use, I am trying to take some control over the Command window as it opens up in the process.
After dealing with the Program Manager, whose window is a child of the main VFP frame, I have successfully been able to locate the other two 'rebel' windows (Command and Document View), get ther handles, size and position them accordingly at startup (they are actually made of 5 or 6 different windows all layered in parent-child and even sibling levels).
As video resolution and themes are closely related to font names and size, now I am challenged with setting these properties. While most of them are located in the Windows Registry and can be easily read and written, those of the 'rebels' are tucked away in the foxuser.dbf table as binary data (under Type PREFW and Id WINDOWCMD). I am not sure whether it could be possible to mess with that binary data and have the font changed programmatically, so I took a different approach and insisted with Windows API calls. To cut the story short, I managed to send a WM_SETFONT message to the Command window (I can see it through BINDEVENT), the font has been set to my desire (as the function GetTextFace reports) but I still see the old font displayed in the window even after calling UpdateWindow or sending WM_PAINT messages.
Please feel free to make any suggestion on this matter, thank you.
Dario