Click here to Skip to main content
15,890,946 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to add application specific metada ta into wmv file Pin
Hemant kulkarni30-Oct-06 20:25
Hemant kulkarni30-Oct-06 20:25 
AnswerRe: How to add application specific metada ta into wmv file Pin
Mark Salsbery30-Oct-06 20:39
Mark Salsbery30-Oct-06 20:39 
GeneralRe: How to add application specific metada ta into wmv file Pin
Hemant kulkarni30-Oct-06 22:08
Hemant kulkarni30-Oct-06 22:08 
GeneralRe: How to add application specific metada ta into wmv file Pin
Mark Salsbery31-Oct-06 5:41
Mark Salsbery31-Oct-06 5:41 
GeneralRe: How to add application specific metada ta into wmv file Pin
Hemant kulkarni31-Oct-06 17:21
Hemant kulkarni31-Oct-06 17:21 
Questionerror PRJ0019: A tool returned an error code from "Register OPC Server" Pin
mpk197930-Oct-06 20:01
mpk197930-Oct-06 20:01 
QuestionHow to incept the Keyboard press in console app? Pin
jethao30-Oct-06 19:52
jethao30-Oct-06 19:52 
QuestionHit testing the NC area Pin
Waldermort30-Oct-06 19:39
Waldermort30-Oct-06 19:39 
I have been trying all night to get this working, but it just doesn't want to budge. I am overriding WM_NCPAINT to draw custom borders to the non-client area of my window. My new borders come from 8 bitmap images and may not straight lines. To paint them, I create 8 Regions (from transparent pixels in the images) and apply this to the clipping region of a DC retrieved from GetWindowDC(). The painting works exactly as I want. To handle the WM_NCHITTEST, I need to call PtInRegion() to check if the cursor is over a border, the problem is I am unable to correctly map the POINT retrieved from the lParam of WM_NCHITTEST to give an accurate result.

The following gives the correct value for the top and left borders, but the right and bottom values are within the client area. Infact they are offset from the 'real' border by 2 times the width of the new width I gave in the WM_NCCALCSIZE handler.
case WM_NCHITTEST:
    pt.x = LOWORD(lParam);
    pt.y = HIWORD(lParam);
    RECT rc;
    GetWindowRect(hWnd,&rc);
    pt.x -= rc.left;
    pt.y -= rc.top;
return HitTest(pt);

If in WM_NCCALCSIZE I set the borders to 0 width, the above works, but this defeats the object of painting borders in the non client area rather than the client area.

Could somebody please help me out with this?
AnswerRe: Hit testing the NC area Pin
Mark Salsbery30-Oct-06 20:21
Mark Salsbery30-Oct-06 20:21 
GeneralRe: Hit testing the NC area Pin
Waldermort30-Oct-06 20:36
Waldermort30-Oct-06 20:36 
GeneralRe: Hit testing the NC area Pin
Mark Salsbery30-Oct-06 20:43
Mark Salsbery30-Oct-06 20:43 
GeneralRe: Hit testing the NC area Pin
Waldermort30-Oct-06 20:54
Waldermort30-Oct-06 20:54 
GeneralRe: Hit testing the NC area Pin
Mark Salsbery31-Oct-06 4:40
Mark Salsbery31-Oct-06 4:40 
QuestionHow to use ActiveX Control in MFC Extended DLL with CView/CFormView Pin
ZESON30-Oct-06 19:29
ZESON30-Oct-06 19:29 
QuestionOne Question ?.. Help me Pin
Sakthiu30-Oct-06 19:12
Sakthiu30-Oct-06 19:12 
QuestionC++ - Reading from Console without Echo. Pin
Jijo.Raj30-Oct-06 19:05
Jijo.Raj30-Oct-06 19:05 
QuestionRe: C++ - Reading from Console without Echo. Pin
David Crow31-Oct-06 3:20
David Crow31-Oct-06 3:20 
AnswerRe: C++ - Reading from Console without Echo. Pin
Stephen Hewitt31-Oct-06 11:48
Stephen Hewitt31-Oct-06 11:48 
GeneralRe: C++ - Reading from Console without Echo. Pin
David Crow1-Nov-06 2:50
David Crow1-Nov-06 2:50 
QuestionWNetAddConnection Pin
rajthalluri30-Oct-06 19:03
rajthalluri30-Oct-06 19:03 
AnswerRe: WNetAddConnection Pin
Mila02530-Oct-06 20:18
Mila02530-Oct-06 20:18 
QuestionCButtons on WebBrowser control Pin
shibumong30-Oct-06 18:32
shibumong30-Oct-06 18:32 
AnswerRe: CButtons on WebBrowser control Pin
Stephen Hewitt30-Oct-06 19:03
Stephen Hewitt30-Oct-06 19:03 
Question, Pin
shibumong30-Oct-06 18:30
shibumong30-Oct-06 18:30 
AnswerRe: , Pin
_AnsHUMAN_ 30-Oct-06 18:35
_AnsHUMAN_ 30-Oct-06 18:35 

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.