> or you rewrite your function to something like
This seems to be the better solution, thank you!
PS:
Why Microsoft doesn't define copy constructors in MFC? ... my be should be
useful... :))))
1. Urgent help with CStringArray
Hello,
i need to return a CStringArray from a class method, but CStringArray (and
CStringList also) doesn't have a copy constructor!
I want avoid memory allocation within the metod because I don't want to
force the class user to deallocate pointers... this is the piece of code:
const CStringArray MyClass::MyMethod()
{
CStringArray StrArray;
for (...)
StrArray.Add("something");
return StrArray; // this will generate a missing copy constructor
compile error
}
Thank you,
Gaetano Sferra
2. CArray of CStringArray, overriding = operator of CStringArray
Hi all...
I have an application due out this monday. I've been working on it for
the past week or so and foolishly haven't run it in Release mode. I've
had release / debug problems in the past (different applications)..
but nothing like this.
The application is a dynamically linked MFC dialog application.
Nothing special really. Runs fine in debug.
However, when I run in Release, nothing happens! Nothing! According to
the task manager, the application is running - it just never shows.
I put a message box into the constructor:
CTestApp::CTestApp()
{
AfxMessageBox(_T("Test"));
}
It does not reach this point when running in Release. No message box.
Where do i even start to look for the problem?
Thanks a lot
4. Help with CStringArray in Unicode, Multi-byte, & MFC
5. Deleting MSI files - Urgent Help
Hi all, I am developing a application where i convert all msi into a encrypted file. when they want to install the application, I decrypt the encrypted msi files and copy it to temp folder and install. After installation i have to delete that MSI file from Temp. How to perform this. I couldnt get the msi running in the process it gives just msiexec.exe. Is it possible to delete the MSI file by itself after installation. Please help urgent Venkat INDIA
6. Need urgent help - CSharp / C#
7. HElp C++ to C# printing problem URGENT
i need help to translate this code C++ TO C# FWP30.DLL is printer driver
DWORD WINAPI PrintProc( LPVOID pParams
LOGFONT lf
lf.lfHeight = 36
lf.lfWidth = 0
lf.lfEscapement = 0
lf.lfOrientation = 0
lf.lfWeight = FW_BOLD
lf.lfItalic = FALSE
lf.lfUnderline = FALSE
lf.lfStrikeOut = 0
lf.lfCharSet = ANSI_CHARSET
lf.lfOutPrecision = OUT_DEFAULT_PRECIS
lf.lfClipPrecision = CLIP_DEFAULT_PRECIS
lf.lfQuality = DEFAULT_QUALITY
lf.lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS
_tcscpy( lf.lfFaceName, _T( "Arial" ) )
// Initialize printin
DOCINFO di
di.cbSize = sizeof( DOCINFO )
di.fwType = 0
di.lpszDocName = _T( "Doc" )
di.lpszDatatype = 0
di.lpszOutput = NULL
DEVMODE dm
HDC hDC = CreateDC( _T( "FWP30.DLL" ), NULL, TEXT( "COM1:" ), &dm ); // Context yaratyor.
// Set header form of
BYTE tmp = 0;
ExtEscape( hDC, HOF_MODIFY, 1, ( const char * )&tmp, 0, NULL )
StartDoc( hDC, &di )
StartPage( hDC );
HFONT hFont = CreateFontIndirect( &lf )
HFONT hOldFont = ( HFONT )SelectObject( hDC, hFont )
DeleteObject( hFont )
DeleteObject( hOldFont )
RECT rect = { 10, 10, 600, 40 }
DrawText( hDC, _T( "Offense # 0023JL4NP" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP )
rect.top += 220
DrawText( hDC, _T( "Violation: Illegal Parking" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.top += 40
DrawText( hDC, _T( "FINE 70" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
lf.lfHeight = 26
hFont = CreateFontIndirect( &lf )
hOldFont = ( HFONT )SelectObject( hDC, hFont )
DeleteObject( hFont )
DeleteObject( hOldFont )
rect.top -= 220;
DrawText( hDC, _T( "Time 12.34" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.left += 300
DrawText( hDC, _T( "Date 25/03/2004" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.left -= 300
rect.top += 30
DrawText( hDC, _T( "Officer PO304044" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.top += 30
DrawText( hDC, _T( "Location Main High Street" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.top += 30
DrawText( hDC, _T( "Meter Number N/A" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.top += 30
DrawText( hDC, _T( "Check Code IGCILP523" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.top += 250
DrawText( hDC, _T( "Registration AA05 ABC" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.top += 30
DrawText( hDC, _T( "Make Peugeot" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.top += 30
DrawText( hDC, _T( "Model 206" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.top += 30
DrawText( hDC, _T( "Colour Blue" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
rect.top += 30
DrawText( hDC, _T( "Ticket Code TCKTCD0024" ), -1, &rect, DT_SINGLELINE | DT_NOCLIP | DT_EXPANDTABS )
// Close down printin
EndPage( hDC )
EndDoc( hDC );
DeleteDC( hDC )
HWND* phWnd = ( HWND* )pParams
::PostMessage( *phWnd, WM_PRINT_END, 0, 0 )
Sleep( 2000 )
return 0
}
8. Please Help ----- Getting wrong result in C# than VB.Net --- Urgent - Microsoft .NET Framework