|
Messenger
Ant.
|
|
|
|
|
..Oh BTW if you are looking for service names:
1) Open RegEdit
2) Look under the registry key
HKLM\System\CurrentControlSet\Services
You will find them all listed in there.
Ant.
|
|
|
|
|
thx very much
;)
sdfsdfffffffffffffffffffffffasdf
|
|
|
|
|
Hi all,
I have a program written in Delphi that broadcats a window message.
I have manage to read this message using Delphi code using the RegisterWindowMessage function, Delphi's TApplicationEvents component OnMessage function with great succes.
Now I want to read this same message using my beloved Visual C++ code.
Where do I start?
Thanks
|
|
|
|
|
louis wrote:
Now I want to read this same message using my beloved Visual C++ code.
Just provide a message handler for the message that is being broadcast. Put the handler in between BEGIN_MESSAGE_MAP() and END_MESSAGE_MAP() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thanks,
I have done so. That part works.
I am still not able to update my listview with the new data. The program gives an application error.
One more question. How do I read the handle of the application.
Thanks again.
Cheers
|
|
|
|
|
louis wrote:
I am still not able to update my listview with the new data.
What does the code look like that is doing the updating?
louis wrote:
The program gives an application error.
And that error would be?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I start a process using:
PROCESS_INFORMATION ProcessInfo = {0};
STARTUPINFO StartupInfo = {0};
bResult = CreateProcess(NULL, pszCommandLine, NULL, NULL, TRUE, 0, NULL, NULL, &StartupInfo, &ProcessInfo);
I then wait for it to finish using:
nNum = WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
After I'm sure the process has finished I use:
DWORD nExitCode=0;
GetExitCodeProcess(hProcess, &nExitCode);
The call always succeeds and on most platforms gives the correct exit code. However, on Windows 98 the exit code is always 0. No matter what the executable specified in pszCommandLine actually returns.
To test this I used a very simple Win32 console application (that just exits with an error code other than 0) as my process.
Does anyone have any ideas why GetExitCodeProcess might always give the 0 exit code on windows 98?
|
|
|
|
|
check if GetExitCodeProcess returns a nonzero value. if not, then GetLastError!
Don't try it, just do it!
|
|
|
|
|
i have added the lib file to Object/Library modules: but when i compile the project i am getting this error LNK2001: unresolved external symbol _Px_SetOutputVolume i am not sure why this is happening any ideas how i should deal with this?
thanks
|
|
|
|
|
Are you using the correct .lib file that contains Px_SetOutputVolume() ?
Have you searched MSDN for LNK2001 and all the many reasons that can cause it?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
there are many possibilities for this error, but the most common ones are these:
1. the function is not included in the lib file
2. the declaration of the function does not match with the definison by the linker
Don't try it, just do it!
|
|
|
|
|
nopes still no luck in getting it working
anyways thanks for your help guys...
anyways downloaded the library and code from
if anybody can download it from http://iaxclient.sourceforge.net/iaxcomm/iaxcomm-win-20040228.zip
and give me some tips of using it in Visual C++ i will be greatfull..
its basically a open source softphone library using IAX protocol..
the library compiles ok...i just cant seem to be able to use the library in my other projects.
Thanks
|
|
|
|
|
might be also that .lib is not included check lib path.
|
|
|
|
|
when he gave the command of using the lib, then the linker gives an error message if it doesnt find the lib.
Don't try it, just do it!
|
|
|
|
|
How to map array of CButtons to button resources on Dialog form?
|
|
|
|
|
Have you looked at CMap ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I looked in MSDN, but I'm not quite sure if I know how to use it in this case.
|
|
|
|
|
dart13 wrote:
I looked in MSDN, but I'm not quite sure if I know how to use it...
"It" being MSDN or the CMap class?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
It being CMap. Sorry for misunderstanding.
|
|
|
|
|
Something like:
CMap<int,int,CButton*,CButton*> mapButtons;
mapButtons.SetAt(123, &m_btn1);
mapButtons.SetAt(456, &m_btn2);
mapButtons.SetAt(789, &m_btn3);
CButton *btn;
BOOL bFound;
bFound = mapButtons.Lookup(123, btn);
bFound = mapButtons.Lookup(234, btn); Think of a map as a cross-reference.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thanks for your help, but shoudn't DoDataExchange() be in some way involved in this?
I have an array CButton btns[10] that need to be 'connected' to 10 buttons on a dialog form. If I use ClassWizard (Member Variables) I can map each button with a single CButton variable, but it doesn't allow me to use btns[0], for example, as a name of a variable.
|
|
|
|
|
You can bypass ClassWizard and code assignments in DoDataExchange by hand. Just leave your 'manual' assignments out of the special code section delimited by
//{{AFX_DATA_MAP(<dialogclassname>)
//}}AFX_DATA_MAP
I do this all the time for custom DDV routines not built into ClassWizard or to make special assignment like you need.
You can try:
//{{AFX_DATA_MAP(<dialogclassname>)
//}}AFX_DATA_MAP
DDX_Control(pDX, ID_BTN_0, btns[0]);
DDX_Control(pDX, ID_BTN_1, btns[1]);
...
And that should work.
ClassWizard is the only thing that requires each button variable to be a separate member variable, the DDX_Control function does not care.
|
|
|
|
|
thanx for your help. I appreciate it.
|
|
|
|
|
That's a good start, but I need to know how then do I map all of the buttons in the array to call a single function when clicked that can tell which button was pressed.
Basically, my problem is this: I am writing a little program for testing very simple math. The program puts up a simple math problem such as "2 + 1 =", and the user is to press a button with the correct number as the answer, in this case "3". There are several of these buttons. Each should call essentially the same routine which just checks to see if the number on the button is the correct answer or not. How do I set these up as an array such that pressing any of them calls this one function with an Index in the array so that I know which one was pressed?
I'd sure like to avoid having a separate function for each of these buttons because I'm planning on having about 20 of them.
Thanks.
|
|
|
|