|
hi i am a fresher for WinCE and i am using createprocess to run one winceplayer application
once the commandline in the create process gets executed i want another files on the row to be executed
could anyone please help me in this regard
CreateProcess(_T("\\windows\\ceplayer.exe"),_T("c\\folder\\new.wmv"), NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, NULL, &processInfo);
once new is done i want next.wmv to be run
Thanks in Advance
|
|
|
|
|
Do you want to play the file one another?
then, createprocess will not help. Bcoz, createprocess WinAPI will trigger the command to the Windows Message Queue and it will come out. Application will not wait to process completed and it will execute next statement
Sethuraman.K
|
|
|
|
|
Sorry for the misguide. Mentioned earlier for ShellExecute not for CreateProcess.
Sethuraman.K
|
|
|
|
|
Thank u sethuraman.k,
Do you have any idea regarding my issue of playing the files in a row if yes guide me in this regard.
and
could you please tell me how to get the handle to the windows that have been created from createprocess(winceplayer).
so that i can use that handle to close the respective window
|
|
|
|
|
I am not sure but u just try with PROCESS_INFORMATION structure. For you "processInfo".
processInfo.hProcess contains handle to the newly created process.
Sethuraman.K
|
|
|
|
|
Just try this:
HWND hwnd;
STARTUPINFO si;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
PROCESS_INFORMATION pi;
ZeroMemory( &pi, sizeof(pi) );
if( !CreateProcess(NULL,
"C:\\Program Files\\Windows Media Player\\wmplayer.exe",
NULL,
NULL,
FALSE,
CREATE_SUSPENDED,
NULL,
NULL,
&si,
&pi ) )
{
TRACE("CreateProcess failed");
}
else
{
TRACE("CreateProcess sucess");
}
hwnd = (HWND)pi.hProcess;
ShellExecute(hwnd, "open", "d:\\del\\Dancingbaby.avi", NULL, NULL, SW_SHOWNORMAL);
TRACE("sucess");
Sethuraman.K
|
|
|
|
|
Hi Sethuraman,
I am using create process function to open a jpg file using ie in WINCE...
CreateProcess(_T("\\windows\\iesample.exe"),imFullPath, NULL, NULL, FALSE, NULL, NULL, NULL, NULL, &processInfo1);
where imFullPath is the path for a jpg file.
For opening the next jpg file,i am using create function() onemore time.
Also it is opening in a new window.
I want to open all jpg files in the same window.
|
|
|
|
|
#pragma comment(lib,"Shlwapi.lib")
I personly think the code above is to load a "dll" file。Am i right or not?
Any one can help me and explain it to me,
thanks.
Besides, i am not good at English, and if there is any grammar mistake,Please point it out directly.
thanks again.
|
|
|
|
|
The following pragma causes the linker to search for the Shlwapi.lib library while linking. The linker searches first in the current working directory and then in the path specified in the LIB environment variable.
|
|
|
|
|
#pragma comment(lib,"Shlwapi.lib")
code will link the lib file at compile time. It never look dll at compile time. This type of linking called static linking.
Instad of this code you can add ur lib file(Shlwapi.lib) into
Project-->Settings-->Link-->Object/Library Modules-->
Shlwapi.lib
Sethuraman.K
|
|
|
|
|
Sethuraman.K wrote: you can add ur lib file
Ur[^] is an ancient Sumerian city. Is it a lib file as well?
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Iain Clarke wrote: Ur[^] is an ancient Sumerian city. Is it a lib file as well?
Yes, you need it in order to link with the Hammurabi code [^].
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 want to stop highliting property of button control.
i want button not highlits when its get or set focused.
only border is displayed when its get focused.
please tell me how can i do this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
I don't think you can, without going the owner draw route, and doing lots of work.
But what can *can* easily do, is use a static control with the SS_NOTIFY style turned on, and handle the WM_COMMAND/STN_CLICKED that it send you.
Same clickability, less graphic goings-on.
Good luck,
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Why you didnt use of owner draw?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
please can u explain me with example.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
For Owner draw Chris Maunder has a good article about it(on the codeproject) and I suggest you see it but for buttons Custom Draw Buttons & A Smarter Groupbox[^] (A class to make working with radio buttons easier, and another for custom drawing buttons )
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Thanks all!
void fun()
{
string str;
str = ???;
cout << str << endl;
}
void call()
{
fun();
}
modified on Wednesday, February 25, 2009 2:19 AM
|
|
|
|
|
The __FUNCTION__ macro will give you the function name.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I've just learned something today - and it's before 9am! I can now close my mind to further information, as I have to ration these things.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
You can see more info about macro's(LINE,..) on the www.functionx.com and www.cplusplus.com.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I suppose __FUNCTION__ would expand to "foo" while he's looking for "call" (i.e. the caller function name).
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]
|
|
|
|
|
Check this[^] out, but note that -as far as i know- these only work with debug information present, but i might be wrong.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
The easiest way is to require the calling function to pass in its name, which it can get with __FUNCTION__:
void fun(const char* callerName)
{
string str;
str = callerName;
cout << str << endl;
}
void call()
{
fun(__FUNCTION__);
}
<div class="ForumSig">Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p</div>
|
|
|
|
|
In RequestDeviceNotifications to detect USB Device, i am using FSD_MOUNT_GUID option to get two drives present on system namely:
1. \Disk (COMPACT FLASH TRAY)
2. \USBDisk(USB Device)
both of them are removable drives i.e one is FLASH TRAY which contain (.bin
files) for Window CE and other is USB Device. Is there is any way to know
there device type? My aim is to store only USB Drive names in list.
Note: both of them are removable. i am using Window CE 5.0
thanks,
priyank
|
|
|
|