|
|
make it at a higher resolution.......
|
|
|
|
|
Set the StretchBltMode to be COLORONCOLOR, that's the best possible quality, assuming you're using GDI. GDI+ has similar quality settings.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
This doesn't seem to make any difference when printing - I'm using StretchDIBits - maybe it's not used by that function? It makes a slight difference if I do the stretch on screen, but HALFTONE mode seems better.
|
|
|
|
|
OK - I'm not sure about StretchDIBits.
Does HALFTONE do enough to fix your problem ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I just inherited some code that includes an activex control hosted in an MFC dialog resource. While the activex control remains in the resource, the property browser is always empty for any control when editing the dialog with the form designer. If I remove it, suddenly all the properties show up for the other controls. The activex control is ours as well. Does anyone know what could cause this to happen? I'm at a loss to debug the problem anymore (I debugged the activex control inside Visual Studio and while the paint messages, etc, are being fired, none of the properties are ever queried).
|
|
|
|
|
Friends,
I've installed VS.NET 2005 beta and i developed a simple VC++ console application (ofcourse unmanaged application). When i try to run it in "Debug" mode, a dialog box appears showing message:
This application has failed to start because MFC80UD.DLL was not found. Re-installing the application may fix this problem.
I am not getting this error in release mode.
Can anyone tell me what is the problem ?
|
|
|
|
|
Amjad Shah wrote:
I am not getting this error in release mode.
No, in release mode, your app will use MFC80U.DLL ( the D is at the end of the debug dlls ). You should have this dll, I'd be inclined to reinstall VC and see if it appears. I certainly am using VC2005 without this error.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello,
I have a MDI Application using CListView. I only want to change the font in this view, but the Base Class Member ::SetFont(...) doesn't work decent. It doesn't make any difference whether the facename of the CFont Object is "Arial", "System"...
Is there a possibility to set the font for the CListView and CListCtrl respectively or a single item, subitem?
Thanks and best regards.
|
|
|
|
|
I don't know why you're set font isn't working - you can certainly change the font for the whole control to whatever you want. Check the font is being created correctly and also that you're not destroying the font handle.
To set the font individually for a subitem, see -
http://www.codeproject.com/listctrl/lvcustomdraw.asp
|
|
|
|
|
Thanks - the CFont Object wasn't created correctly, it was valid only inside a member function...
|
|
|
|
|
I am using the xcopy command but never had to deal with a directory path with spaces in the name. Does anyone know how to handle that?
E.g.
xcopy .\MyPatchJ\bin\MyApp.exe c:\Program Files\
That space in "Program Files" screws things up and MyApp.exe never gets copied.
Any assistance is appreciated.
Thanks
|
|
|
|
|
Try putting quotes around the path with the spaces so Program Files looks like "Program Files".
|
|
|
|
|
Alternatively try adding accompanying backspaces
|
|
|
|
|
If the full path looks something like
C:\Program Files\This, Inc\This TV App\TVAPP
do i place quotes around the entire thing like
C:\"Program Files\This, Inc\This TV App\TVAPP"
OR would it be inidvidually like
C:\"Program Files"\"This, Inc"\"This TV App"\TVAPP ??
|
|
|
|
|
|
englobe parameters with ""
xcopy ".\MyPatchJ\bin\MyApp.exe" "c:\Program Files\"
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
ok.. thanks.. i'll try that?
|
|
|
|
|
of course, why wouldn't you ? are you suspecting something ?
of course, don't if you don't want to copy into program files...
i just gave you the tip to work on dos with spaced parameters...
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 11:07 Tuesday 6th September, 2005
|
|
|
|
|
You can use quotes as has already been suggested, use the 8.3 format of that folder without quotes, or use CopyFile() instead.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Could someone clear up a possible memory leak for me? In using ADO.NET in MFC Projects it is written:
#pragma push_macro("new")
#undef new
try
{
m_OleDbConnection = new OleDbConnection(
S"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\test.mdb"
);
m_OleDbConnection->Open(); // Open up the connection
m_OleDb = new OleDbCommand(S"select * from Persons", m_OleDbConnection);
m_Reader = m_OleDb->ExecuteReader();
int count = 0;
while (m_Reader->Read())
{
AddToList(count,m_Reader->get_Item("First Name")->ToString(),
m_Reader->get_Item("Last Name")->ToString(),
m_Reader->get_Item("Phone Number")->ToString()
);
count++;
}
}
catch(Exception *e)
{
AfxMessageBox(CString(e->ToString()));
}
__finally
{
m_Reader->Close();
m_OleDbConnection->Close();
}
#pragma pop_macro("new")
What is bothering me is there is a new with no delete. The most surprising one is m_OleDb which doesn’t even have a close, let alone a delete. I tried adding a close as well as a delete and neither was accepted by the compiler.
I open and close the database hundreds of times, so I wanted to consider leaving it open and then I started to think about the memory leak problem.
Can anyone give me a hint why a memory leak doesn’t seem to play here?
Thanks,
Ilan
|
|
|
|
|
Would it make sense to add the following below the call to ExecuteReader() :
delete m_OleDb; since m_OleDb is not used any more?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
It made so much sense that I already tried it.
The compiler refuses with the error message:
c:\Ilan\ctview\ReadStudy.cpp(1755): error C3841: illegal delete expression: managed type 'System::Data::SqlClient::SqlCommand' does not have a destructor defined
Therefore I wanted to see if anyone had any other ideas.
Thanks,
Ilan
|
|
|
|
|
|
My bad. I've not used .Net so my new/delete suggestion was apparently way off base.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|