Click here to Skip to main content
15,887,083 members
Home / Discussions / C#
   

C#

 
Generalip address Pin
kendao29-Apr-04 15:37
kendao29-Apr-04 15:37 
GeneralRe: ip address Pin
Corinna John29-Apr-04 22:31
Corinna John29-Apr-04 22:31 
GeneralTo handle list view column width change Pin
machocr29-Apr-04 14:09
machocr29-Apr-04 14:09 
GeneralRe: To handle list view column width change Pin
Heath Stewart29-Apr-04 14:30
protectorHeath Stewart29-Apr-04 14:30 
GeneralRe: To handle list view column width change Pin
machocr29-Apr-04 14:51
machocr29-Apr-04 14:51 
GeneralRe: To handle list view column width change Pin
machocr29-Apr-04 15:08
machocr29-Apr-04 15:08 
GeneralRe: To handle list view column width change Pin
Heath Stewart30-Apr-04 3:23
protectorHeath Stewart30-Apr-04 3:23 
GeneralRe: To handle list view column width change Pin
machocr30-Apr-04 4:58
machocr30-Apr-04 4:58 
ok, thank you. I will try it more, but this - interop with windows messages is new for me and its difulcult to me understand how works with this a n use its constants at this moment
I think I need to modify the WndProc because is there where i found m.result and HDN_ITEMCHANGEDW. I think I need to use the same message WM_NOTIFY and hdr.code == HDN_ITEMCHANGEDA || hdr.code == HDN_ITEMCHANGEDW becouse your last tip.
I do this to try but it does nothing. The colums change the width.Confused | :confused:

protected override void WndProc(ref Message m)<br />
			{<br />
                                base.WndProc(ref m);<br />
				if (m.Msg == WM_NOTIFY)<br />
				{<br />
					NMHDR hdr = (NMHDR)Marshal.PtrToStructure(m.LParam, typeof(NMHDR));<br />
					if (hdr.hwndFrom == hWndHeader &&<br />
						(hdr.code == HDN_ITEMCHANGEDA || hdr.code == HDN_ITEMCHANGEDW))<br />
					{<br />
                                                       m.Result = new IntPtr(0);// I do this<br />
						<br />
                                                        NMHEADER header = (NMHEADER)<br />
							Marshal.PtrToStructure(m.LParam, typeof(NMHEADER));<br />
<br />
						int index = header.iItem;<br />
						if (index >= 0 && index < Columns.Count)<br />
						{<br />
							ColumnHeader col = Columns[index];<br />
							OnColumnHeaderChanged(new ColumnHeaderChangedEventArgs(col));<br />
						}<br />
					}<br />
				}<br />
			}



La realidad no es más que impulsos eléctricos del cerebro - Morpheus
GeneralRe: To handle list view column width change Pin
Heath Stewart30-Apr-04 5:18
protectorHeath Stewart30-Apr-04 5:18 
GeneralRe: To handle list view column width change Pin
machocr30-Apr-04 6:14
machocr30-Apr-04 6:14 
GeneralRe: To handle list view column width change Pin
Heath Stewart30-Apr-04 6:29
protectorHeath Stewart30-Apr-04 6:29 
GeneralRe: To handle list view column width change Pin
Heath Stewart30-Apr-04 5:39
protectorHeath Stewart30-Apr-04 5:39 
GeneralID3 algorithm Pin
Member 75113929-Apr-04 10:14
Member 75113929-Apr-04 10:14 
GeneralRe: ID3 algorithm Pin
Heath Stewart29-Apr-04 10:34
protectorHeath Stewart29-Apr-04 10:34 
GeneralRun time change Pin
boruk29-Apr-04 10:09
boruk29-Apr-04 10:09 
GeneralRe: Run time change Pin
Heath Stewart29-Apr-04 10:26
protectorHeath Stewart29-Apr-04 10:26 
QuestionHow to make the return key to click the OK button? Pin
Daniel Stagg29-Apr-04 8:50
Daniel Stagg29-Apr-04 8:50 
AnswerRe: How to make the return key to click the OK button? Pin
Dave Kreskowiak29-Apr-04 8:55
mveDave Kreskowiak29-Apr-04 8:55 
GeneralRe: How to make the return key to click the OK button? Pin
Heath Stewart29-Apr-04 9:24
protectorHeath Stewart29-Apr-04 9:24 
GeneralSocket Chat?! Pin
Morten Kristensen29-Apr-04 7:50
Morten Kristensen29-Apr-04 7:50 
GeneralRe: Socket Chat?! Pin
Heath Stewart29-Apr-04 8:36
protectorHeath Stewart29-Apr-04 8:36 
GeneralRe: Socket Chat?! Pin
Morten Kristensen30-Apr-04 4:08
Morten Kristensen30-Apr-04 4:08 
GeneralCreating an Access database at runtine Pin
bsargos29-Apr-04 7:11
bsargos29-Apr-04 7:11 
GeneralRe: Creating an Access database at runtine Pin
Heath Stewart29-Apr-04 8:33
protectorHeath Stewart29-Apr-04 8:33 
GeneralRe: Creating an Access database at runtine Pin
Dave Kreskowiak29-Apr-04 8:37
mveDave Kreskowiak29-Apr-04 8:37 

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.