Click here to Skip to main content
15,923,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: How to add a ComboBox to Browseinfo? Pin
David Crow15-Jan-08 3:09
David Crow15-Jan-08 3:09 
Questionhow to add check boxes in multiple colums of a list ctrl Pin
Member 38696824-Dec-07 23:35
Member 38696824-Dec-07 23:35 
AnswerRe: how to add check boxes in multiple colums of a list ctrl Pin
followait5-Dec-07 0:29
followait5-Dec-07 0:29 
GeneralRe: how to add check boxes in multiple colums of a list ctrl Pin
Member 38696825-Dec-07 0:51
Member 38696825-Dec-07 0:51 
GeneralRe: how to add check boxes in multiple colums of a list ctrl Pin
followait5-Dec-07 16:19
followait5-Dec-07 16:19 
AnswerRe: how to add check boxes in multiple colums of a list ctrl Pin
David Crow5-Dec-07 2:35
David Crow5-Dec-07 2:35 
Questiontrace error Pin
keyto4-Dec-07 23:17
keyto4-Dec-07 23:17 
GeneralRe: trace error [modified] Pin
Nelek4-Dec-07 23:33
protectorNelek4-Dec-07 23:33 
JokeRe: trace error Pin
CPallini4-Dec-07 23:41
mveCPallini4-Dec-07 23:41 
GeneralRe: trace error Pin
Nelek4-Dec-07 23:46
protectorNelek4-Dec-07 23:46 
GeneralRe: trace error Pin
vasarlajagadish15-Oct-09 4:02
vasarlajagadish15-Oct-09 4:02 
GeneralRe: trace error Pin
ThatsAlok4-Dec-07 23:40
ThatsAlok4-Dec-07 23:40 
Generalabout send function!! Pin
Laurence4-Dec-07 22:35
Laurence4-Dec-07 22:35 
GeneralRe: about send function!! Pin
Laurence4-Dec-07 22:44
Laurence4-Dec-07 22:44 
GeneralRe: about send function!! Pin
SandipG 4-Dec-07 22:59
SandipG 4-Dec-07 22:59 
GeneralRe: about send function!! Pin
Laurence5-Dec-07 1:45
Laurence5-Dec-07 1:45 
GeneralRe: about send function!! Pin
followait4-Dec-07 23:24
followait4-Dec-07 23:24 
GeneralRe: about send function!! Pin
ktm TechMan5-Dec-07 0:13
ktm TechMan5-Dec-07 0:13 
GeneralRe: about send function!! Pin
Laurence5-Dec-07 1:46
Laurence5-Dec-07 1:46 
GeneralR about send function!! Pin
Laurence5-Dec-07 1:50
Laurence5-Dec-07 1:50 
GeneralRe: about send function!! Pin
JudyL_MD5-Dec-07 2:33
JudyL_MD5-Dec-07 2:33 
GeneralRe: about send function!! Pin
Dexterus5-Dec-07 21:24
Dexterus5-Dec-07 21:24 
QuestionHow to catch GDI+ exceptions? [modified] Pin
followait4-Dec-07 22:08
followait4-Dec-07 22:08 
for example
try {
    Bitmap bmp(path);   //It is strange that the piece of code  works
                        //in my test app, when I copy it, it throw
                        //exception here. The code is totally local.
} catch (/*???*/) {
]



	CMainFrame *pMF=(CMainFrame *)AfxGetMainWnd();

	TCHAR Path[MAX_PATH];
	TCHAR FullPath[MAX_PATH];
	BROWSEINFO bi;
	::memset(&bi,0,sizeof(bi));
	bi.hwndOwner=m_hWnd;
	bi.pszDisplayName=Path;
	bi.lpszTitle=TEXT("Select a directory");
	bi.ulFlags=BIF_DONTGOBELOWDOMAIN|BIF_EDITBOX|BIF_NEWDIALOGSTYLE
		|BIF_NONEWFOLDERBUTTON|BIF_RETURNONLYFSDIRS|BIF_STATUSTEXT;
	LPCITEMIDLIST pidl=SHBrowseForFolder(&bi);
	if(::SHGetPathFromIDList(pidl,FullPath)) {
		int len=_tcslen(FullPath);
		CString s(FullPath);
		s+=TEXT("\\*.jpg");
		CFileFind ff;
		BOOL b=ff.FindFile(s);
		while (b) {
			b=ff.FindNextFile();
			CString FilePath=ff.GetFilePath();
			WCHAR *p=FilePath.AllocSysString();
			Gdiplus::Bitmap bmp(p);
			Gdiplus::Bitmap *pThmb=(Gdiplus::Bitmap*)bmp.GetThumbnailImage(60,45);
			HBITMAP hBmp;
			pThmb->GetHBITMAP(Color::Black,&hBmp); 
//Got exception in the previuos line, 
//pThumb is NULL and bmp seems not available when I check in debug


modified on Wednesday, December 05, 2007 4:15:58 AM

AnswerRe: How to catch GDI+ exceptions? Pin
SandipG 4-Dec-07 22:47
SandipG 4-Dec-07 22:47 
GeneralRe: How to catch GDI+ exceptions? Pin
followait4-Dec-07 23:00
followait4-Dec-07 23:00 

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.