Re: first go at some notepad changes

2003-07-28 Thread Jonathan Wilson
Troy Rollo wrote: On Mon, 28 Jul 2003 13:34, Jonathan Wilson wrote: From looking at microsoft examples, said examples send WM_SIZE to the status bar and let it reposition itself. Microsoft examples also tend to be riddled with gotos. I wouldn't use A Microsoft example did this as

Re: first go at some notepad changes

2003-07-28 Thread Dmitry Timoshkov
Jonathan Wilson [EMAIL PROTECTED] wrote: From looking at microsoft examples, said examples send WM_SIZE to the status bar and let it reposition itself. Microsoft examples also tend to be riddled with gotos. I wouldn't use A Microsoft example did this as justification for anything.

Re: first go at some notepad changes

2003-07-28 Thread Dmitry Timoshkov
Jonathan Wilson [EMAIL PROTECTED] wrote: A possibility that status bar will change its size behind your back justifies the use of GetWindowRect. ok, good point. I intend to change it to use GetWindowRect. But I am going to keep the WM_SIZE stuff in there unless someone can show a reason

Re: first go at some notepad changes

2003-07-27 Thread Dmitry Timoshkov
Jonathan Wilson [EMAIL PROTECTED] wrote: +VOID DIALOG_ShowStatusBar(VOID) +{ +RECT rcs; +RECT rc; +GetClientRect(Globals.hMainWnd, rc); +Globals.bStatusBarEnabled = !Globals.bStatusBarEnabled; +if (Globals.bStatusBarEnabled == TRUE) +{ +

Re: first go at some notepad changes

2003-07-27 Thread Jonathan Wilson
Do not send bogus WM_SIZE messages, use SetWindowPos instead. Remove iStatusBarHeight from globals and use IsWindowVisible and GetWindowRect when you need to take into account status bar size. From looking at microsoft examples, said examples send WM_SIZE to the status bar and let it reposition

Re: first go at some notepad changes

2003-07-27 Thread Dimitrie O. Paun
On July 27, 2003 08:16 am, Jonathan Wilson wrote: 25.modify WM_SIZE to correctly size the edit controll if the status bar is visble and to tell the status bar to resize itself if needed Shouldn't the status bar do this automatically when CCS_BOTTOM is specified? If our status bar needs some

Re: first go at some notepad changes

2003-07-27 Thread Dimitrie O. Paun
On July 27, 2003 11:34 pm, Jonathan Wilson wrote: And also, said examples store the status bar height for later use (presumably because calling IsWindowVisible and GetWindowRect multiple times is slower than saving it and reusing it later) I'd have to agree with Dmitry -- this looks like the

Re: first go at some notepad changes

2003-07-27 Thread Troy Rollo
On Mon, 28 Jul 2003 13:34, Jonathan Wilson wrote: From looking at microsoft examples, said examples send WM_SIZE to the status bar and let it reposition itself. Microsoft examples also tend to be riddled with gotos. I wouldn't use A Microsoft example did this as justification for anything.