|
robert_s wrote:
c:\Documents and Settings\user\My Documents\Prog\Prog.exe %1
Is it correct?
Be sure and put double-quotes around the %1.
robert_s wrote:
its a bit silly to have one long string as it will be a hassel to separate one argument from the other as the are blank spaces all over the place so it will be hard to determine where to split it.
Can you use the CCommandLineInfo class? If not, __argv[1] is always available.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
Is it possible to have a multidimensional CArray (how do you declare it?) or do you have to write one yourself?
tnx for your help.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Yes, it's possible. Something like:
typedef CArray<int, int> intArray;
CArray<intArray, intArray> bigArray;
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
tnx for your reply. At first it seemed to work, but when I actually used it, the "intArray" (the typedef CArray) doesn't recognize the CArray functions like Add, RemoveAll, ...
and
when I add my typedef CArray to the normal CArray, the compiler complains of an illegal use of this type as an expression
Do you also have an answer to this?
tnx for your time!
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
OK found it thanks.
(forgot to make an object of the typedef )
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
I was just wondering how I could get access to the command line arguments in MFC? I know in C it would have been the argv[] parameter in the main, but I don't know how to get that in MFC.
Thanks, David
|
|
|
|
|
toothless boots wrote:
I was just wondering how I could get access to the command line arguments in MFC? I know in C it would have been the argv[] parameter in the main, but I don't know how to get that in MFC.
MAY BE THIS CLASS WILL HELP YOU class CCommandLineInfo
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
toothless boots wrote:
I know in C it would have been the argv[] parameter in the main
You can still use __argc and __argv . From the application object, you have access to the m_lpCmdLine member.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
My Q is for both VS 6.0 and .NET.
One of my projects has up to 50 classes. Is there some way to organize the classes like for e.g. the way I do with files and folders in windows explorer?
Thanks
_____________________________
...and justice for all
APe
|
|
|
|
|
Right-click the project, select New Folder. Name the folder. Start dropping classes into it.
In VS 6.0, the folder structure is stored entirely in the workspace .opt file (.vco if you're using eMbedded Visual C++).
Visual Studio .NET's folder structure exactly matches the on-disk structure. You can't create folders in Class View, but you can create folders in the Solution Explorer. The Class View can be organised by namespace; it represents the logical, not the physical, view of the code. Often it's a good idea to match namespaces and disk folders.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
You mean the way you do with packages in Java?
Thanks
_____________________________
...and justice for all
APe
|
|
|
|
|
I have created a Pagesetup dialog object like this:
CPageSetupDialog psd( PSD_INTHOUSANDTHSOFINCHES | PSD_MARGINS |
PSD_ENABLEPAGEPAINTHOOK, this );
Normally In the Oriantation part in the Setup dialog,defaultly select Portrait checkbox.
But I want to select Landscape check box as a default,when Dialog box appearing.
please send me a reply ,if any one know that.....
thanks...
How to select Landscape button as a default in PageSetupDialog
|
|
|
|
|
how can i connect to usb?
|
|
|
|
|
Ehm, the USB connectors can usually be found at the backside of your computer. They're small rectangular connectors.
If your computer is not equipped with these, it's massively outdated. A remedy is a plugin PCI-USB controller.
If that's not the answer you've hoped for: be more specific when attempting to formulate a question.
What do you want to do by what means?
|
|
|
|
|
I mean how can i send data through usb using c++
|
|
|
|
|
If you are using winXP or 2000 you are going to have to use a kernal mode driver to do the middle man work. I suggest you get a Cypress EZ USB board to learn on.
/\ |_ E X E GG
|
|
|
|
|
how can we understand a process request a socket
is there any message and if there is wich messages
koosha
|
|
|
|
|
koosha qaffari wrote:
how can we understand a process request a socket
is there any message and if there is wich messages
REALLY I AM VERY SOORY I CAN'T UNDERSTAND WHAT YOU HAVE WRITTEN,IF YOU KNOW HINDI,PLS DESCRIBE ME IN HINDI MAY BE I KNOW ANSWER TO YOUR PROBLEM
-----------------------------
"I Think It will Work"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Have I got this scheme right for running a scripting batch file from my program.
The program that is associated with the batch file is CSL.EXE and the following procedure will run when the selected TreeView file is double clicked:-
void CScriptingDlg::OnNMDblclkTree1(NMHDR *pNMHDR, LRESULT *pResult)<br />
{<br />
BOOL bSuccess = FALSE;<br />
SHELLEXECUTEINFO sei;<br />
ZeroMemory(&sei,sizeof(sei));<br />
sei.cbSize = sizeof(sei);<br />
sei.hwnd = AfxGetMainWnd()->GetSafeHwnd();<br />
sei.nShow = SW_SHOW;<br />
sei.lpFile = m_strPath.GetBuffer(m_strPath.GetLength());<br />
sei.fMask = SEE_MASK_INVOKEIDLIST;<br />
bSuccess = ShellExecuteEx(&sei);<br />
m_strPath.ReleaseBuffer();<br />
}
m_strPath is the full path name of the batch file; e.g. C:\Work\ABC.CSL.
The reason for this post is, if I double click a CSL batch file (i.e. C:\Work\ABC.CSL) from Window Explorer the CSL program runs OK, but if I do the same from within my program a DOS Window appears for a second then closes. The batch files appears not to have run.
So is this the correct way to do this?
Sweep123
|
|
|
|
|
sweep123 wrote:
sei.fMask = SEE_MASK_INVOKEIDLIST;
Per MSDN:
The lpIDList member must point to an ITEMIDLIST structure.
sweep123 wrote:
bSuccess = ShellExecuteEx(&sei);
What is the value of bSuccess ? If it is FALSE , what does GetLastError() return?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
The code was lifted from the FileTreeCtrl sample on the code project site.
http://www.codeproject.com/wtl/wtlfiletreectrl.asp
When I place a breakpoint at the statement:-
m_strPath.ReleaseBuffer();
The bool is 1 and last error is zero.
Both this sample and my version are able to run up Notepad when double-click on a txt file. An image editor will run up for bitmaps.
But neither runs the CSL program associated with the ABC.CSL file.
|
|
|
|
|
While I doubt it's related to the problem at all, the calls to GetBuffer() and ReleaseBuffer() are not necessary.
What value are you assigning to lpVerb ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
If I use
sei.lpVerb = "open";
then the files is opened with QuickView and that includes .txt and .log files.
The code does not generate any erros, just dont seem to be able to run the program CSL.EXE in the correct manner with this code.
As I said if I use Windows Explorer then the CSL.EXE runs OK with the selected file.
Any ideas?
Sweep
|
|
|
|
|
when i click on ListCtrl Itelm ,, its background colur is turned to blue ,
after that
when i click to an other control ... previusly Clicked ListCtrl Items background colour disaapear ,, and i not know at thia stage at which item i was clicked ,, i want to Highlight it ,, with any way ,, as in windows it change its colour to Grey,,,
any tip .. or way
thanx.
Actualy ,, it makes easy the user to see that he clicked on this item last time
thanx
|
|
|
|
|
Can you use the LVS_SHOWSELALWAYS style?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|