Click here to Skip to main content
15,891,775 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Stopping user interaction from dialogs. How ? Pin
prasad_som26-Dec-06 2:05
prasad_som26-Dec-06 2:05 
QuestionRe: Stopping user interaction from dialogs. How ? Pin
Sakthiu26-Dec-06 2:16
Sakthiu26-Dec-06 2:16 
QuestionRe: Stopping user interaction from dialogs. How ? Pin
prasad_som26-Dec-06 2:25
prasad_som26-Dec-06 2:25 
QuestionHow to count items in list view control and select default value in combo box Pin
amitmistry_petlad 26-Dec-06 0:54
amitmistry_petlad 26-Dec-06 0:54 
AnswerRe: How to count items in list view control and select default value in combo box Pin
prasad_som26-Dec-06 1:45
prasad_som26-Dec-06 1:45 
GeneralRe: How to count items in list view control and select default value in combo box Pin
amitmistry_petlad 26-Dec-06 2:06
amitmistry_petlad 26-Dec-06 2:06 
AnswerRe: How to count items in list view control and select default value in combo box Pin
prasad_som26-Dec-06 2:16
prasad_som26-Dec-06 2:16 
GeneralRe: How to count items in list view control and select default value in combo box Pin
amitmistry_petlad 26-Dec-06 2:38
amitmistry_petlad 26-Dec-06 2:38 
still gives the zero value, after adding files in the listview
here is the code

case CBN_SELCHANGE :
int iCheck = (int)SendMessage((HWND)GetDlgItem(hDlg , IDC_COMBO1 ), CB_GETCURSEL, (WPARAM)0, (LPARAM)0);

if(iCheck !=0)
{
if(iCheck != 2)
{
uploadedFile = util.GetFile(NULL);
}
else
{
uploadedFile = util.BrowserDirectory();
if(uploadedFile != "")
uploadedFile += "\\";
}

if(uploadedFile != "")
{
//Check if the item is already added or not
HWND hwndListbox = GetDlgItem(hDlg,IDC_LIST4);
LRESULT iCount = SendMessage(hwndListbox,LVM_GETCOLUMN,0,0);
bool valid = true;
if(iCount > 0)
{
for(int i=0;i<iCount;i++)
{
WCHAR szInputFile[MAX_PATH];
SendMessage(hwndListbox,LB_GETTEXT,i,(LPARAM)szInputFile);
if(wcslen(szInputFile) > 0)
{
string sIn = util.ConvertWCHARToString(szInputFile);
if(sIn == uploadedFile)
{
valid = false;
MessageBox(hDlg,_T("This item is already added to the list."),_T("Encode"),MB_ICONINFORMATION);
break;
}
}
}

}




amit
AnswerRe: How to count items in list view control and select default value in combo box Pin
prasad_som26-Dec-06 2:45
prasad_som26-Dec-06 2:45 
GeneralRe: How to count items in list view control and select default value in combo box Pin
amitmistry_petlad 26-Dec-06 2:56
amitmistry_petlad 26-Dec-06 2:56 
AnswerRe: How to count items in list view control and select default value in combo box Pin
prasad_som26-Dec-06 3:02
prasad_som26-Dec-06 3:02 
GeneralRe: How to count items in list view control and select default value in combo box [modified] Pin
amitmistry_petlad 27-Dec-06 3:13
amitmistry_petlad 27-Dec-06 3:13 
AnswerRe: How to count items in list view control and select default value in combo box Pin
prasad_som27-Dec-06 17:21
prasad_som27-Dec-06 17:21 
Questionwhat to use for future project VC++ or VC++.Net ? Pin
Atul2326-Dec-06 0:41
Atul2326-Dec-06 0:41 
AnswerRe: what to use for future project VC++ or VC++.Net ? Pin
sunit526-Dec-06 1:08
sunit526-Dec-06 1:08 
AnswerRe: what to use for future project VC++ or VC++.Net ? Pin
prasad_som26-Dec-06 2:04
prasad_som26-Dec-06 2:04 
AnswerRe: what to use for future project VC++ or VC++.Net ? Pin
Hamid_RT26-Dec-06 7:46
Hamid_RT26-Dec-06 7:46 
Questionsmtp server authentication Pin
neha.agarwal2726-Dec-06 0:13
neha.agarwal2726-Dec-06 0:13 
AnswerRe: smtp server authentication Pin
sunit526-Dec-06 1:01
sunit526-Dec-06 1:01 
Questiondelete pointer Pin
samira forooghi26-Dec-06 0:06
samira forooghi26-Dec-06 0:06 
AnswerRe: delete pointer Pin
John R. Shaw26-Dec-06 0:36
John R. Shaw26-Dec-06 0:36 
GeneralRe: delete pointer Pin
ChandraRam26-Dec-06 1:14
ChandraRam26-Dec-06 1:14 
GeneralRe: delete pointer Pin
John R. Shaw26-Dec-06 1:29
John R. Shaw26-Dec-06 1:29 
GeneralRe: delete pointer Pin
ChandraRam26-Dec-06 1:31
ChandraRam26-Dec-06 1:31 
GeneralRe: delete pointer Pin
John R. Shaw26-Dec-06 1:52
John R. Shaw26-Dec-06 1:52 

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.