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

C#

 
QuestionReading & Modifying XML Data in C# Pin
GrgBalden27-Apr-10 6:53
GrgBalden27-Apr-10 6:53 
AnswerRe: Reading & Modifying XML Data in C# Pin
Dan Mos27-Apr-10 7:17
Dan Mos27-Apr-10 7:17 
GeneralRe: Reading & Modifying XML Data in C# Pin
GrgBalden27-Apr-10 23:33
GrgBalden27-Apr-10 23:33 
GeneralRe: Reading & Modifying XML Data in C# [modified] Pin
Dan Mos28-Apr-10 3:24
Dan Mos28-Apr-10 3:24 
GeneralRe: Reading & Modifying XML Data in C# Pin
GrgBalden28-Apr-10 4:43
GrgBalden28-Apr-10 4:43 
GeneralRe: Reading & Modifying XML Data in C# Pin
Dan Mos28-Apr-10 8:02
Dan Mos28-Apr-10 8:02 
GeneralRe: Reading & Modifying XML Data in C# Pin
GrgBalden28-Apr-10 10:44
GrgBalden28-Apr-10 10:44 
QuestionCheckbox on the ColumnHeader [modified] Pin
Natural_Demon27-Apr-10 4:55
Natural_Demon27-Apr-10 4:55 
i would like to achieve a checkbox on a ColumnHeader in a listview.
i have been trying for days.
i have achieved a checkbox on the right spot in the listview by virtual placing it on top.
<br />
[DllImport("user32")]<br />
        private static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);<br />
<br />
        protected override void OnHandleCreated(EventArgs e)<br />
        {<br />
            SetParent(_cCehckBox.Handle, Handle);<br />
            base.OnHandleCreated(e);<br />
        }<br />


but the visual style/effect of the header causes the checkbox to fall in the background if you hover the mouse of the header.

the Header class doesn't provide anu usefull stuff, atleast i don't see any usefull stuff.

i have bene reading alot about it and viewed many things regarding headers.

i have also been using ...
<br />
protected override void WndProc(ref Message message)<br />
        {<br />
         ....<br />
         }<br />

filtering on WM_NOTIFY for 'HDN_ITEMCHANGINGA', 'HDN_ITEMCHANGEDA', 'HDN_BEGINTRACKA', 'HDN_BEGINTRACKW'.
i used a piece of code from a project here on codeproject, virtually unchanged.
but i only get the windows handle, the other things are empty.
[StructLayout(LayoutKind.Sequential)]
private struct NMHDR
{
    public IntPtr hwndFrom;
    public int idFrom;
    public int code;
} //NMHDR


//OnMessageNeedsSending(message.ToString(), Color.Black);
    // pass messages on to the base control for processing

    base.WndProc(ref message);
    */
    const int WM_NOTIFY = 0x004E;
    const int HDN_FIRST = (0 - 300);
    const int HDN_BEGINTRACKA = (HDN_FIRST - 6);
    const int HDN_BEGINTRACKW = (HDN_FIRST - 26);
    bool callBase = true;

    switch (message.Msg)
    {
        case WM_NOTIFY:

            NMHDR nmhdr = (NMHDR)message.GetLParam(typeof(NMHDR));
            OnMessageNeedsSending("WM_NOTIFY " + message, Color.Black);
            OnMessageNeedsSending("code: " + nmhdr.code + ", hwndFrom: " + nmhdr.hwndFrom + ", idFrom: " + nmhdr.idFrom, Color.Black);
            switch (nmhdr.code)
            {
                case HDN_BEGINTRACKA:  //Process both ANSI and
                    OnMessageNeedsSending("HDN_BEGINTRACKA " + message, Color.Black);
                    break;
                case HDN_BEGINTRACKW:  //UNICODE versions of the message.
                    OnMessageNeedsSending("HDN_BEGINTRACKW " + message, Color.Black);
                    break;
            } //switch

            break;
    } //switch


    if (callBase)
    {
        // pass messages on to the base control for processing

        base.WndProc(ref message);
    } //if
}



http://www.codeguru.com/forum/showthread.php?t=352366[^]

http://www.codeguru.com/cpp/controls/listview/headercontrol/comments.php/c1057/?thread=12184[^]

A Much Easier to Use ListView[^]

is there is a why to add properties, like Controls 'xxx.Add(checkbox);?.
Bad = knowing 2 much
modified on Tuesday, April 27, 2010 11:04 AM

AnswerRe: Checkbox on the ColumnHeader [modified] Pin
Natural_Demon27-Apr-10 5:39
Natural_Demon27-Apr-10 5:39 
AnswerRe: Checkbox on the ColumnHeader Pin
Natural_Demon27-Apr-10 9:12
Natural_Demon27-Apr-10 9:12 
QuestionHow Secure are MDF DB Files? Pin
Caniac21727-Apr-10 2:21
Caniac21727-Apr-10 2:21 
AnswerRe: How Secure are MDF DB Files? Pin
Michel Godfroid27-Apr-10 3:35
Michel Godfroid27-Apr-10 3:35 
GeneralRe: How Secure are MDF DB Files? Pin
Caniac21727-Apr-10 4:23
Caniac21727-Apr-10 4:23 
QuestionMessage Removed Pin
27-Apr-10 2:17
Emmet_Brown27-Apr-10 2:17 
AnswerRe: form design / update clash Pin
Rajesh Anuhya27-Apr-10 2:21
professionalRajesh Anuhya27-Apr-10 2:21 
GeneralRe: form design / update clash Pin
Emmet_Brown27-Apr-10 3:51
Emmet_Brown27-Apr-10 3:51 
GeneralRe: form design / update clash Pin
AspDotNetDev27-Apr-10 18:14
protectorAspDotNetDev27-Apr-10 18:14 
JokeRe: form design / update clash Pin
Calla27-Apr-10 20:01
Calla27-Apr-10 20:01 
QuestionCopyFile Pin
toto_201027-Apr-10 1:48
toto_201027-Apr-10 1:48 
AnswerRe: CopyFile Pin
Rajesh Anuhya27-Apr-10 1:51
professionalRajesh Anuhya27-Apr-10 1:51 
AnswerRe: CopyFile Pin
Rajesh Anuhya27-Apr-10 1:59
professionalRajesh Anuhya27-Apr-10 1:59 
AnswerRe: CopyFile Pin
harold aptroot27-Apr-10 5:02
harold aptroot27-Apr-10 5:02 
GeneralRe: CopyFile Pin
toto_201027-Apr-10 7:11
toto_201027-Apr-10 7:11 
GeneralRe: CopyFile Pin
harold aptroot27-Apr-10 7:20
harold aptroot27-Apr-10 7:20 
QuestionRotate Text OpenGL Pin
Paul Harsent27-Apr-10 0:29
Paul Harsent27-Apr-10 0:29 

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.