|
Yes... and this command is in the rapi.h file:
<br />
...<br />
#include <ceapimap.h><br />
<br />
#ifdef CONN_INTERNAL<br />
#include <prapi.h> <br />
#endif<br />
<br />
#endif // #ifndef RAPI_H<br />
...<br />
It looks like the eVC++ includes the rapi.h (because eVC++ found it!) but can't find the prapi.h file!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Ok, fair enough.
Are you sure the rapi.h file is not being included by another file. try commenting out the #include line and see what happens then. If it still complains then that line is not your problem.
HTH
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Darn, sometimes something that should be easy gets
complicated. I have a modeless dialog that send
messages to its parent window. These are WM_COMMAND
messages for BN_CLICKED, BN_PUSHED, and BN_UNPUSHED.
e.g.
GetParent()->SendMessage(WM_COMMAND,(WPARAM)(BN_PUSHED<<16|nID),0);
To the parent window's message map I have added the
entries:
ON_CONTROL_RANGE(BN_CLICKED,ID_0,ID_N,OnClickX)
ON_CONTROL_RANGE(BN_PUSHED,ID_0,ID_N,OnPushedX)
ON_CONTROL_RANGE(BN_UNPUSHED,ID_0,ID_N,OnUnpushedX)
However, OnClickX is called to for BN_CLICKED, BN_PUSHED,
and BN_UNPUSHED.
I walked through with the debugger and the correct message
is sent (WM_COMMAND with BN_CLICKED, BN_PUSHED, or BN_CLICKED)
but the wrong handler is invoked. (I stopped short of
trying to walk through the CCmdTarget's use of the
message map (that is some seriously ugly code to walk
through.) in the hope that someone will have some knowledge
here.
Am I doing something wrong? missing something here?
I tried changing the order of the message
map entries in case there was a problem
|
|
|
|
|
Ah, I found the problem.
If I didn't pass the button's window handle in the lParam,
then the CWnd's OnCommand handler, zeros the nCode
parameter, effectively making everything into a BN_CLICKED.
So I need to do:
GetParent()->SendMessage(WM_COMMAND,(WPARAM)(BN_PUSHED<<16|nID),hBtn);
Should I have known that?
(i.e. what purpose does that zeroing serve in OnCommand?)
|
|
|
|
|
Hi!
I have 3 Apps in my project. I would like to create a dialog with 3 buttons so that if I click on the first button the first app is launched. If I click on the second button, the second app is launched...
How can I do this?
thanks for helping..
Regards
Everything's beautiful if you look at it long enough...
|
|
|
|
|
1. find the path to each of your EXEs
2. use CreateProcess, spawn or WinExec to launch them
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
You Again!!
Well it seems that you are always there to answer my questions...;)
Thanks!!
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Hiya how do I check the contents of the recv function in window sockets??
I want to check the contents of the string, char by char.
This is my code so far:
int ret;
CString text;
for( int nReceivedBytes = 0;nReceivedBytes < 255; )
{
ret = recv( sock_Accept,text,255, 0 );
if( ret > 0 )
{
nReceivedBytes += ret;
}
}
Thanks,
grahamoj.
|
|
|
|
|
What do you mean check the contents of the string? Given that your code stores the incoming data into variable text, one solution is to check the CString object via [] operator.
Kuphryn
|
|
|
|
|
Hey all,
I want to get a list of exported DLL functions from a DLL (like Dependency Walker does) - along with each function's entry point.
How do I do that?
Thanks!
|
|
|
|
|
I may be wrong, but isn't the code for the Dependency Walker part of the examples shipped with Visual Studio?
Regards,
Alvaro
There are no stupid questions, but there are a lot of inquisitive idiots. -- despair.com
|
|
|
|
|
As far as I know - no...
I also looked for it on MSDN and couldn't find it.
Any other ideas? :-/
|
|
|
|
|
find some articles about the PE file format(it's the file format of exe and dll ... files).
i found a very nice tutorial at http://spiff.tripnet.se/~iczelion/tutorials.html
have a look at these tutorials, then u just have to code
have fun
|
|
|
|
|
Hey all,
I want to get a list of exported DLL functions from a DLL (like Dependency Walker does) - along with each function's entry point.
How do I do that?
Thanks!
|
|
|
|
|
Hello there
I would like to be able to open files from the left frames (I use Windows Explorer's TreeView style and a RichEditView app)
How could people open files from the tree when they double-click it?
Or how could I create a permanent (not included in each new window) tree control that could be used to open files faster?
|
|
|
|
|
Your question has more to do with design than technique. One solution is add a double mouseclick handler for the tree control. Open the file if applicable.
Kuphryn
|
|
|
|
|
Use a dialog bar for the tree (there are many examples around here), and the sole CRichEditView as an MDI child view.
Regards,
BB
|
|
|
|
|
It crashes in afxwin2,. saying for the postmessage that(IsWindow) isnt true.
Here is my code:
void CTrio::OnClose()
{
<code>
m_pParentWnd->PostMessage(UDM_PHOTO_CLOSED,WPARAM(this),0);
}
CDialog::OnClose();
DestroyWindow();
}
If I add the commented out if., it never goes into it to post.
AFXWIN_INLINE BOOL CWnd::PostMessage(UINT message, WPARAM wParam, LPARAM lParam)
{ ASSERT(::IsWindow(m_hWnd)); return ::PostMessage(m_hWnd, message, wParam, lParam); }
#
Appreciate your help,
ns
|
|
|
|
|
You have your "if (IsWindow" line commented out.
Regards.
Alvaro
There are no stupid questions, but there are a lot of inquisitive idiots. -- despair.com
|
|
|
|
|
I know....but if I put the if in, the messgae NEVER gets posted!! I need to post it!
Appreciate your help,
ns
yet I've posted to the parent successfully with the same pointer elsewhere.....
|
|
|
|
|
Is your parent window still around at this point? If so, use the debugger to check that the value of your member variable is still valid. Perhaps it's getting changed somewhere.
Also, if your parent is going away before the dialog box, and that's OK with you, you may consider moving the code in your message handler to the dialog's class. Another option is to write code in the parent window to close the dialog box before going away.
Regards,
Alvaro
There are no stupid questions, but there are a lot of inquisitive idiots. -- despair.com
|
|
|
|
|
My parent is not going away at all!!!! not before and not after! I'll check the debugger. Thanks.
Appreciate your help,
ns
|
|
|
|
|
This is bizaare, but I had so many classes where I used the parentWnd that in this one I didnt even retrieve it from the CReate() function where it came in as a 'this'. Fine. I see my carelessness that the debugger promptly showed me (thanks A M )
BUT my code compiled with this m_pPArentWnd variable being used but never declared anywhere in the class!!!! I checked several times but I do NOT have an m_pParentWnd defined in this class!!!
Appreciate your help,
ns
|
|
|
|
|
m_pParentWnd is a protected member of the CDialog class. Any class derived from CDialog will have access to this member variable.
See file AfxWin.h line 2639.
HTH
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Thanks!!! I was really puzzled, and when I looked inb MSDN under CWNd there was no such member. Guess I should have searched for it in the MFC folder....
Appreciate your help,
ns
|
|
|
|