15,896,529 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by BiggiSmalls (Top 7 by date)
BiggiSmalls
28-Nov-14 13:41pm
View
Thank you very much :) i figured it out. Have a nice day
BiggiSmalls
28-Nov-14 7:02am
View
This is the code for dynamically generating user controls:
//Message is the class with properties and List<> listofMessages
foreach (Message item in Message.listofMessages)
{
UserCKocka novUc = new UserCKocka();
novUc.Margin = new Thickness(5);
novUc.Width = 180;
novUc.Height = 180;
//Increase tag number
stTaga++;
//Tag user control with the number stTaga
novUc.Tag = stTaga;
//Adding the datas and image for the newly created user control
Uri slikaPot = new Uri(item.Slika, UriKind.RelativeOrAbsolute);
BitmapImage slika = new BitmapImage(slikaPot);
novUc.slikaKocka.Source = slika;
//Textblock pošiljatelj
novUc.txtPosiljateljKocka.Text = item.Od;
novUc.txtZadevaKocka.Text = item.Zadeva;
novUc.SporociloKocka.Text = item.Vsebina;
wrap.Children.Add(novUc);
}
Thank you for helping me :)
Can you help me little more? How do check which user control is clicked by its Tag, in case if i wanted to delete it??
BiggiSmalls
4-Sep-14 7:26am
View
OK thanks a lot. I found this code on net, what do you think about this:
void CDialg::ShowImages(CString DirPath)
{
CWaitCursor waitCur;
//m_ctlListCtrl.SetRedraw(FALSE);
if(!DirPath.IsEmpty())
{
//m_ctlListCtrl.SetCurDirectory(DirPath);
//m_ctlListCtrl.ClearImageFileArray();
//jpg,bmp,png,tiff,jpeg,gif
CFileFind find;
CString strFile;
if(DirPath.Right(1) != _T("\\"))
strFile = DirPath + _T("\\*.*");
else
strFile = DirPath + _T("*.*");
UINT nCountImages=0;
BOOL bFound = find.FindFile(strFile);
while(bFound)
{
bFound = find.FindNextFile();
CString strFileName;
if(find.IsDirectory())
continue;
strFileName = find.GetFileName();
CString ext3=strFileName.Right(3);
CString ext4=strFileName.Right(4);
if(!strFileName.IsEmpty() && (strFileName.GetLength()>4))
{ if(ext3.CompareNoCase("bmp")==0 || ext3.CompareNoCase("dib")==0 ||
ext3.CompareNoCase("jpg")==0 || ext3.CompareNoCase("tif")==0 ||
ext3.CompareNoCase("png")==0 || ext4.CompareNoCase("jpeg")==0 ||
ext4.CompareNoCase("tiff")==0 ) //If Condition true add filename to list control
//m_ctlListCtrl.AddImageFile(strFileName);
}
}
//m_ctlListCtrl.LoadThumbImages();
}
//m_ctlListCtrl.SetRedraw(TRUE);
Invalidate();
}
BiggiSmalls
4-Sep-14 7:02am
View
Yes i already created the ListControl, when i select an item from the TreeControl, it saves the path of the folder in a edit control box. Now i need like you said from this selected path to show all the files in the ListControl, but i totaly lost right now, can you help me little bit more with this?
BiggiSmalls
4-Sep-14 6:44am
View
When i click on tree item (folder) i want to show all files in that folder and subfolder to a list control. I need a explanation of the code what to do when i click ONSELELECTION_CHANGED_TREE.
BiggiSmalls
28-Aug-14 9:17am
View
I know its not a specific question, i got that.
BiggiSmalls
28-Aug-14 9:11am
View
ok, thanks for your guidence.
Show More