Sign in to follow this  
Followers 0
devrandom

Set items of Combo Box

10 posts in this topic

What's wrong with this code? It doesn't add any item...

combo_prof = CreateWindow (
                            "COMBOBOX",
                            "",
                            WS_CHILD|
                            WS_VISIBLE|
                            CBS_DROPDOWNLIST|
                            CBS_HASSTRINGS,
                            10,
                            30,
                            320,
                            20,
                            window,
                            COMBO_PROF,
                            hInstance,
                            NULL
                        );

    SendMessage(combo_prof, CB_ADDSTRING, 0, "test");
    SendMessage(combo_prof, CB_ADDSTRING, 0, "test2");

:huh2:

Share this post


Link to post
Share on other sites



Are you attempting to take a c++ course in this forum?


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

You are not very nice. If you haven't the answer, then simply don't answer :huh2:

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You are not very nice. If you haven't the answer, then simply don't answer :huh2:

Perhaps it was a rhetorical question. Saying an MvP is not very nice, when he has posted 4195 responces in General Help and Support, carries no weight at all, not with anyone. I don't personally know the answer to your question, but nobody is going to help you if you react this way. Edited by czardas

Share this post


Link to post
Share on other sites

I'm just kidding, I put a ":huh2:" at the end of the post.

Share this post


Link to post
Share on other sites

Okay, I'll take your word for it. Such things can be easily misconstrued.

Share this post


Link to post
Share on other sites

Yeah, you're right. I'm sorry.

Share this post


Link to post
Share on other sites

But there was a serious element to GEOSoft's post... We don't put a cap on how many questions you can ask, but then again, we have never had someone start 5 or 6 threads in the space of a few days in the dev section. This section tends to discuss more complex AutoIt related matters, as there are loads of other forums dedicated to other languages. You will get more help from them.

In answer to the question:

Are you using unicode or ansi? That could be a problem. The msdn page for CB_ADDSTRING has a user submitted comment that might be of interest to you if you are using CB_ADDSTRING inside the WM_CREATE handler.

Share this post


Link to post
Share on other sites

I'm sending the message after the ComboBox is made, I think. I tried to add a button, and to add the strings after pressing that button but it didn't work.

Share this post


Link to post
Share on other sites

We don't put a cap on how many questions you can ask, but then again, we have never had someone start 5 or 6 threads in the space of a few days in the dev section. This section tends to discuss more complex AutoIt related matters, as there are loads of other forums dedicated to other languages. You will get more help from them.

This sums it up well. The threads you created in this forum are now locked. Asking a C++ question or two is fine but asking 4 in the span of a few minutes all of which demonstrate a clear lack of understanding of the Windows API is just too much. I suggest you try reading some documentation instead of looking for handouts on the forum.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0