Click here to Skip to main content
15,913,487 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: New to DLL Pin
Chandrasekharan P12-Feb-08 19:38
Chandrasekharan P12-Feb-08 19:38 
GeneralCreating stellar GUI Pin
act_x12-Feb-08 18:21
act_x12-Feb-08 18:21 
GeneralRe: Creating stellar GUI Pin
Iain Clarke, Warrior Programmer13-Feb-08 0:44
Iain Clarke, Warrior Programmer13-Feb-08 0:44 
QuestionHow Can repaint the views? [modified] Pin
Le@rner12-Feb-08 17:25
Le@rner12-Feb-08 17:25 
AnswerRe: How Can repaint the views? Pin
Swathee12-Feb-08 20:14
Swathee12-Feb-08 20:14 
GeneralRe: How Can repaint the views? Pin
Le@rner12-Feb-08 22:02
Le@rner12-Feb-08 22:02 
QuestionGET_X_LPARAM gives incorrect results inside WM_NOTIFY Pin
flip12-Feb-08 15:50
flip12-Feb-08 15:50 
GeneralRe: GET_X_LPARAM gives incorrect results inside WM_NOTIFY Pin
Iain Clarke, Warrior Programmer13-Feb-08 4:15
Iain Clarke, Warrior Programmer13-Feb-08 4:15 
From the docs...

WM_NOTIFY


The WM_NOTIFY message is sent by a common control to its parent window when an event has occurred or the control requires some information. 

WM_NOTIFY 
    idCtrl = (int) wParam; 
    pnmh = (LPNMHDR) lParam; 


So, yes, LPARAM needs to be cast to a NMHDR *. You then look at pNMHDR->code to look at what kind of notify it is, and then look up the docs for that one.

If you're adding a right click handler to a tree view, then you want to handle the NM_RCLICK code. That *just* sends the NMHDR structure, which has no position information embedded in it.

In which case, GetCursorPos or GetMessagePos (GetMsgPos?) are your only ways to go.

Success,

Iain.

Iain Clarke appearing in spite of being begged not to by CPallini.

GeneralRe: GET_X_LPARAM gives incorrect results inside WM_NOTIFY Pin
flip13-Feb-08 12:28
flip13-Feb-08 12:28 
GeneralRe: GET_X_LPARAM gives incorrect results inside WM_NOTIFY Pin
Iain Clarke, Warrior Programmer14-Feb-08 0:19
Iain Clarke, Warrior Programmer14-Feb-08 0:19 
GeneralRe: GET_X_LPARAM gives incorrect results inside WM_NOTIFY Pin
flip14-Feb-08 16:18
flip14-Feb-08 16:18 
GeneralRe: GET_X_LPARAM gives incorrect results inside WM_NOTIFY Pin
Iain Clarke, Warrior Programmer14-Feb-08 22:22
Iain Clarke, Warrior Programmer14-Feb-08 22:22 
QuestionHow go get the coordinate of a control object Pin
Kennis12-Feb-08 15:46
Kennis12-Feb-08 15:46 
GeneralRe: How go get the coordinate of a control object Pin
Stephen Hewitt12-Feb-08 16:24
Stephen Hewitt12-Feb-08 16:24 
QuestionNeed to share data between C++ DLL and C# Pin
Adlai12-Feb-08 15:21
Adlai12-Feb-08 15:21 
Question2. Questions about PowerDown and Hibernation - need help Pin
tibiz12-Feb-08 13:14
tibiz12-Feb-08 13:14 
GeneralRe: 2. Questions about PowerDown and Hibernation - need help Pin
Stephen Hewitt12-Feb-08 15:04
Stephen Hewitt12-Feb-08 15:04 
GeneralRe: 2. Questions about PowerDown and Hibernation - need help Pin
tibiz13-Feb-08 0:11
tibiz13-Feb-08 0:11 
GeneralRe: 2. Questions about PowerDown and Hibernation - need help Pin
Stephen Hewitt13-Feb-08 1:06
Stephen Hewitt13-Feb-08 1:06 
GeneralRe: 2. Questions about PowerDown and Hibernation - need help Pin
tibiz13-Feb-08 5:51
tibiz13-Feb-08 5:51 
GeneralProblems distributing release version Pin
Tom Paronis12-Feb-08 12:54
Tom Paronis12-Feb-08 12:54 
GeneralRe: Problems distributing release version Pin
Cedric Moonen12-Feb-08 20:29
Cedric Moonen12-Feb-08 20:29 
GeneralRe: Problems distributing release version Pin
Tom Paronis13-Feb-08 9:49
Tom Paronis13-Feb-08 9:49 
Generalint * -vs- Object * Pin
Areal Person12-Feb-08 11:44
Areal Person12-Feb-08 11:44 
GeneralRe: int * -vs- Object * Pin
Mark Salsbery12-Feb-08 12:34
Mark Salsbery12-Feb-08 12:34 

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.