|
are you using unmanaged programming in the C#. anyways it make whole sendbuffer to zero!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I have created modal dialog using DoModal() function. But my dialog loses focus when I click on the Parent dialog. How to prevent this..?
|
|
|
|
|
manohar_balu wrote: How to prevent this..?
By using Spy++ to see what window the dialog is modal to.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
How can i check file is Exists or not?I am creating a file but before create a file i want to check File name is exists or not.Plz help me
|
|
|
|
|
|
You can use of FindFirstFile .
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
if you find a file you got to close the handle.
Greetings from Germany
|
|
|
|
|
Sure!
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hamid. wrote: Sure!
hummm
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
ccpptrain wrote: _taccess()
good! but i think, if i use it, it will increase my dependency on C runtime library. though they are fast but more error prone so beware while using it.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
How to create a custom list control in MFC which has following implemented :
Multicolumn sorting(time , text , numbers) .
Column coloring and dragging .
Set cell padding.
Subitem editing .
Please provide me with the code for the custom list control.
|
|
|
|
|
Is this[^] helpful?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
|
i am trying to use the DisplayBand() function of CRichEditCtrl to print its contents on a memory DC and then displaying it elsewhere on a dialog. it displays fine all the formatting as well but the problem is that it is displaying a white background.
i want to remove the white bkgnd and make it transparent.
does any one know how to do it?
thanks
|
|
|
|
|
See here[^] and questions on the bottom of article.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi all,
I had my code reviewed and I had a comment that its best to remove the else in this statements:
LRESULT CMainDlg::OnInstall(WORD, WORD wID, HWND, BOOL& )
{
string LaunchInstaller;
string InstallFolder;
InstallClass installclass;
TCHAR tcItemText[MAXBYTES];
if(UpdateList.GetItemText(Select, tcItemText, MAXBYTES))
{
InstallFolder = tcItemText;
LaunchInstaller = installclass.ConstructInstallerKey(IDS_MANAGEKEY, InstallFolder);
if (installclass.InstallUpdate(LaunchInstaller.c_str()))
{
return 0;
}
else
{
LaunchInstaller = installclass.ConstructInstallerKey(IDS_RERITEKEY, InstallFolder);
if (installclass.InstallUpdate(LaunchInstaller.c_str()))
{
return 0;
}
else
{
LaunchInstaller = installclass.ConstructInstallerKey(IDS_RERITEASIANKEY, InstallFolder);
if (installclass.InstallUpdate(LaunchInstaller.c_str()))
{
return 0;
}
else
{
LaunchInstaller = installclass.ConstructInstallerKey(IDS_RERITECHINAKEY, InstallFolder);
if (installclass.InstallUpdate(LaunchInstaller.c_str()))
{
return 0;
}
}
}
}
}
else
{
MessageBox ( _T("Please choose an item to install"), _T("Redmap Update Manager"), MB_ICONWARNING );
}
return 0;
}
Any suggestions on how the code should look like?
Thanks,
Jayjay
|
|
|
|
|
LRESULT CMainDlg::OnInstall(WORD, WORD wID, HWND, BOOL& )
{
string LaunchInstaller;
string InstallFolder;
InstallClass installclass;
TCHAR tcItemText[MAXBYTES];
if(UpdateList.GetItemText(Select, tcItemText, MAXBYTES))
{
InstallFolder = tcItemText;
LaunchInstaller = installclass.ConstructInstallerKey(IDS_MANAGEKEY, InstallFolder);
if (installclass.InstallUpdate(LaunchInstaller.c_str()))
return 0;
LaunchInstaller = installclass.ConstructInstallerKey(IDS_RERITEKEY, InstallFolder);
if (installclass.InstallUpdate(LaunchInstaller.c_str()))
return 0;
LaunchInstaller = installclass.ConstructInstallerKey(IDS_RERITEASIANKEY, InstallFolder);
if (installclass.InstallUpdate(LaunchInstaller.c_str()))
return 0;
LaunchInstaller = installclass.ConstructInstallerKey(IDS_RERITECHINAKEY, InstallFolder);
if (installclass.InstallUpdate(LaunchInstaller.c_str()))
return 0;
}
else
{
MessageBox(_T("Please choose an item to install"), _T("Redmap Update Manager"), MB_ICONWARNING);
}
return 0;
}
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
i want to get value from excel,for example:
COLUMN1 COLUMN2
----------------
123 456
ABC DEF
123 ABC
EFG HIJ
like this,i can't get '123' ,but i can get 'ABC'.
my code :
void ReadTrustListFromExcel(CString sFile)
{
CDatabase database;
CString sSql;
CString sItem1, sItem2;
CString sDriver;
CString sDsn;
sDriver = GetExcelDriver();//GetExcelDriver();
if (sDriver.IsEmpty())
{
return;
}
sDsn.Format(_T("ODBC;DRIVER={%s};DSN='';DBQ=%s"), sDriver, sFile);
TRY
{
database.Open(NULL, false, false, sDsn);
CRecordset recset(&database);
sSql.Format(_T("SELECT * FROM [%s$A1:IV65535]"),_T("EmailSheet"));
recset.Open(CRecordset::forwardOnly, sSql, CRecordset::readOnly);
while (!recset.IsEOF())
{
recset.GetFieldValue(short(0), sItem1);
recset.GetFieldValue(short(1), sItem2);
TRACE(_T("name:%s,addr:%s\r\n"),sItem1,sItem2);
recset.MoveNext();
}
database.Close();
}
CATCH(CDBException, e)
{
TRACE(_T("ERROR"));
}
END_CATCH;
|
|
|
|
|
ZhiLiangLin wrote: sDsn.Format(_T("ODBC;DRIVER={%s};DSN='';DBQ=%s"), sDriver, sFile);
Is the value of sDsn correct?
ZhiLiangLin wrote: sSql.Format(_T("SELECT * FROM [%s$A1:IV65535]"),_T("EmailSheet"));
Have you tried:
sSql.Format(_T("SELECT * FROM [%s$A1:B4]"), _T("EmailSheet")); Does it have anything to do with those cells containing numbers? Do any of the rows read correctly?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
the api 'getfieldvalue' can't get the value.
|
|
|
|
|
So have you used the debugger to step into that method to find out why?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I had to re-install VS2008 when I re-installed the operating system. Somehow the "Just-In-Time Debugger" de not get installed. I tried going to Microsoft downloads for it and all they offer is VS20088 SP1. Every time I installed VS2008 SP1 it messed VS2008 up so I won't install it. Does anyone know how I can get a copy of the "Just-In-Time Debugger" from microsoft?(Microsoft Script Debugger is another name for it).
A C++ programming language novice, but striving to learn
|
|
|
|
|
microsoft bug team will surly reply you back on this issue!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Anyone have any experience and thoughts to share about Adobe GIL
GIL[^]
I'm considering GIL library as replacement for GDI+ for my ongoing project.
Thanks
|
|
|
|