|
i dont now what is wrong but nothing hapening when i push the buton !
(the data from list control are from a database in visualfox 6.0)
maybe help this ! i dont now !
void CNcontabile::OnTest2()
{
CString sRelatia ;
m_relatia.GetWindowText(sRelatia);
LVFINDINFO stInfo = {0};
stInfo.flags = LVFI_STRING;
stInfo.psz = sRelatia;
int nItem = m_list.FindItem( &stInfo );
if( nItem != -1 )
{
// the item is in the list control
CString csSecondColumnText = m_list.GetItemText( nItem, 1 );
// set the text to the second edit box
m_credit.SetWindowText( csSecondColumnText);
}
}
i dont use anything else but this in my code and in OnInitDialog :
m_list.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVFI_STRING | LVS_EX_FLATSB);
m_list.InsertColumn(0,"Cont",LVCFMT_LEFT,90);
m_list.InsertColumn(1,"Denumire",LVCFMT_LEFT,360);
Bravoone
|
|
|
|
|
Maybe instead of
m_list.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVFI_STRING | LVS_EX_FLATSB);
you should have
m_list.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_FLATSB);
Can you put a break point inside the OnTest2 function and execute it in step-by-step manner? I hope this will help you to solve the problem.
|
|
|
|
|
IS STILL NOT WORKING HE FIND ONLY ITEMS INSERTED IN ONINITDIALOG !!!
YOU HAVE ANOTHER SOLUTION !? MAYBE BETHER !!!! THANKS A LOT !!!!!!
bravoone !!!! i wait your answer !!!!!!
and thanks again!!!!!!!!!!!!!
Bravoone
|
|
|
|
|
Flaviu_2006 wrote: stInfo.flags = LVFI_STRING;
What if you used LVFI_PARTIAL instead?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
LVFI_PARTIAL solv the problem THANKS GUYS !!!!!!!!!!!!!!!!!!!!!!!!!
ITS COOOOLLLLLLLLL !!!!!!!!!!!!
ITS WORKING !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
TO EVRYONE WHO HAVE PATIANCE WITH ME => THANKS AND IN THE FUTURE MAYBE I CAN HELP YOU TO !!!!!!!!!!!!!!!!!!!!!!!!
THANKS OF LOT TO EVRYONE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
SPECIALY TO ---> FRANK WHO HAVE THE IDEEA !!!!!!!!!!!!!!!!!THAKS!!!!
bravoone out !
p.s. - see you soon !!!!!!!!!! on www.codeproject.com
Bravoone
|
|
|
|
|
yes i cannot find in a list an item which was not inserted!
...but is loaded in list control from a database !!!!! visualfox pro 6.0
its a usefull tool if is someone who can do it !
>>>>>>>>>bravoone<<<<<<<<<<<<<
pls help urgent !!!!!!!!!
thanks a lot !!!!!!!!!!!!!
Bravoone
|
|
|
|
|
Hi All,
I have automated MSWord in VC++ and open an *.doc file and save it as a text file with the help of CodeProject. But I am getting Run time errors while I am try to close my application and documents .
*The error is
"Application has requested Run time to Terminate it in an unusual way"
My Code starts here
BOOL CLastApp::InitInstance()
{
if(!AfxOleInit()) // Your addition starts here
{
AfxMessageBox("Could not initialize COM dll");
return FALSE;
}
else
{
AfxMessageBox("Inint");
}
_Application app; // app is the Excel _Application object
if(!app.CreateDispatch("Word.Application"))
{
AfxMessageBox("Couldn't start Word");
}
else
{
//Make Word Visible and display a message
app.SetVisible(TRUE);
AfxMessageBox ("Word is Running!");
}
COleVariant
covTrue((short)TRUE),covFalse((short)FALSE),covOptional((long)DISP_E_PARAMNOTFOUND, VT_ERROR),covFormat( short(7));
Documents docs = app.GetDocuments();
_Document doc = docs.Open(
COleVariant("D:\\ss.doc"),
covTrue, // Confirm Conversion.
covTrue, // ReadOnly.
covFalse, // AddToRecentFiles.
covOptional, // PasswordDocument.
covOptional, // PasswordTemplate.
covFalse, // Revert.
covOptional, // WritePasswordDocument.
covOptional, // WritePasswordTemplate.
covTrue,
covTrue,
covOptional,
covOptional,
covOptional,
covOptional);
doc.SaveAs(COleVariant("D:\\george\\win.txt"),
covFormat,covOptional,covOptional,
covOptional,covOptional,covFalse,covOptional,
covTrue,covFalse,covOptional, covOptional,covTrue,covOptional,covOptional,covOptional);
/**********IT IS WORKING UPTO HERE PROPERLY ************************/
//**********PROBLEM STARTS FROM HERE****************************//
doc.Close(covOptional,covOptional,covOptional);
docs.Close(covOptional,covOptional,covOptional); /*Error is coming from here if we comment it no error will come */
app.Quit();
}
//Programme Ends here
While am trying to close doc or docs its getting run time error. How I can properly Execute these statements.
Please help me
Thanks in Advance
George K Jolly
-- modified at 10:39 Thursday 3rd August, 2006
|
|
|
|
|
georgekjolly wrote: While am trying to close doc or docs its getting run time error.
Maybe one or the other does not need closed. What runtime error are you referring to?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
Hope this is the right place to post this question, but does anyone know how to start a application (or bat file) after a istaller is finished with Visual Studio 2005 Setup?
Thanx
Regards
Programm3r
|
|
|
|
|
Which application you want to start?
VS 2005 working fine after normal installation.
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
Thanx for the response....
After the installation I want a bacth file to start, the bacth file will perform a couple of action and thats it, problem is i don't know how to start a program after the installation is completed?
Regards
Programm3r
|
|
|
|
|
It's confusing. can't you start the batch file manually after completing the setup?
What do you mean by application? you want to start the application as the part of setup? if it so, I dont have any solution
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
O.K, It's like this:
A setup program runs, to copy files. Just like any other install program. ( with the exception that I created the setup program). Then after the install (after the install is complete || the the user has pressed finish) the setup program must start another program ( this program can be a bacth file || it can be a executable file .exe)
I don't know what setting to configure in Visual Studio 2005 Setup Deployeement to do this.
Regards
Programm3r
|
|
|
|
|
sorry i dont know. please check the read me file of VS installtion
|
|
|
|
|
Thanx anyway
Regards
Programm3r
|
|
|
|
|
Try using the PostBuildEvent property of your setup project.
Neil Van Eps
"Staging servers are for compulsive bed-wetting types." - Chris Maunder
|
|
|
|
|
hi
When I tried to execute a sample from msdn I got an error as
cannot open file "mfc42u.lib"
How to resolve this.I am using vc6.0
Thanks in advance
|
|
|
|
|
check if is not opened ! if is open mfc42u.lib you got that answer !
Bravoone
|
|
|
|
|
have you included the lib file into your applications properties under link?
Regards
Programm3r
|
|
|
|
|
Is your previous problem solve or no?
|
|
|
|
|
|
In the defaul installation of Microsoft Visual Studio 98, it wont install (include) the unicode libray for MFC.
You can add it by taking "Add Remove Programs"->Micorosot Visual Studio 6->Click Change/Remove
from the setup menu appearing, click on "Add/Remove"
from the next dialog appearing (maintanance dialog), Select Visual C++ 6.0, then click on "Change Option" button
from the new dialog appearing, select VC++ and MFC Template Libraries. Again click Change Option
again a new dialog will appear, select MS Foundation Class Libraries. Click Change Option
frmom the new dialog appearing
Select (set the check box. in you case, the check box will not be seleceted) "Static Libraries for Unicode", "Shared Library for Unicode".
the resume by clicking ok...
HTH
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
I don t now what is wrong :
void CNcontabile::OnTest2()
{
CString sRelatia =_T("Cont");
m_relatia.GetWindowText(sRelatia);
LVFINDINFO stInfo = {0};
stInfo.flags = LVFI_STRING;
stInfo.psz = sRelatia;
int nItem = m_list.FindItem( &stInfo );
if( nItem != -1 )
{
// the item is in the list control
CString csSecondColumnText = m_list.GetItemText( nItem, 1 );
// set the text to the second edit box
m_credit.SetWindowText( csSecondColumnText );
}
}
the columns are : "Cont" and "Denumire" !
Thanks !!!!!!!!!!!!!!
>>>>>>>>>>bravoone<<<<<<<<<<<
Bravoone
|
|
|
|
|
please dont make new thread.
Whats wrong in this code
|
|
|
|
|
I placed ambersand for my button in dialog but its not look like that i.e in exe file the button does not have underline in first letter.
For ex, Caption: &Item
But exe does not have like this,it simply shows Item with out any underline in "I".
Anu
|
|
|
|