Results 1 to 13 of 13
  1. #1
    hacktry3169's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    3

    How to convert listbox1 items to textbox1.text ?

    Hi, I have some problems and I think the mpgh.net can solved this


    in the c++ dll I add form and when I inject dll my form is coming, it's not problem. I add the form listbox,textbox and button.

    I want to when I press button1, listBox1->Items(2) in the textbox1 ? How can I do it ? Please help me

    (I want to when I click button1 listBox1->Items(2) convert to textbox1.text )

  2. #2
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,808
    My Mood
    Twisted
    MFC or Win32 API?
    Last edited by Biesi; 04-14-2014 at 08:48 AM.

  3. #3
    hacktry3169's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    3
    Quote Originally Posted by Biesi View Post
    MFC or Win32 API?
    win32 - DLL - Empty Project.

  4. #4
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,808
    My Mood
    Twisted

  5. #5
    hacktry3169's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    3
    I can't make, please send the code I can't understand :/(

  6. #6
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,808
    My Mood
    Twisted
    Code:
    char chBuffer[256];
    SendDlgItemMessage(hwnd, ListBoxId, LB_GETTEXT, 2, (LPARAM)(LPSTR)chBuffer);

  7. #7
    SellingeBooks1337's Avatar
    Join Date
    Apr 2014
    Gender
    male
    Posts
    14
    Reputation
    10
    Thanks
    1
    Thanks, could be in help

  8. #8
    Babart's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    185
    Reputation
    10
    Thanks
    1,163
    My Mood
    Cheerful
    listBox1->Items(2).ToString() can work, nop ?

  9. #9
    hacktry3169's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    3
    Quote Originally Posted by Biesi View Post
    Code:
    char chBuffer[256];
    SendDlgItemMessage(hwnd, ListBoxId, LB_GETTEXT, 2, (LPARAM)(LPSTR)chBuffer);
    char chBuffer[256];
    SendDlgItemMessage(hwnd, ListBoxId, LB_GETTEXT, 2, (LPARAM)(LPSTR)chBuffer);

    Dont work

  10. #10
    hacktry3169's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    3
    Quote Originally Posted by Babart View Post
    listBox1->Items(2).ToString() can work, nop ?
    Not Work
    I have this error for listBox1: IntelliSense: call of an object of a handle type without appropriate operator() or conversion functions to pointer-to-function type

    Some one help me please how can I listbox1 items(2) value to textbox1.text ? I dont want textbox1->Text to add list box, I just want how can I listbox1 items value to textbox, for example listbox1 items2 = hello, when I click button or form load my textbox1->text = hello

  11. #11
    Babart's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    185
    Reputation
    10
    Thanks
    1,163
    My Mood
    Cheerful
    @hacktry3169
    Okay, you can try this one
    Code:
    string text = listBox1->GetItemText(listBox1->Items(2));
    You can also try findstring methode (MSDN Source)
    Last edited by Babart; 04-21-2014 at 05:13 AM.

  12. #12
    hacktry3169's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    3
    Quote Originally Posted by Babart View Post
    @hacktry3169
    Okay, you can try this one
    Code:
    string text = listBox1->GetItemText(listBox1->Items(2));
    You can also try findstring methode (MSDN Source)
    I try this, dont working again
    IntelliSense: call of an object of a handle type without appropriate operator() or conversion functions to pointer-to-function type

  13. #13
    hacktry3169's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    3
    Some body can help me ? Please I need this code

Similar Threads

  1. How to convert FRAPS?
    By TheDesolate in forum Combat Arms Glitches
    Replies: 17
    Last Post: 07-04-2009, 10:19 PM
  2. How To: Convert Address to long
    By stonie in forum Visual Basic Programming
    Replies: 4
    Last Post: 12-18-2008, 12:41 PM
  3. How look's your item shop
    By punkbuster!123 in forum WarRock - International Hacks
    Replies: 9
    Last Post: 09-17-2008, 10:18 AM
  4. Can someone teach me how to convert a bypass into a adress
    By frono15 in forum Programming Tutorial Requests
    Replies: 2
    Last Post: 05-18-2008, 11:38 AM
  5. Share :how to convert dvd and video to zune
    By goodfriend in forum Entertainment
    Replies: 3
    Last Post: 02-20-2008, 07:06 AM