Click here to Skip to main content
15,890,043 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhandling mouse event on a picture Pin
Joy_ee28-Oct-07 20:29
Joy_ee28-Oct-07 20:29 
QuestionRe: handling mouse event on a picture Pin
Nishad S28-Oct-07 20:36
Nishad S28-Oct-07 20:36 
AnswerRe: handling mouse event on a picture Pin
Hamid_RT28-Oct-07 20:43
Hamid_RT28-Oct-07 20:43 
QuestionDisable process termination Pin
hxhl9528-Oct-07 19:13
hxhl9528-Oct-07 19:13 
AnswerRe: Disable process termination Pin
Hamid_RT28-Oct-07 19:21
Hamid_RT28-Oct-07 19:21 
AnswerRe: Disable process termination Pin
Michael Dunn28-Oct-07 19:40
sitebuilderMichael Dunn28-Oct-07 19:40 
GeneralRe: Disable process termination Pin
Mark Salsbery29-Oct-07 5:38
Mark Salsbery29-Oct-07 5:38 
QuestionHow to insert data into ListBox(Something Different) Pin
ashishbhatt28-Oct-07 19:09
ashishbhatt28-Oct-07 19:09 
Hi All,

I am using Win32 Application. In that I have created resource as Dialog and also in this Dialog I have added onr ListBox control. Now I want to insert data in to this Dialog.

In this I have added one C++ class in which I am using like below to open Dialog.....


<br />
void CCurrentWnd::Open()<br />
{<br />
	DialogBoxParam(hAppInstance,MAKEINTRESOURCE(IDD_CURWND),NULL,(DLGPROC)CurrntWndDlgProc,(LONG)this);<br />
}<br />


As shown in above code my CurrentDlgProc is shown as below....




<br />
<br />
BOOL CCurrentWnd::CurrntWndDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)<br />
{<br />
	CCurrentWnd * _this = (CCurrentWnd *)GetWindowLong(hwnd,GWL_USERDATA);<br />
	switch(uMsg)<br />
	{<br />
<br />
	case WM_INITDIALOG:<br />
		{<br />
                      HWND m_list1;<br />
<br />
                      m_list1 = GetDlgItem(hwnd,IDC_WNDLIST);<br />
                                           <br />
                      //Now here I got the handle of the ListBox<br />
                      // Now How to insert data in <br />
                      //this ListBox from here within this class.<br />
                 }<br />
                            <br />
<br />
                 //Any code                          <br />
          }<br />
}<br />
                                         <br />


Here IDC_WNDLIST is the ID of the ListBox control.
Is there any method for ListBox control as in Tab control like TabCtrl_InsertItem().?

If you know any other alternative then plz reply me.

Thanks in Advance.


Ashish Bhatt

AnswerRe: How to insert data into ListBox(Something Different) Pin
Hamid_RT28-Oct-07 19:16
Hamid_RT28-Oct-07 19:16 
GeneralRe: How to insert data into ListBox(Something Different) Pin
ashishbhatt28-Oct-07 19:30
ashishbhatt28-Oct-07 19:30 
GeneralRe: How to insert data into ListBox(Something Different) Pin
ashishbhatt28-Oct-07 19:39
ashishbhatt28-Oct-07 19:39 
GeneralRe: How to insert data into ListBox(Something Different) Pin
ashishbhatt28-Oct-07 20:09
ashishbhatt28-Oct-07 20:09 
GeneralRe: How to insert data into ListBox(Something Different) Pin
Hamid_RT28-Oct-07 20:39
Hamid_RT28-Oct-07 20:39 
Questionprogress bar should run without any click event Pin
neha.agarwal2728-Oct-07 19:01
neha.agarwal2728-Oct-07 19:01 
AnswerRe: progress bar should run without any click event Pin
Nishad S28-Oct-07 20:32
Nishad S28-Oct-07 20:32 
QuestionNeed Help on memory allocation problem Pin
manish.patel28-Oct-07 18:56
manish.patel28-Oct-07 18:56 
AnswerRe: Need Help on memory allocation problem Pin
Paresh Chitte28-Oct-07 19:04
Paresh Chitte28-Oct-07 19:04 
GeneralRe: Need Help on memory allocation problem Pin
manish.patel28-Oct-07 19:12
manish.patel28-Oct-07 19:12 
GeneralRe: Need Help on memory allocation problem Pin
Michael Dunn28-Oct-07 19:43
sitebuilderMichael Dunn28-Oct-07 19:43 
GeneralRe: Need Help on memory allocation problem Pin
jhwurmbach29-Oct-07 0:01
jhwurmbach29-Oct-07 0:01 
AnswerRe: Need Help on memory allocation problem Pin
Neo Andreson29-Oct-07 22:41
Neo Andreson29-Oct-07 22:41 
Questionactivex Pin
saisp28-Oct-07 18:11
saisp28-Oct-07 18:11 
QuestionReplaceSel(…) does not work with DBCS Pin
John R. Shaw28-Oct-07 15:47
John R. Shaw28-Oct-07 15:47 
QuestionC++ Winsock Cli/Svr hostname/address Pin
managetao228-Oct-07 14:44
managetao228-Oct-07 14:44 
AnswerRe: C++ Winsock Cli/Svr hostname/address Pin
jhwurmbach28-Oct-07 23:42
jhwurmbach28-Oct-07 23:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.