473,379 Members | 1,539 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

list boxes

ian
hello all
im currently learning windows programming
im having trouble adding text to a combo list box

im using the following with visual studio

HWND hwndList = GetDlgItem(hWnd, IDC_LIST);
SendMessage(hwndList,CB_ADDSTRING,100,(LPARAM)(LPC STR)"Pencil");
SendMessage(hwndList,CB_SETCURSEL,0,0);

can anyone tell me what im doing wrong
cheers
Jul 19 '05 #1
3 1963
"ian" <ia*@ianshome.freeserve.co.uk> wrote in news:bn6nbu$ru3$1
@newsg4.svr.pol.co.uk:
hello all
im currently learning windows programming
im having trouble adding text to a combo list box

im using the following with visual studio

HWND hwndList = GetDlgItem(hWnd, IDC_LIST);
SendMessage(hwndList,CB_ADDSTRING,100,(LPARAM)(LPC STR)"Pencil");
SendMessage(hwndList,CB_SETCURSEL,0,0);

can anyone tell me what im doing wrong


Well... you're asking in the wrong place. comp.lang.c++ is for discussing
the Standard C++ language, which has no concept of Windows or combo boxes.
You'd be better off asking in a Microsoft newsgrop dedicated to Win32 API
programming.
Jul 19 '05 #2
"ian" <ia*@ianshome.freeserve.co.uk> wrote in message
news:bn**********@newsg4.svr.pol.co.uk...
hello all
im currently learning windows programming
im having trouble adding text to a combo list box

im using the following with visual studio

HWND hwndList = GetDlgItem(hWnd, IDC_LIST);
SendMessage(hwndList,CB_ADDSTRING,100,(LPARAM)(LPC STR)"Pencil");
SendMessage(hwndList,CB_SETCURSEL,0,0);

can anyone tell me what im doing wrong
cheers


Answers available at newsgroup:

comp.os.ms-windows.programmer.win32

and/or

microsoft.public.win32.programmer.ui

Purpose of newsgroup comp.lang.c++ :

http://www.slack.net/~shiva/welcome.txt

-Mike
Jul 19 '05 #3
"ian" <ia*@ianshome.freeserve.co.uk> wrote...
hello all
im currently learning windows programming
im having trouble adding text to a combo list box
[...]
can anyone tell me what im doing wrong


Yes. You're posting to a wrong newsgroup. This one is about
C++ language, you need comp.os.ms-windows.programmer.

Victor
Jul 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dwayne Gaddy | last post by:
Hey all, I have a windows form with a list boxes. I have data bound the list boxes with data from my sql database. I want to use drag and drop to allow users to choose different options from the...
5
by: chris vettese | last post by:
I have a table called table1 that has a one to many relationship to table2. What I would like to do is have a form with two list boxes on it. The first list box will have a field from all of the...
8
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and...
5
by: Kay | last post by:
Hello, I have two list boxes on my form, one initially displays with items and the other displays blank, by clicking a button, it is possible to move items from one box to another and vice a...
2
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will...
5
by: Vigneshwar Pilli via DotNetMonster.com | last post by:
string connectionString1 = "server=(local); user=sa;password=sa; database=sonic"; System.Data.SqlClient.SqlConnection dbConnection1 = new System.Data.SqlClient.SqlConnection(connectionString1);...
7
by: ljungers | last post by:
Have Form-1 with 3 text boxes and 1 command button. With any of the 3 boxes filled out and button is clicked, a Macro is performed that Opens a Query that has a WHERE clause that uses the 3 test...
12
by: ljungers | last post by:
I'm on the home streach of my project and found that my "Reset for New Search" command button not working as desired. What should happen is that when the button is clicked a Event Procedure is run....
4
Rabbit
by: Rabbit | last post by:
Cascading Combo/List Boxes This tutorial is to guide you in the creation of Cascading combo/list boxes. That is when you have multiple combo/list boxes where the selection of an option in one...
2
by: hollinshead | last post by:
hi there, i have been having this issue for quite some time now and i cant seem to get my head around it. I am trying to create a database for candidates CV's and covering letters. basically the data...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.