Click here to Skip to main content
15,914,071 members
Home / Discussions / C#
   

C#

 
GeneralRe: Creating Dataset Pin
Heath Stewart13-May-04 11:07
protectorHeath Stewart13-May-04 11:07 
GeneralRe: Creating Dataset Pin
MrJJKoolJ13-May-04 11:12
MrJJKoolJ13-May-04 11:12 
GeneralRe: Creating Dataset Pin
Heath Stewart13-May-04 11:21
protectorHeath Stewart13-May-04 11:21 
GeneralSort TreeView items by different logic Pin
Gian13-May-04 5:13
Gian13-May-04 5:13 
GeneralRe: Sort TreeView items by different logic Pin
Heath Stewart13-May-04 8:56
protectorHeath Stewart13-May-04 8:56 
GeneralRe: Sort TreeView items by different logic Pin
Gian16-May-04 22:02
Gian16-May-04 22:02 
GeneralRe: Sort TreeView items by different logic Pin
Heath Stewart17-May-04 3:20
protectorHeath Stewart17-May-04 3:20 
GeneralRe: Sort TreeView items by different logic Pin
Gian17-May-04 4:58
Gian17-May-04 4:58 
i've tried in the 2 ways, with ref TVITEM and Marshal but it doesnt work. the first two parameters are always 0 or undefined (using ref TVITEM).
i've declared the structure
<br />
		[StructLayout(LayoutKind.Sequential)]<br />
public struct TVITEM<br />
{<br />
	public IntPtr mask;<br />
	public IntPtr hItem;<br />
	public IntPtr state;<br />
	public IntPtr stateMask;<br />
	public IntPtr pszText;<br />
	public IntPtr cchTextMax;<br />
	public IntPtr iImage;<br />
	public IntPtr iSelectedImage;<br />
	public IntPtr cChildren;<br />
	public IntPtr lParam;<br />
} <br />
<br />


my second test was with

<br />
public IntPtr Compare(IntPtr node1,IntPtr node2, IntPtr extraData)<br />
{<br />
TVITEM item1 = new TVITEM(); Marshal.PtrToStructure(node1, item1);<br />
TVITEM item2 = new TVITEM(); Marshal.PtrToStructure(node2, item2);<br />
TreeNode node_1 = TreeNode.FromHandle(this, item1.hItem);<br />
TreeNode node_2 = TreeNode.FromHandle(this, item2.hItem);<br />


but always the first 2 parameters are undefined. I've checked the value of extraData and it's correct, the same value i pass when call the sorting. I cant understand why the handle values of the 2 nodes are not passed to the callback function. However forcing the sorting of the two nodes, the tree updates correcly. But there's no way of testing the values of the 2 nodes.
I've created a little test application with only these things, and the behaviour is indentical
GeneralRe: Sort TreeView items by different logic Pin
Heath Stewart17-May-04 5:13
protectorHeath Stewart17-May-04 5:13 
GeneralRe: Sort TreeView items by different logic Pin
Gian17-May-04 5:35
Gian17-May-04 5:35 
GeneralRe: Sort TreeView items by different logic Pin
Heath Stewart17-May-04 6:17
protectorHeath Stewart17-May-04 6:17 
GeneralRe: Sort TreeView items by different logic Pin
Gian17-May-04 23:16
Gian17-May-04 23:16 
GeneralRe: Sort TreeView items by different logic Pin
Heath Stewart18-May-04 3:37
protectorHeath Stewart18-May-04 3:37 
GeneralRe: Sort TreeView items by different logic Pin
Gian19-May-04 5:25
Gian19-May-04 5:25 
Generalhelp with winuser.h Pin
HappyPaws13-May-04 4:28
HappyPaws13-May-04 4:28 
GeneralRe: help with winuser.h Pin
Judah Gabriel Himango13-May-04 6:36
sponsorJudah Gabriel Himango13-May-04 6:36 
GeneralRe: help with winuser.h Pin
Heath Stewart13-May-04 8:37
protectorHeath Stewart13-May-04 8:37 
GeneralRe: help with winuser.h Pin
Heath Stewart13-May-04 8:37
protectorHeath Stewart13-May-04 8:37 
GeneralRe: help with winuser.h Pin
HappyPaws14-May-04 1:37
HappyPaws14-May-04 1:37 
Generalregd DataGrids Pin
karteek13-May-04 4:06
karteek13-May-04 4:06 
Generalregd dialogs Pin
karteek13-May-04 3:41
karteek13-May-04 3:41 
GeneralRe: regd dialogs Pin
Heath Stewart13-May-04 3:47
protectorHeath Stewart13-May-04 3:47 
GeneralRe: regd dialogs Pin
karteek13-May-04 4:07
karteek13-May-04 4:07 
GeneralRe: regd dialogs Pin
Heath Stewart13-May-04 4:51
protectorHeath Stewart13-May-04 4:51 
GeneralCancel more than a click Pin
sreejith ss nair13-May-04 2:55
sreejith ss nair13-May-04 2:55 

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.