|
|
|
Hi,Im using WPF as C# dll in VC++.Im sending datas to the Listbox inthe third tabitem in a tabcontrol by using this coding.
void CToolTab::SendPresetmenu(CString menu)
{
FrameworkElement^ page;
String ^ msg = gcnew String( menu );
Globals1::gwpreset->AddPresetmenu(msg);
page = Globals1::gwpreset;
Globals1::gHwndSource->RootVisual = page;
}
By this code,wat happend is my entire tabcontrol becomes a third tab item.there is not other tabs .
If i commented those last two bolded line.Full tabcotrol appears correctly but the listbox doesnot contain text.
How can i do that?Anu
|
|
|
|
|
Why don't you post it in the appropriate forum [^]?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All
I am using copy command to join two files. It works fine when I am using this in the command prompt
But I want to run this command in the background using vc++. so please tell me how I run this command in the background.
copy /b "first file path"+"second file path" "outfilepath"
|
|
|
|
|
You can use the system function to execute the command.
But it is preferable to use the file operation APIs like CreateFile and WriteFile to achieve the same.
|
|
|
|
|
Thanks for reply
I try system command Its working fine but the command window is show.
I want also hide this command window.
actually i am joining mp3 file so thats why i am using copy command.
|
|
|
|
|
To hide the command window you will have to do a lot more work.
You will need to use CreateProcess to start the command prompt (Cmd.exe) and specifying CREATE_NO_WINDOW in the dwCreationFlags parameter.
If this doesn't work you can set the STARTF_USESHOWWINDOW flag in the STARTUPINFO structure and set its wShowWindow member to SW_HIDE .
The copy command will need to be given as parameter to the Cmd.exe.
Instead it will be easier to use the file APIs like CreateFile and WriteFile .
|
|
|
|
|
Now I tried this
char cmdpath[MAX_PATH] ={0};
cmdpath = "copy /b firstfilepath+secondfilepath outfilepath "
CreateProcessA("cmd.exe", cmdpath, NULL, NULL, FALSE,NULL DETACHED_PROCESS , NULL, NULL, &sInfo, &pInfo);
but this is not joining the file
|
|
|
|
|
cmd.exe itself has some command line parameters that you need to specify to execute internal commands.
|
|
|
|
|
raj1576 wrote: cmdpath = "copy /b firstfilepath+secondfilepath outfilepath "
This will not work. You either need to initialize cmdpath with this string literal, or use strcpy() ."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I dont think its better to use copy command, instead use Copy file API( [^])
Well if you still want to stick with your choice then :-
1. Use CreateProcess
use CreateProcess with second parameter is command line argument([^]), where there is a optional structure STARTINFO([^]), having the wShowWindow to show or hide the window.
2. Use ShellExecute([^])
Eg:-
NT/2k/XP/2k3
ShellExecute( NULL, "open", "cmd.exe /C \"DEL /f /s /q c:\\check\\*\"", NULL, NULL, SW_HIDE );
Win9x
ShellExecute( NULL, "open", "command.com /C \"DEL /f /s /q c:\\check\\*\"", NULL, NULL, SW_HIDE ); Величие не Бога может быть недооценена.
|
|
|
|
|
Thanks for reply
can u explain how i use this copy command use in the shellexecute
copy /b "firstfile.mp3"+"secondfile.mp3" "outputfile.mp3"
|
|
|
|
|
I don't think you can merge MP3 files like that, they both have their own headers describing how is the data encoded (for example, you have 1 mp3 @ 320kbps and 1 mp3 @ 160kbps, what should the file be at the end ?)
You will have to convert that to WAV, and then you will be able to copy one WAV at the end of the other and after that reconvert to MP3 (and loosing precision and data in all the conversions).
M.Watched code never compiles.
|
|
|
|
|
Maximilien wrote: I don't think you can merge MP3 files like that, they both have their own headers describing how is the data encoded (for example, you have 1 mp3 @ 320kbps and 1 mp3 @ 160kbps, what should the file be at the end ?)
That's what I thought too, but then he did state, "I am using copy command to join two files. It works fine when I am using this in the command prompt." "One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
|
I need little software based on this source code to make a new application to do the same but with some modifications.
Check the original aplication and how work here:
http://www.codeproject.com/KB/dialog/wintrans1.aspx[^]
Changes and new features or modifications:
1: Debe ejecutarse de forma oculta, sin ventana ni nada por el estilo, simplemente oculta o puede cargarse en el system tray. Really is better if just run in background.
2: From the command line need:
A- To close the application
B- choose the alpha value from 0 to 255
3: The application must be configured to work directly with a software on my property, not need any software panel like in the example URL
4: from the command line , need another command to make trasparent window can pass mouse clicks through the window, and need other command to stop mouse events pass trought.
Dont know if this is possible.
Here a code example can be usefull
http://www.codeproject.com/KB/vb/Cli...ghWindows.aspx
[^]
-----------------------------------------------------------------------------------------------------------------------------------------------
Aditional to this request, i need a little help with this:
Is possible make exe work like registered aplication to receive WM_TOUCH instead WM_GESTURE mouse events.
Here the documentation.
http://msdn.microsoft.com/en-us/library/dd371581(VS.85).aspx
basically what i need is aplication already compiled can recive WM_TOUCH intead WM_GESTURES
The tool i use for create the aplication just recieve by default WM_GESTURES due no is registered like touch aplication.
If somebdoy want work on this, can directly contactme to:
soporte @ todosaca . com
I can trade the work with lifetime web hosting 1500mb storage, with php, mysql, pop, webmail, stats, etc etc
Severs are quad core or better located in USA.
I hoppe omebody can helpme with this !
Sorry for my not good english my native language is spanish.
Best regards !
|
|
|
|
|
pablomartin wrote: I offer web hosting in exchange for help!
Nah, I would accept just money... If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini f you change of the idea, just tellme please.
Best regards !
|
|
|
|
|
|
Hello,
I created MFC application in VS 2008. In that i write CD using API/function like;
HasRecordableDrive(),GetRecorderDriveLetter(),Burn() methods.
When application run, Burn method will open CD Writing Wizard.
In step 1, CD Name edit box is there, where we can give CD Name. In that user can change the cd name.
I want to set this CD Name through programatically.
How can i set this option programmaticaly?Abhijit
|
|
|
|
|
It is not possible using the ICDBurn interface.
Here is an open source library for CD/DVD creation - InfraRecorder[^]
|
|
|
|
|
Hello Sir,
I download the InfraRecorder.exe and install it.
Now how can i use the API of InfraRecorder in my own application...Abhijit
|
|
|
|
|
|
How to import 2 file .3ds (3dmax7) to VC6 by gl.h
.3ds has got map,aminate simple
Not engine!!
Or export .max to ...?
Have link download tool export for 3dsmax 7 ?
Thanks
Tuan,college 8 Vietnammodified on Sunday, February 14, 2010 10:56 PM
|
|
|
|