|
In your command line do the following:
c:/> start /B batchfile.bat
(where you replace "batchfile.bat" with the name of your batch file).
The syntax is stated at the top of the help.
Phil
|
|
|
|
|
Have u tried
WinExec ( "C:\\File.bat", SW_HIDE);
|
|
|
|
|
|
What abt
ShellExecute ( hwnd, "open",
"C:\\File.bat",
NULL, NULL, SW_HIDE );
or
ShellExecuteEx Function
|
|
|
|
|
|
I have an batch file.that call one exe.when i run the batch the console window is displayed.how to hide this.
|
|
|
|
|
But if you use of DestinyDrive answer (ShellExecute) it will be work,did you try it?
|
|
|
|
|
|
In other programming languages such as Visual Foxpro I have to write only
loObj = CreateObject("InternetExplorer.Application")<br />
loObj.navigate2("www.google.com")
and I have an object of IE at google page and I can do with it what I want.
How can I do this in C++ by easy way ?
I am beginner, I am using VS2005 and pure C++, no .NET, no ATL
|
|
|
|
|
Actually, if you are a beginner, there is no easy way especially without ATL. This article should get you started: http://www.codeproject.com/com/com_in_c1.asp[^]. This article actually deals more with creation rather than usage. However, I believe you need to understand the process from creation to employment to actually use COM/OLE in C++ correctly. Some may disagree with this but this has been my experience.
Good luck.
-- modified at 21:55 Tuesday 10th April, 2007
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
do u use MFC? if yes, u could use CHtmlView which wraps WebBrowser control.
life is like a box of chocolate,you never know what you r going to get.
|
|
|
|
|
Hi All,
I have created a sample workspace using Microsoft Visual C++ .Net( Version 1.0). I could compile the programe successfully but when i am trying to debug/run the programe i am getting the following error.
Unable to Start Debugging. Access is denied. Verify that you are an administartor or member of "Debuggers user group" on the machine you are trying to debug.
Please let me know if any one have solution to overcome this problem.
Thanks
Nalla
|
|
|
|
|
Taking a wild guess here but you might try making your account a member of the "administartor" or "Debuggers" user groups.
|
|
|
|
|
Does anyone know about a free command line utility to convert pdf file to a multipage tiff?
Best regards,
A. Riazi
|
|
|
|
|
I am wanting to create a a tree using a quad with a bitmap...
how can I make the quad transparent for black color and display the rest..
and just displaying the tree portion of the quad?
like creating sprites..
LoadTexture("tree.bmp",/*trans color*/ D3DCOLOR_XRGB(0,0,0));
here is the funtion were I load the quad texture...
QUAD *CreateQuad(char *textureFilename)
{
QUAD *quad = (QUAD*)malloc(sizeof(QUAD));
//load the texture
D3DXCreateTextureFromFile(d3ddev, textureFilename, &quad->texture);
d3ddev->CreateVertexBuffer(
4*sizeof(VERTEX),
0,
D3DFVF_MYVERTEX, D3DPOOL_DEFAULT,
&quad->buffer,
NULL);
quad->vertices[0] = CreateVertex(-1.0f, 1.0f, 0.0f, 0.0f, 0.0f);
quad->vertices[1] = CreateVertex( 1.0f, 1.0f, 0.0f, 1.0f, 0.0f);
quad->vertices[2] = CreateVertex(-1.0f,-1.0f, 0.0f, 0.0f, 1.0f);
quad->vertices[3] = CreateVertex( 1.0f,-1.0f, 0.0f, 1.0f, 1.0f);
return quad;
}
or attach a sprite to it?
what I am trying to do is make a 2d object look 3d by rotating a sprite every time the camera moves and attaching the sprite to a quad to rotate the view?
any ideas on how to do this?
|
|
|
|
|
Topics that might help you search for samples are "chroma key" for the transparency aspect and "billboarding" which simulates 3D by rotating an object so that it is perpendicular to the camera.
Good luck.
|
|
|
|
|
I am having some problems with the editing of wma tags. I have a program that I created that will convert files from one format to another. I have implemented the WMA functionality using the WMF sdk and it is working well. But one problem that I have is when I try to use IWMHeaderInfo3 to add the title to the wma header (similar to ID3 tagging in MP3 files), I have found the title shows strange characters instead of the actual title.
I am performing the necessary functions: open, QueryInterface, AddAttribute (and I tried SetAttribute), BeginWriting, and EndWriting. Per the MSDN documentation, I am doing everything in the correct manner. The conversion works but the actual tagging does not. Here is the actual AddAttribute call:
pHdr->AddAttribute(0, L"Title", &wDummy, WMT_TYPE_STRING,0,
(LPBYTE)&strValue, sizeof(WCHAR) * (strValue.Length() + 1));
Any ideas?
|
|
|
|
|
Al_Pennyworth wrote: when I try to use IWMHeaderInfo3 to add the title to the wma header (similar to ID3 tagging in MP3 files), I have found the title shows strange characters instead of the actual title.
Shows where? How are you looking at the resulting attribute? What strange characters?
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Wait...what type is strValue? Looking at it again, this cast looks really suspicious:
(LPBYTE)&strValue
If it's a CString, try
(LPBYTE)(LPCTSTR)strValue
*edit* never mind. CString doesn't have a Length() method. Regardless, you'll need to pass a <br />
pointer to a NULL-terminated Unicode string.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
|
|
The other posts are right - you need to pass a real Unicode string, not a pointer to a string wrapper object.
|
|
|
|
|
I have been offline for a bit so I wasn't able to answer any questions.
The strValue that is being used is CComBSTR so it is not a CString.
Where I am seeing the awkward values is in WMP, WinAmp, other media players, and in Explorer. It is displaying the box character for the length of the title.
|
|
|
|
|
Try
LPCWSTR pUnicodeStrValue = OLE2CW(strValue);
pHdr->AddAttribute(0, L"Title", &wDummy, WMT_TYPE_STRING,0,
(LPBYTE)pUnicodeStrValue, sizeof(WCHAR) * (wcslen(pUnicodeStrValue) + 1));
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
CComBSTR has an operator BSTR which gets you a pointer to the wrapped BSTR , so use that. Instead of (LPBYTE)&strValue use (LPBYTE)(BSTR)strValue
|
|
|
|