Click here to Skip to main content
15,921,276 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Full Screen Pin
Waldermort7-Oct-06 15:05
Waldermort7-Oct-06 15:05 
GeneralRe: Full Screen Pin
Angbo20067-Oct-06 19:59
Angbo20067-Oct-06 19:59 
AnswerRe: Full Screen Pin
A_Fa7-Oct-06 20:00
A_Fa7-Oct-06 20:00 
QuestionAdding Pictures Pin
Grimes7-Oct-06 7:28
Grimes7-Oct-06 7:28 
AnswerRe: Adding Pictures Pin
Hamid_RT7-Oct-06 7:44
Hamid_RT7-Oct-06 7:44 
QuestionRe: Adding Pictures Pin
Grimes7-Oct-06 7:51
Grimes7-Oct-06 7:51 
AnswerRe: Adding Pictures Pin
Hamid_RT7-Oct-06 8:08
Hamid_RT7-Oct-06 8:08 
QuestionNon Client Messages Pin
Waldermort7-Oct-06 6:40
Waldermort7-Oct-06 6:40 
I have somewhat of a strange problem. I have designed a custom window in which the title bar is inside the window as opposed to on top. I process all the mouse messages to correctly handle clicks and whatnot within this new area. The problem relates to the WM_NCLBUTTONUP message. I added this to handle the button clicks, but it is never trapped, infact when a button is double clicked the WM_NCLBUTTONUP works. WM_NCLBUTTONDOWN works as it should, but to process button clicks this is in appropriate. Also the WM_NCLBUTTONDBLCLK works as should. Can anybody think of a reason why my WM_NCLBUTTONUP handler only responds to double clicks?
case WM_NCHITTEST:
    pt.x = LOWORD(lParam);
    pt.y = HIWORD(lParam);
    ScreenToClient(hWnd,&pt);
    SetRect(&rc,RECT_NONCLIENT);
    if ( PtInRect(&rc,pt) )
    {
        SetRect(&rc,RECT_CLOSE);
        if ( PtInRect(&rc,pt) )
            return HTCLOSE;

        return HTCAPTION;
    }
return HTNOWHERE;

case WM_NCLBUTTONUP:
    switch ( wParam )
    {
        case HTCLOSE:
            SendMessage(hWnd,WM_CLOSE,0,0);
        break; // returns 0
    }
    return DefWindowProc(hWnd, message, wParam, lParam);

AnswerRe: Non Client Messages Pin
Waldermort7-Oct-06 7:39
Waldermort7-Oct-06 7:39 
QuestionIs there a Memory Leak in my code? Pin
ccp9997-Oct-06 4:30
ccp9997-Oct-06 4:30 
AnswerRe: Is there a Memory Leak in my code? Pin
Waldermort7-Oct-06 6:47
Waldermort7-Oct-06 6:47 
GeneralRe: Is there a Memory Leak in my code? Pin
ccp9997-Oct-06 7:27
ccp9997-Oct-06 7:27 
GeneralRe: Is there a Memory Leak in my code? Pin
jhwurmbach9-Oct-06 3:03
jhwurmbach9-Oct-06 3:03 
GeneralRe: Is there a Memory Leak in my code? Pin
ccp9997-Oct-06 7:31
ccp9997-Oct-06 7:31 
GeneralRe: Is there a Memory Leak in my code? Pin
Waldermort7-Oct-06 7:34
Waldermort7-Oct-06 7:34 
GeneralRe: Is there a Memory Leak in my code? Pin
Abyss7-Oct-06 16:58
Abyss7-Oct-06 16:58 
QuestionHow do I say this... Pin
Learn2LikeIt7-Oct-06 4:08
Learn2LikeIt7-Oct-06 4:08 
AnswerRe: How do I say this... Pin
Hamid_RT7-Oct-06 4:19
Hamid_RT7-Oct-06 4:19 
AnswerRe: How do I say this... Pin
Oliver1237-Oct-06 4:26
Oliver1237-Oct-06 4:26 
AnswerRe: How do I say this... Pin
canerabali8-Oct-06 0:49
canerabali8-Oct-06 0:49 
QuestionDialog tab order Pin
Oliver1237-Oct-06 4:06
Oliver1237-Oct-06 4:06 
AnswerRe: Dialog tab order Pin
Michael Dunn7-Oct-06 7:59
sitebuilderMichael Dunn7-Oct-06 7:59 
AnswerRe: Dialog tab order Pin
Mark Salsbery7-Oct-06 8:15
Mark Salsbery7-Oct-06 8:15 
QuestionHow do I change icon and small icon for a windows class Pin
scody7-Oct-06 3:17
scody7-Oct-06 3:17 
AnswerRe: How do I change icon and small icon for a windows class Pin
Hamid_RT7-Oct-06 3:36
Hamid_RT7-Oct-06 3:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.