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

C / C++ / MFC

 
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 
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 
Good tip re GetMessagePos - I will use it from now on.

Your were exactly right with regards to NM_RCLICK. I was using the incorrect handle.

Now it works with or without using the notify message in TrackPopupMenu. - Thanks.

Previously I was using spy++ and seeing the WM_COMMAND message but obviously that was getting eaten by the treectrl as that did not have its own message pump.

On another track with things that bug me about the w32 API (apart from all of it ) is the following.

Editing labels on trees using TVN_ENDLABELEDIT the following is necessary

to get the line length
allocate a string based on line length
set the first byte to the line length
pass resulting string to get the entire line which overwrites
the string with the actual desired data

<br />
HWND e = TreeView_GetEditControl(h);<br />
int len = SendMessage(e,EM_LINELENGTH,NULL,NULL);<br />
TCHAR *s = new TCHAR[len];<br />
*((LPWORD)s) = len;<br />
SendMessage(e,EM_GETLINE,NULL,(LPARAM)s);<br />


I suppose GetWindowText could be used but what a crazy API.

Regards,
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 
GeneralRe: int * -vs- Object * Pin
CPallini12-Feb-08 21:29
mveCPallini12-Feb-08 21:29 
GeneralRe: int * -vs- Object * Pin
Areal Person13-Feb-08 4:57
Areal Person13-Feb-08 4:57 
GeneralRe: int * -vs- Object * Pin
Mark Salsbery13-Feb-08 8:16
Mark Salsbery13-Feb-08 8:16 

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.