|
but man how are you running your application I mean what parameter is it run by.
You shoul write a registry key for this. I have a program on code project that uses this function GetCommandLine ("Little Audio Player" by euacela)
you can easily see there how to use getcommandline function. the program uses it to load a playlist just like winamp. Just by clicking on the playlist the program starts up and loads it.
gabby
|
|
|
|
|
Hi~ I'm Korean.
I can't write English..also can't read.. sorry.. ^..^
I want simple messenger source..
It will use for study of programing..
Where is a reference room in CodeProject..?
I can't find it..
Please..help me..
e-mail : larc21c@hotmail.com
^^;
|
|
|
|
|
Been busy with common controls and implemented a trackbar
(At last..it works fine !)
As I have limited skills in programming, I looked into MSDN and wonder how I can implement the buddywindows that are by default assigned to both ends of the trackbar...?
I'd like these to show two icons..I have to work with the TBM_GETBUDDY and TBM_SETBUDDY Messages but I don't know how to proceed.
Another thing is: whenever I click in the trackbar area ,a dotted line (probably the bounding rectangle) appears around the trackbar. Does anyone know how to prevent this? Should I send WM_KILLFOCUS messages or something?
Ok, enough questions. Any help would be greatly appreciated.
|
|
|
|
|
When IE downloads an exe file, it checks its signature. Does anyone know how to verify exe signature from our application ? that is, can someone help me find the source code/api to the signature verification tool ?
thanks a lot
Hari
Hari Krishnan
|
|
|
|
|
|
thanks a lot Mike, I'll check it out.
Hari
Hari Krishnan
|
|
|
|
|
Is there any such api which enlists the devices on the computer or WMI SDK is the only option.
Please give a name of the book which explains a the WMI .
A line of code is worth thousand words .If u have got such a code which enlists the devices on the computer i will be obliged.
|
|
|
|
|
Use the setupapi to enum and configure installed device drivers. It might be easier than WMI.
Don't try it, just do it!
|
|
|
|
|
Hi,
I am developing an application in VC++ in which i need to set the date and time of the System in which my application is running.
Please provide me some ways by which System date and time can be set from VC++ Application
Thanks in Advance
R.Gopalakrishnan
|
|
|
|
|
|
hi,
I am using,winsnmputils.exe for get and getnext, now i want to set snmp can u plz help me how to write the code for set.
narasimha varma p
|
|
|
|
|
how to do socket pgming using multi threading???
|
|
|
|
|
Search cp, there are lots of articles.
Don't try it, just do it!
|
|
|
|
|
I have a project on code project just to help you.
- Network Administrator by euacela
i use mutithreading to do it and winsock ofcourse
gabby
|
|
|
|
|
Hello Every Body,
I am facing problem to allocate the global memory to string, which i am going to use with WM_GETTEXT msg during interprocess communication to get text from edit box of another application.
Thanks very much.
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Hi,
what do u mean exactly?
SkyWalker
|
|
|
|
|
Hello Sir,
actually i amn't able to use GlobalAlloc and other heap related function, I requires a good reference for that, MSDN is no help till now.
Sir,if you know any link related to memory managment,etc please refer it to me......
I am very much Thankful to u for your reply!!!
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
|
|
|
|
I am developing a computer monitoring application (client /server), in which the client will send the information about its current devices to server by using an api ( or the server will try to know the devices of client by envoking an api)
Do you know of any api , which lists the devices on a computer? I tried GetCurrentHwProfile ( ) , it fetches the "profile file" which contains the information about the devices configuration.
While seraching MSDN i came across WMI SDK (but it uses VBScript) ? will it be good .Considering the half the program will be using C (GetUserName() api) and half of the program will be using VBScript.
Please help me out!!
Thanks
|
|
|
|
|
You can find this information in the Setup API[^] functions. Be aware that these are not available in Windows 9x/ME.
Software Zen: delete this;
|
|
|
|
|
Here is my worker thread that I create ever 100ms in the OnTimer() function, it works but uses 97% of the cpu. Any help would be appreciated.
POINT pt; // Global for GetMouseProc & OnTimer.
UINT GetMouseProc(LPVOID pParam)
{
HWND hwnd = ::GetDesktopWindow();
::SetCapture(hwnd);
::GetCursorPos(&pt);
::ReleaseCapture();
::ExitThread(0);
return 0;
}
void CColorTakeDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
HWND m_hwnd = ::GetDesktopWindow();
CString str;
// =======================================================================
// Get the mouse pointer position and display it
// =======================================================================
DWORD ExitCode = STILL_ACTIVE;
HANDLE m_hThread;
if(pThread == NULL)
{
pThread = AfxBeginThread(GetMouseProc, this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED, NULL);
pThread->m_bAutoDelete = FALSE;
m_hThread = pThread->m_hThread;
}
pThread->ResumeThread();
while(ExitCode == STILL_ACTIVE)
{
::GetExitCodeThread(m_hThread, &ExitCode);
}
delete(pThread);
pThread = NULL;
str.Format("X: %d, Y: %d", pt.x, pt.y);
m_mouse.SetWindowText((LPCTSTR)str);
Old dog learning new tricks!
|
|
|
|
|
Roger65 wrote:
while(ExitCode == STILL_ACTIVE)
{
::GetExitCodeThread(m_hThread, &ExitCode);
}
This is what is taking up the CPU time. If you really need a seperate thread here (doubt it) then you are better off using events and calling WaitForSingleObject() on that event. Even better would be to set the threads m_bAutoDelete member to TRUE and wait on the thread handle.
Check out http://www.codeproject.com/threads/usingworkerthreads.asp[^], especially the section entitled "Thread Shutdown Without Polling".
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|