|
i want to scan PCI slot which has how many sound card affixed in my computer using with visual C++ programming?
|
|
|
|
|
I HAVE DEVELOPED A PROGRAM WITH VISUAL BASIC SCRIPT, THIS PROGRAM WRITES A FILE CONTAINING SOME TEXT LINES, I CAN'T READ THIS FILE WITH C++ TECHNOLOGY. I THINK THAT THE PROBLE IS BECAUSE VBS WRITES UNICODE AND C++ READS ANSI.
CAN SOMEONE HELP ME AND SEND SOME EXAMPLE CODE?
THANKS.
VISUAL C++
|
|
|
|
|
Script code:
Dim fso
Dim file
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.CreateTextFile("c:\myfile.txt", true)
file.WriteLine("This is a line in my file")
file.Close
C++ (MFC) code:
CStdioFile file("c:\\myfile.txt", CFile::modeRead);
CString strLine;
file.ReadString(strLine);
file.Close();
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
hi..
i am useing Inno programe to build a setup file for vc++
application but when i extract the setup file in other computer (no Visual stdio is installed their )
an error message is came up when the installation is finised and lunch the program
it say:
the dynamic library MFC42D.DLL could not be found in the spacified path C:\Program Files\F.T.P;.;C:\WINNT\system32;C:\WINNT\system;C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN
i tried to build it again but invlued LIB directory of MFC folder in VS directory but it also did not work
So any help???????????????
|
|
|
|
|
You need to build ur application in Release mode before you disturbute ur application.. MFC42U.DLL is usally shiped with VS for debugging the code.
But MFC42.dll is shiped with the OS itself.
Still Alive!!!
Thank you God.
|
|
|
|
|
I'm sure it was only a typo, but MFC42U.DLL is the UNICODE version of MFC42.DLL, while MFC42D.DLL is the DEBUG build of MFC42.DLL, and cannot be shipped with your app, as it will break the license agreement for VC or Visual Studio
Steve S
|
|
|
|
|
Steve S wrote:
I'm sure it was only a typo
humm, he did say that MFC42D.dll is missing and not MFC42U.dll.
Still Alive!!!
Thank you God.
|
|
|
|
|
|
oke i rebuild my application in Release mode and use Inno
after in the add files option i add the MFC42U.DLL and
MFC42.dll from C:\WINNT but it also did not work and the generated program with different icon and olny welcome and goodby messages apears
|
|
|
|
|
Since you said that ur application showed some welcome message it means that the application worked but the logic of the application did not work. You need to cross check that some times the applications build in debug will work and in release it wount because of silly errors that in debug would not be an inssue but in release build it does, like assigning the pointer to null or initializing the member variables to default values while creating etc.
Still Alive!!!
Thank you God.
|
|
|
|
|
i dont that it was a mistake i made in the selection of exe file i did not select the right path so the problem still in the dll files ?
any help
|
|
|
|
|
i found this file vcredist.exe that may be what i need tryed to added to my Inno setup project but it still give
the same error so any one know how to work with Inno setup program or vcredist.exe
|
|
|
|
|
Hi all,
in list view, why does "CScrollBar *pscrl = GetScrollBarCtrl();" allway take NULL. Please help me ... I want the thumbnail of VERT allway end of list.
best regard,
Thanks all,
|
|
|
|
|
Did you enable the scrollbar in the resource editor, for the list view?
Still Alive!!!
Thank you God.
|
|
|
|
|
I think ListView in MDI but not list control
Thanks,
|
|
|
|
|
Opps sorry,
I guess the scroll bar is not always present, It comes up only when it is required, like when there are more data in the list that the screen can handle.
Still Alive!!!
Thank you God.
|
|
|
|
|
Because a CListCtrl uses built in scroll bars, you cannot call GetScrollBarCtrl() on it and get a CScrollbar* pointer. You need to use the CWnd scroll bar base class functions and the SB_VERT or SB_HORZ flag to specify if your working with the horizontal or vertical scrollbar.
m_Ctrl.SetScrollPos(SB_VERT, position);
Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
|
|
|
|
|
Good day,
I have an application that runs:
msdev c:\TEST.dsw /MAKE "TEST - Win32 Release" /REBUILD /OUT c:\\output.log
msdev outputs the compilation in output.log and while the msdev is compiling the application, i also want to get the appended line in output.log. The same application that executes the msdev...also access output.log to display it in listbox. But i could not accessed the file,, possible coz is sharing..How could I access this file so that I could put the appended line by msdev to output log and the same time get that appended line and output it in my listbox?
I try to use cl, but it will make a long code whereas in msdev, you just input the .dsw or .dsp.
If i try to remove the option--> /OUT c:\\output.log, msdev will output it in a console or stdout. If its the case, how could i also access the file to reflect it in the listbox?
Thanks a lot and more power!
spingkoy
|
|
|
|
|
|
Was this of no help?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I have a com object in which there are different properties. When i get these values through it works well when property is returning long or some other integer but it crashes when property is returning bstr. Take a look at my code and guide me that what i did wrong.
VARIANT pvResult;
memset(&pvResult, 0, sizeof pvResult);
VariantInit(&pvResult);
DISPID dispID=this->pColl->getMemberID(index);
DISPPARAMS dispParamsNoArgs={NULL,NULL,0,0};
HRESULT hr=pDispatch->Invoke(dispID,IID_NULL,LOCALE_USER_DEFAULT,
DISPATCH_PROPERTYGET,&dispParamsNoArgs,
&pvResult,NULL,&nArgErr);
Thanx in advance
Inam
|
|
|
|
|
hi..
i am trying to build setup program to my vc++ application
i follow the steps shows in an example i found it in code
project "Simple installshield tutorial" but when i go to the
Folder created by the setup program for the application i found file name:
Uninst.isu
so can any body see the mistake i made?
|
|
|
|
|
Hi,
I want to change the font style i.e. headers with bold and change some colors in the data tables (columns or rows) depending on the value. I dont know whether this can be done or not. Please guide me as i have not used excel before. I have to use MFC and i have excel 2003. Looking forward to a response. Thanks a lot in advance.
Regards,
Himanshu
|
|
|
|
|
Hi,
I want to change the font style i.e. headers with bold and change some colors in the data tables (columns or rows) depending on the value. I dont know whether this can be done or not. Please guide me as i have not used excel before. I have to use MFC and i have excel 2003. Looking forward to a response. Thanks a lot in advance.
Regards,
Himanshu
|
|
|
|
|
A Snippet of code from a junk app of mine :-
_Application oApp;
oApp.CreateDispatch("Excel.Application");
if (!oApp)
{
AfxMessageBox("Cannot start Excel");
return;
}
Workbooks oBooks = oApp.GetWorkbooks();
_Workbook oBook = oBooks.Add(vOpt);
Worksheets oSheets = oBook.GetWorksheets();
_Worksheet oSheet = oSheets.GetItem(COleVariant((short)1));
Range oRange;
long bMergeAcross = 0;
Styles styles = oBook.GetStyles();
Style s = styles.Add("Style with Center Text", vOpt);
s.SetVerticalAlignment(2);
s.SetHorizontalAlignment(3);
Font oFont = s.GetFont();
oFont.SetSize(COleVariant((long)FONT_SIZE_JUSTIFICATION));
VARIANT vt;
vt.vt = VT_DISPATCH;
vt.pdispVal = s.m_lpDispatch;
oRange.SetStyle(vt);
oRange=oSheet.GetRange(COleVariant("A1"),COleVariant("A2"));
oFont = oRange.GetFont();
oFont.SetBold(COleVariant((short)TRUE));
Hope this helps
By the way you will have to import the type library to use these classes
For more help
Click it[^]
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|