flat assembler
Message board for the users of flat assembler.

Index > Windows > Quetannon combo box

Author
Thread Post new topic Reply to topic
arman.k.dev



Joined: 19 May 2016
Posts: 3
arman.k.dev
Hi, I am a beginner ASM programmer and I was trying to learn more about the WINAPI reading through the examples. I have been going through the source code of Quetannon and there is a particular invocation that has puzzled me. It appeared twice in the code, in lines 146 and 203.

Code:
invoke  SendDlgItemMessage,[hwnddlg],ID_HOSTNAME,CB_ADDSTRING,0,buffer
    

In the context of line 146, this invocation is being done just after setting the resolved IP address into the ipaddress control. But I don't get why this is needed at all. According to the documentation, the CB_ADDSTRING message adds a string to the list box of a combo box. But in our case we don't even have a combo box where the hostname will be added!
Similarly in line 203, we are making the same invocation just after retrieving the text from ID_COMMAND control
Code:
invoke  SendDlgItemMessage,[hwnddlg], ID_COMMAND, CB_ADDSTRING, 0, buffer
    

Again, I fail to see what it does here. Removal of both the lines doesn't affect the program at all either. What am I missing here?
Post 16 Jul 2016, 20:07
View user's profile Send private message Reply with quote
arman.k.dev



Joined: 19 May 2016
Posts: 3
arman.k.dev
Okay did I just post this in the wrong section? Maybe this should have been in the Windows section, I don't know.
Post 16 Jul 2016, 20:11
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1409
Location: Toronto, Canada
AsmGuru62
Indeed, it is strange.
This dialog does not have even one combo box.
Maybe Tomasz knows - he is marked as an author of this code.
Post 16 Jul 2016, 21:58
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17281
Location: In your JS exploiting you and your system
revolution
Moved to Windows forum.
Post 16 Jul 2016, 22:09
View user's profile Send private message Visit poster's website Reply with quote
Trinitek



Joined: 06 Nov 2011
Posts: 257
Trinitek
Perhaps the combobox was removed at one point and those lines were forgotten about and left behind.
Post 16 Jul 2016, 22:14
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7725
Location: Kraków, Poland
Tomasz Grysztar
Yes, this program used to have comboboxes with history (like fasmw's search window, for example). Apparently I forgot to remove these lines when simplifying the dialog.
Post 17 Jul 2016, 08:25
View user's profile Send private message Visit poster's website Reply with quote
arman.k.dev



Joined: 19 May 2016
Posts: 3
arman.k.dev
Tomasz Grysztar wrote:
Yes, this program used to have comboboxes with history (like fasmw's search window, for example). Apparently I forgot to remove these lines when simplifying the dialog.

Well that makes sense! Thanks.
Post 17 Jul 2016, 16:41
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.