|
Yes that is what i want,
But i want to start the exefile in my app.
And it most be in a MFC app
|
|
|
|
|
You mean the register-setting in de CLASSES part of the registry, where there's a key called exefile.
You want to set a program in front of "%1" %* so it is called when an executable is started.
I think you mean you need the __argc en __argv[] vars. Read them out and you'll get you're arguments.
__argc = argument count
__argv[] = arguments, 0 = the program-file, 1,2,3,... the arguments.
Loading...
|
|
|
|
|
Yes that what i mean,
But how do i do this? And it must be a MFC app.
|
|
|
|
|
When an MFC app starts you can call GetCommandLIne() in the InitInstance() too see what parameters were passed to you when you were called.
If you vote me down, my score will only get lower
|
|
|
|
|
Hai,
In WinCE these two are not supporting, is there any option to replace this:
LR_DEFAULTSIZE | LR_LOADFROMFILE
with regards
|
|
|
|
|
I have created a structure to hold all the GUI settings that the program current state is in; i.e. check boxes, text filed entries, button states.
Now I want to save the file as Save Settings...
I have been using the CFileDialog to speficy a save file and also using a CFile to create and open a file.
I did try and use iostream but got in a mess with deprecated warning and namespace problems.
extern void _OLD_IOSTREAMS_ARE_DEPRECATED();
c:\SSIC_Example\SSIC_ExampleDlg.cpp(768): error C2065: 'ofstream' : undeclared identifier
What is the simplest way to save these settings and load them when the user selects to Load Project...
But I got in another mess with trying to open an already open file with Cfile.
I am using Visual Studio .Net 2002.
|
|
|
|
|
If I were you I would save the settings in an ini file which contained an xml format. This way you could easily parse and access data in the file using DOM. You can download XERCES which contains a perfectly acceptable DOM implementation and is widely available.
|
|
|
|
|
Have you used #include <fstream> without the .h? Have you used std::ofstream to use the stream? Why are you using CFile and ofstream together? why don't you decide to use only CFile?
Jaime
|
|
|
|
|
I have stoped using CFile and just trying to get the streams working;
i.e. Outfile << buttonOne.setting;
etc and do the same for input.
But still in a mess with headers to use and namespace.
It was OK doing this sort of thing with C++ Version 6.0.
|
|
|
|
|
If I use the header:-
#include <<fstream>>
I get the error:-
C:\Program Files\Microsoft Visual Studio .NET\Vc7\include\wchar.h(438): error C2011: '_stat' : 'struct' type redefinition
For Output:
std::ofstream Out;<br />
Out.open(file1);
For input:
std::ifstream In;<br />
In.open (file1);
How do I get rid of this error?!
|
|
|
|
|
hello,
i need to make a function that accept the same parameters of the Format function of CString and create a formatted string with them
so i've declared
void OutputMessage(const char* pMessage, ...);
and
void CNetConnection::OutputMessage(const char* pMessage, ...)
{
CString msg;
va_list argList;
va_start( argList, pMessage );
msg.Format(pMessage, argList);
va_end( argList );
// next use msg string to do things
}
The problem is that the output string has incorrect values in the %s %d etc values.
I've made something wrong?
Thanks
|
|
|
|
|
|
hi,
can anyone tell me
if crystal reports works with unmanaged c++ in visual studio 2003 ?
I have installed version 9 and 10
and cannot use either
any tips,
Regards,
Dermot
|
|
|
|
|
Irish_GUI wrote:
if crystal reports works with unmanaged c++ in visual studio 2003 ?
I'm using Crystal Reports 8.5 with VS2003, without any problem (well apart from the usual Crystal problems)
I dropped the Crystal Report viewer activex control onto a formview resource.
I then #import "craxdrt.tlb" to get the IApplication and IReport interfaces, which I use to load the report and then pass the loaded report into the active x.
Roughly
CCrystalViewer m_Report;<br />
IApplicationPtr m_Application;<br />
IReportPtr m_ReportObject;
<br />
<br />
HRESULT hr = m_Application.CreateInstance(__uuidof(Application));<br />
<br />
m_ReportObject = m_Application->OpenReport(strFilename);<br />
_bstr_t bstrSQL = m_ReportObject->GetSQLQueryString();<br />
<br />
TRACE("%s\n", (LPCTSTR)bstrSQL);<br />
<br />
<br />
m_ReportObject->put_ReportTitle(_bstr_t(strTitle));<br />
<br />
m_Report.put_ReportSource(m_ReportObject);<br />
<br />
m_Report.ViewReport();
Michael
CP Blog [^]
|
|
|
|
|
Hello - I have been working on a way to display more than one overlay for a given image - as the image states are not mutually exclusive for the control. Currently the MFC implementation only supports displaying a single overlay image at any given time. Does anyone know of a method to acheive this? I really do not want to reinvent the wheel here if it can be avoided. I have looked through various forums for a similar question and was unsuccessful in locating a solution. I find it hard to believe that no one has encountered this issue before.
Thanks in advance.
|
|
|
|
|
Hi
does any1 know how i can change
the fonts on some of my static controls
i can do it for all of them,but not for particular ones
thanks
si
|
|
|
|
|
Simply use CStatic::SetFont (actually CWnd::SetFont). You will have to provide to the function a CFont object you previously have created, or retrieved from GDI stock objects (by using ::GetStockObject for instance)
|
|
|
|
|
|
Each control you need to set the font for needs an unique ID so you can get the handlt to it.
Make sure they are not IDC_STATIC which is -1
If you vote me down, my score will only get lower
|
|
|
|
|
|
HI ,
I want to build Some think like media player
that can play a WMV file n i can also forward n Back it.
any sample ,,, or help code
thanx
|
|
|
|
|
Hi,
Have a ListControl with 2 columns as follows:
1stColumn | 2ndcolumn
*************|***********
CodePage |2
*************|***********
FormFeed |x
*************|***********
LineFeed |y
*************|***********
The 1st Column members for me are Labels that won't change.
The 2nd column,Iam creating different controls depending on the 1st column label.
I have a click event for the listcontrol,in which when a user clicks on a cell on the 2nd column,depending on the 1st column label i have to create different controls.
I know how to create controls,My question here is when the user clicks on the cell,would like to the coordinates,like the column & row in which the cell, he clicked lies.......
Thanks..
|
|
|
|
|
Use CListCtrl::HitTest. LVHITTESTINFO parameter will show you what item and subitem is at the point where the mouse clicked.
Jaime
|
|
|
|
|
|
Hi,
I would like to know how I could parse the exe file (.idata section).
Thanks in advance,
Kavita Fernandes
|
|
|
|