Click here to Skip to main content
16,013,322 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Create form controls at runtime Pin
Aaron Schaefer29-May-02 13:09
Aaron Schaefer29-May-02 13:09 
Generalfstream issues Pin
Alan Chambers29-May-02 10:45
Alan Chambers29-May-02 10:45 
GeneralRe: fstream issues Pin
Joaquín M López Muñoz29-May-02 11:12
Joaquín M López Muñoz29-May-02 11:12 
GeneralRe: fstream issues Pin
Alan Chambers29-May-02 11:21
Alan Chambers29-May-02 11:21 
GeneralProblem converting a CComBSTR to LPCTSTR with CW2CT Pin
JC Gauthier29-May-02 10:24
JC Gauthier29-May-02 10:24 
GeneralRe: Problem converting a CComBSTR to LPCTSTR with CW2CT Pin
soptest29-May-02 12:25
soptest29-May-02 12:25 
GeneralRe: Problem converting a CComBSTR to LPCTSTR with CW2CT Pin
JC Gauthier30-May-02 4:27
JC Gauthier30-May-02 4:27 
GeneralRe: Problem converting a CComBSTR to LPCTSTR with CW2CT Pin
soptest30-May-02 8:36
soptest30-May-02 8:36 
Use thi9s code:
//------------------------//
// Convert BSTR to char * //
//------------------------//
inline char* ConvertBSTRToString(BSTR pSrc)
{
	if(!pSrc) return NULL;
	
	DWORD cb,cwch = ::SysStringLen(pSrc);//convert even embeded NULL
	
	char *szOut = NULL;
	
	if(cb = ::WideCharToMultiByte(CP_ACP, 0, pSrc, cwch + 1, NULL, 0, 0, 0))
	{
		szOut = new char[cb];
		if(szOut)
		{
			szOut[cb - 1]  = '\0';
			
			if(!::WideCharToMultiByte(CP_ACP, 0, pSrc, cwch + 1, szOut, cb, 0, 0))
			{
				delete []szOut;//clean up if failed;
				szOut = NULL;
			}
		}
	}

	return szOut;
};


soptest
General_popen issue Pin
Stew29-May-02 9:41
Stew29-May-02 9:41 
GeneralRe: _popen issue Pin
Joaquín M López Muñoz29-May-02 9:46
Joaquín M López Muñoz29-May-02 9:46 
GeneralRe: _popen issue Pin
soptest29-May-02 9:56
soptest29-May-02 9:56 
GeneralWeird Keyboard Hooking Issue Pin
John Aldrich29-May-02 9:02
John Aldrich29-May-02 9:02 
GeneralRe: Weird Keyboard Hooking Issue Pin
Joaquín M López Muñoz29-May-02 9:34
Joaquín M López Muñoz29-May-02 9:34 
GeneralI think I got it now Pin
Joaquín M López Muñoz29-May-02 9:40
Joaquín M López Muñoz29-May-02 9:40 
GeneralMeasureItem doesn't get called. Pin
29-May-02 9:07
suss29-May-02 9:07 
GeneralRe: MeasureItem doesn't get called. Pin
Paul M Watt29-May-02 9:22
mentorPaul M Watt29-May-02 9:22 
GeneralRe: MeasureItem doesn't get called. Pin
29-May-02 9:46
suss29-May-02 9:46 
GeneralQuestion Pin
Steve L.29-May-02 9:04
Steve L.29-May-02 9:04 
GeneralRe: Question Pin
Mauricio Ritter29-May-02 9:20
Mauricio Ritter29-May-02 9:20 
GeneralMaximum value of unsigned long Pin
Hoang Le29-May-02 8:54
Hoang Le29-May-02 8:54 
GeneralRe: Maximum value of unsigned long Pin
Joaquín M López Muñoz29-May-02 8:50
Joaquín M López Muñoz29-May-02 8:50 
GeneralRe: Maximum value of unsigned long Pin
Christopher Lord29-May-02 12:49
Christopher Lord29-May-02 12:49 
GeneralRe: Maximum value of unsigned long Pin
Michael Dunn29-May-02 17:52
sitebuilderMichael Dunn29-May-02 17:52 
GeneralRe: Maximum value of unsigned long Pin
Joaquín M López Muñoz29-May-02 19:59
Joaquín M López Muñoz29-May-02 19:59 
GeneralRe: Maximum value of unsigned long Pin
Michael Dunn29-May-02 20:24
sitebuilderMichael Dunn29-May-02 20:24 

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.