[ C WinApi ] Create an " information console" zone

Discussion in 'Mixed Languages' started by Pr3acher, Oct 22, 2012.

  1. Pr3acher

    Pr3acher MDL Member

    Aug 24, 2012
    143
    48
    10
    Hi all ,
    i just want to know how to create 'information console' zone ?
    Just like CODYQX4 has done in its M$ toolkit
    Is it just an edit control with text and bkg color ?
     
  2. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #2 CODYQX4, Oct 22, 2012
    Last edited: Apr 12, 2019
    .
     
  3. Pr3acher

    Pr3acher MDL Member

    Aug 24, 2012
    143
    48
    10
    ( C not C++ but quite the same...:animatedwink:)
    Ok thanks CODYQX4, i succeded but i still have a little prob with that sh*t Api:
    how do i write text in it without removing the previous text ?
     
  4. CODYQX4

    CODYQX4 MDL Developer

    Sep 4, 2009
    4,813
    45,775
    150
    #4 CODYQX4, Oct 22, 2012
    Last edited: Apr 12, 2019
    .
     
  5. Pr3acher

    Pr3acher MDL Member

    Aug 24, 2012
    143
    48
    10
    This is the WinApi (native windows APi). C# seems nice to handle :rolleyes:... Well i'll try to concat with strcat(), but i wonder if i could use a pointer to the end of the edit with SetFilePointer() ?
     
  6. Pr3acher

    Pr3acher MDL Member

    Aug 24, 2012
    143
    48
    10
    Thank you so much CODYQX4. I succeded with strcat() to concat. I post if it can helps someone one day:
    -you retrieve edit text in a buffer
    -concat your text with the one in the buffer
    -send buffer to edit

    Here is an example:

    SendMessage(inform,WM_GETTEXT,sizeof(informBuff),informBuff);
    strcat(informBuff,"\r\nThanks CODYQX4 ;)");
    SendMessage(inform,WM_SETTEXT,0,informBuff);

    It aint difficult but must to think about such a way to do it...;)