Windows programming

Moderators: None (Apply to moderate this forum)
Number of threads: 3711
Number of posts: 9173

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
API Combo boxes... why won't a string be added? Posted by InFeStEd P. ArCh0n on 14 Dec 2000 at 9:24 PM
I need a C++ combo box example without the MFC because however I create the combobox it won't add the strings to it.<br>
<br>
Thanks<br>
-Mike<br>
{InFeStEd-ArCh0n}


Edit Report
Re: API Combo boxes... why won't a string be added? Posted by Sephiroth2 on 17 Dec 2000 at 2:56 PM
Here's an example for you.<br>
<br>
#include &lt;windows.h&gt;<br>
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE previnst,LPSTR cmdline,int cmdshow)<br>
{<br>
MSG msg;<br>
hwnd=CreateWindowEx(0,&quot;COMBOBOX&quot;,&quot;&quot;,WS_VISIBLE|WS_BORDER,0,0,200,200,0,0,hInstance,0);<br>
SendMessage(hwnd,CB_ADDSTRING,0,&quot;Blah&quot;);<br>
while(!GetMessage(&amp;msg,0,0,0)) {<br>
if(msg.message==WM_KEYDOWN) break;<br>
TranslateMessage(&amp;msg);<br>
DispatchMessage(&amp;msg);<br>
}<br>
}


Edit Report
Re: Re: API Combo boxes... why won't a string be added? Posted by InFeStEd P. ArCh0n on 17 Dec 2000 at 4:43 PM
Thanks and I figured out the problem. Your name is not original by the way.<br>
<br>
-Mike<br>
{InFeStEd-ArCh0n}





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.