Click here to Skip to main content
15,899,124 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: static_cast' : cannot convert from 'class CString' to 'const char *const ' Pin
CPallini20-Dec-06 0:41
mveCPallini20-Dec-06 0:41 
GeneralRe: static_cast' : cannot convert from 'class CString' to 'const char *const ' Pin
S Douglas20-Dec-06 0:51
professionalS Douglas20-Dec-06 0:51 
GeneralOK, I fixed it. Pin
CPallini20-Dec-06 0:59
mveCPallini20-Dec-06 0:59 
GeneralRe: OK, I fixed it. Pin
S Douglas20-Dec-06 1:02
professionalS Douglas20-Dec-06 1:02 
GeneralRe: static_cast' : cannot convert from 'class CString' to 'const char *const ' Pin
toxcct20-Dec-06 0:58
toxcct20-Dec-06 0:58 
GeneralRe: static_cast' : cannot convert from 'class CString' to 'const char *const ' Pin
CPallini20-Dec-06 1:06
mveCPallini20-Dec-06 1:06 
QuestionRe: static_cast' : cannot convert from 'class CString' to 'const char *const ' Pin
David Crow20-Dec-06 2:32
David Crow20-Dec-06 2:32 
QuestionDeleting an item from list box using API Pin
Suresh H19-Dec-06 20:46
Suresh H19-Dec-06 20:46 
Hello all,

I have list box IDC_FILE_LIST and a add and remove (IDC_REMOVE) button.

After adding some items in the list box, I want to remove an item which is selected by the user on clicking on remove button.

For that I have used this code and its not working item selected by the user is not getting deleted can please tell me what is the error in the below code.

BOOL CALLBACK DlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
switch(Message)
{

case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_REMOVE:
{

HWND hList = GetDlgItem(hwnd, IDC_FILE_LIST);
int count = SendMessage(hList, LB_GETCOUNT, 0, 0);
SendMessage(hwnd,(UINT) LB_DELETESTRING,count,lParam);
}
break;

-----------
----------------------

Tanking you,
Suresh HC.
AnswerRe: Deleting an item from list box using API Pin
Mila02519-Dec-06 21:11
Mila02519-Dec-06 21:11 
GeneralRe: Deleting an item from list box using API Pin
Suresh H19-Dec-06 21:50
Suresh H19-Dec-06 21:50 
AnswerRe: Deleting an item from list box using API Pin
CPallini19-Dec-06 21:16
mveCPallini19-Dec-06 21:16 
GeneralRe: Deleting an item from list box using API Pin
Suresh H19-Dec-06 21:48
Suresh H19-Dec-06 21:48 
GeneralRe: Deleting an item from list box using API Pin
CPallini19-Dec-06 22:38
mveCPallini19-Dec-06 22:38 
GeneralRe: Deleting an item from list box using API Pin
Suresh H19-Dec-06 22:47
Suresh H19-Dec-06 22:47 
Questionunhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
With_problem19-Dec-06 20:04
With_problem19-Dec-06 20:04 
QuestionRe: unhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
prasad_som19-Dec-06 20:13
prasad_som19-Dec-06 20:13 
AnswerRe: unhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
With_problem19-Dec-06 20:16
With_problem19-Dec-06 20:16 
GeneralRe: unhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
prasad_som19-Dec-06 20:21
prasad_som19-Dec-06 20:21 
GeneralRe: unhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
With_problem19-Dec-06 23:33
With_problem19-Dec-06 23:33 
GeneralRe: unhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
S Douglas20-Dec-06 0:10
professionalS Douglas20-Dec-06 0:10 
AnswerRe: unhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
With_problem19-Dec-06 20:18
With_problem19-Dec-06 20:18 
AnswerRe: unhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
With_problem4-Jan-07 20:51
With_problem4-Jan-07 20:51 
GeneralRe: unhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
prasad_som4-Jan-07 21:22
prasad_som4-Jan-07 21:22 
AnswerRe: unhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
S Douglas19-Dec-06 21:32
professionalS Douglas19-Dec-06 21:32 
GeneralRe: unhandled exeption in a.exe(apiocx):0xc0000005 Access Violation Pin
With_problem19-Dec-06 23:37
With_problem19-Dec-06 23:37 

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.