From: Steve Russell on
I am getting acquainted with handling some WM_SYSCOMMAND messages and would
appreciate it if someone would tell me how to handle the restore message
upon double-clicking the title bar. How does that differ from clicking the
Restore box?

void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
{
if(nID == SC_RESTORE)
::Beep(500,100);

CFrameWnd::OnSysCommand(nID, lParam);
}


From: Jonathan Wood on
My guess is that double clicking the title bar would produce the same
message.

Looks like you implemented a handler. Are you saying it was not called when
the title bar was double clicked?

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

"Steve Russell" <srussell(a)removethisinnernet.net> wrote in message
news:O9QRW7c1GHA.2516(a)TK2MSFTNGP06.phx.gbl...
>I am getting acquainted with handling some WM_SYSCOMMAND messages and would
>appreciate it if someone would tell me how to handle the restore message
>upon double-clicking the title bar. How does that differ from clicking the
>Restore box?
>
> void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
> {
> if(nID == SC_RESTORE)
> ::Beep(500,100);
>
> CFrameWnd::OnSysCommand(nID, lParam);
> }
>
>


From: Tom Serface on
My guess is that it sends a SC_RESTORE if the windows is maximized and an
SC_MAXIMIZE if it is not maximized.

Tom

"Steve Russell" <srussell(a)removethisinnernet.net> wrote in message
news:O9QRW7c1GHA.2516(a)TK2MSFTNGP06.phx.gbl...
>I am getting acquainted with handling some WM_SYSCOMMAND messages and would
>appreciate it if someone would tell me how to handle the restore message
>upon double-clicking the title bar. How does that differ from clicking the
>Restore box?
>
> void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
> {
> if(nID == SC_RESTORE)
> ::Beep(500,100);
>
> CFrameWnd::OnSysCommand(nID, lParam);
> }
>
>


From: Steve Russell on
I can say this: In the handler, I added a TRACE of nID. The Restore box
delivers 61728 (F120), which is SC_RESTORE, of course. But doubleclicking
on the title bar gives me 61730 (F122), which I do not recognize. When the
window is in restored size and I maximize it, the first click on the title
bar gives me 61458 (F012); . the second reads 61490 (F032).

However, Spy++ displays the WM_SYSCOMMAND message with SC_RESTORE, when I
doubleclick the title bar.
--------------
"Jonathan Wood" <jwood(a)softcircuits.com> wrote in message
news:%233GDxPd1GHA.4228(a)TK2MSFTNGP06.phx.gbl...
> My guess is that double clicking the title bar would produce the same
> message.
>
> Looks like you implemented a handler. Are you saying it was not called
> when the title bar was double clicked?
>
> --
> Jonathan Wood
> SoftCircuits Programming
> http://www.softcircuits.com
>
> "Steve Russell" <srussell(a)removethisinnernet.net> wrote in message
> news:O9QRW7c1GHA.2516(a)TK2MSFTNGP06.phx.gbl...
>>I am getting acquainted with handling some WM_SYSCOMMAND messages and
>>would appreciate it if someone would tell me how to handle the restore
>>message upon double-clicking the title bar. How does that differ from
>>clicking the Restore box?
>>
>> void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
>> {
>> if(nID == SC_RESTORE)
>> ::Beep(500,100);
>>
>> CFrameWnd::OnSysCommand(nID, lParam);
>> }
>>
>>
>
>


From: Steve Russell on
Combining 0xFFF0 with nID has straightened everything out.

if( (nID & 0xFFF0) == SC_RESTORE)
---------------

"Steve Russell" <srussell(a)removethisinnernet.net> wrote in message
news:uikufLf1GHA.4108(a)TK2MSFTNGP04.phx.gbl...
>I can say this: In the handler, I added a TRACE of nID. The Restore box
>delivers 61728 (F120), which is SC_RESTORE, of course. But doubleclicking
>on the title bar gives me 61730 (F122), which I do not recognize. When the
>window is in restored size and I maximize it, the first click on the title
>bar gives me 61458 (F012); . the second reads 61490 (F032).
>
> However, Spy++ displays the WM_SYSCOMMAND message with SC_RESTORE, when I
> doubleclick the title bar.
> --------------
> "Jonathan Wood" <jwood(a)softcircuits.com> wrote in message
> news:%233GDxPd1GHA.4228(a)TK2MSFTNGP06.phx.gbl...
>> My guess is that double clicking the title bar would produce the same
>> message.
>>
>> Looks like you implemented a handler. Are you saying it was not called
>> when the title bar was double clicked?
>>
>> --
>> Jonathan Wood
>> SoftCircuits Programming
>> http://www.softcircuits.com
>>
>> "Steve Russell" <srussell(a)removethisinnernet.net> wrote in message
>> news:O9QRW7c1GHA.2516(a)TK2MSFTNGP06.phx.gbl...
>>>I am getting acquainted with handling some WM_SYSCOMMAND messages and
>>>would appreciate it if someone would tell me how to handle the restore
>>>message upon double-clicking the title bar. How does that differ from
>>>clicking the Restore box?
>>>
>>> void CMainFrame::OnSysCommand(UINT nID, LPARAM lParam)
>>> {
>>> if(nID == SC_RESTORE)
>>> ::Beep(500,100);
>>>
>>> CFrameWnd::OnSysCommand(nID, lParam);
>>> }
>>>
>>>
>>
>>
>
>


 |  Next  |  Last
Pages: 1 2
Prev: Adobe 7.0 crash
Next: Assert Error