|
I need a windows based RTOS simulator(include source), any clues?
|
|
|
|
|
I have an application, prog B, that starts minimized.
Another program, let's say winamp, currently has the focus.
My program - prog B should be able to retrieve the .exe name based on whichever application that currently has the focus, in this case, winamp.
I'm not sure how to go about and tackle this problem. Can somebody please help me out?
Environment - Windows 2000
Thanks in advance,
|
|
|
|
|
Search for GetWindowModuleFileName on MSDN, it should work only on Win2000 though.
You may use it with GetForegroundWindow to retrieve the exe filename associated with the current foreground window.
Cheers,
Paolo.
|
|
|
|
|
If you want to track application's exe name based on current focus, I recommend you write small DLL to hook some events. You may need to hook couple of them like WH_CBT and WH_SHELL using SetWindowsHookEx(). From my experience, you need serious testing to make sure your DLL is really tracing focus movement. There are many ways to move focus to another application and covering all of them may need long time work.
Once you have that DLL that will attach itself to exe by hooking function, then the filename of that exe can be obtained by GetModuleFileName(). Even if GetModuleFileName() won't work right for some application, you can use very powerfull ToolHelp32 functions to;
1 enumelate all processes
2 find process ID that matches what GetCurrentProcessId() returns
Just for your info, if you unfamilier with DLL which attaches itself to exe by SetWindowsHookEx(), then take a look at Matt Pietrek's article MSJ No 12 Vol 6 (MouseWheel.DLL).
Have fun!
reiko
|
|
|
|
|
Hi, I have built a SDI by using MFC, and I just follow the instruction
from MS help
A class was added to the project, and the control was dynamically created in the OnCreate handler of the application's View class.
CRect rect;
GetClientRect (&rect);
// Create the control.
m_pBrowser = new CWebBrowser;
ASSERT (m_pBrowser);
if (!m_pBrowser->Create(NULL,NULL,WS_VISIBLE,rect,this,NULL))
{
TRACE("failed to create browser\n");
delete m_pBrowser;
m_pBrowser = NULL;
return 0;
}
// Initialize the first URL.
COleVariant noArg;
m_pBrowser->Navigate("www.microsoft.com",&noArg,&noArg,&noArg,&noArg);
return 0;
But the program runs without anything. Can anyone give me some
suggestions? Thanks!
|
|
|
|
|
The first parameter to Navigate must be a BSTR. You're using a plain string. Change it to _bstr_t("http://www.microsoft.com")
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
Does anyone have or know of any code source that allows interaction between a server running 2000 and the banking/credit card processing centers.
I am planning to intergrate, in addition to the normal credit card transactions, a debit card option for those of us that don't want to, or can't use their Credit Cards so any code that I could use or rework to build up my application would be greatly appreciated.
Thanks.
|
|
|
|
|
Hi
How can i get the word under the mouse pointer in webbrowser
control,with any event (mouse over,...)?
(in vb or vc)
tnx
|
|
|
|
|
|
How to send and receive files through multicast file transfer using windows media server through V++.
m prabagar
|
|
|
|
|
I have a program that can be run as an NT Service or as a Win32 application. Is there any way to tell whether the program was started by the Service Control Manager or by a user (ie. double clicking an icon). The only difference I can find at the moment is in the STARTUPINFO details. When the program is running as a service the wShowWindow field is set to SW_HIDE and when the program is running as a Win32 Application the wShowWindow field is set to SW_SHOWNORMAL. Can anybody provide any info?
Thanks for any help you can give.
Steve.
|
|
|
|
|
I need help to solve one playlist program using linked list.Please help me as its very important for me.
Dee
|
|
|
|
|
The STL list template is the easiest and most portable way to handle linked lists in C++.
|
|
|
|
|
here's the link for it:
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&select=35902#xx35902xx
thanks
|
|
|
|
|
Hi,
Looking for any sort of code that would popup a small message to the user. The msn messanger has a really good one, when you have new mail at your hotmail account, or you receive a message from somebody new.
I want to have an app that polls a remote app(via Internet) and when it picks up a string message from the remote server, it displays it on the desktop of the client.
|
|
|
|
|
Hello all,
Most of you must have seen a double-ridged splitter bar like in vc++ ide.
how do I draw such a bar?
Hush..Hush.. thought I heard you calling my name now...
|
|
|
|
|
|
Hello
How do i find the "default" font and height of the HeaderCtrl in a ListCtrl.
Kind regards
Henrik
|
|
|
|
|
If you create a hidden ListCtrl you can use GetWindowRect() to get the dimensions of the header control and GetTextMetrics() to get the font details.
Hope this helps.
Steve.
|
|
|
|
|
I have two Dropdown listboxs and one grid
I select something from the first list and the second list will have new selections and after I select something from the second list the Data in the datagrid will change, all this without moveing from one page to another, it all has to happen in one page DYNAMIC!!
What is the simplest way on doing it?
DHTML,ASP.NET,ASP or ActiveX
I need a sample and some source code PLEASE!!
|
|
|
|
|
Does anybody have (or know of) a CCheckListBox control for WinCE? It can be either open source or commerically available. Thanks in advance.
|
|
|
|
|
Does anyone know how to make menus in a skinned mfc application. I am looking into doing this but I have no idea where to start or how to go about doing this. The menus in ICQ is a good example of what I am looking to do. A menu that can be activated by a button would be the proper terminology. If anyone can help me on this, or has done something of this sort could you please send me the code to do so?
Thanks in Advance
|
|
|
|
|
Look in the Button and Menu sections here. There are articles about creating buttons that show popup menus.
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
I am doing my project in C. I have a table in Oracle. I want to access that oracle table in my C program. Pls tell me how can i connect the oracle database with C.
|
|
|
|
|
With just C, your choices are limited as to how to do this. I have used embedded SQL in the past and this worked amazingly well, but requires the use of the Pro*C Pre compiler that translates the embedded SQL into C code that links with the OCI. You can also try to write to the OCI, but this is not for the faint of heart. It requires a high degree of patience. You can also write using the ODBC API, but this again requires a high degree of patience in order to get it working. I unfortunately do not have any examples to provide you with assistance, cause all my stuff is C++ now. Sorry. If you have a valid Oracle support agreement, you can try searching at their MetaLink support site. There should be some examples available from there to help you out.
Chris
|
|
|
|