|
I actually was using UpdateWindow(), but I think I might have found the problem although it's hard to tell since it happens rarely. In your opinion do you think the application got 'stuck' because I called EndDialog for the modal dialog box first (which is the parent window of the WaitDlg (the one that gets 'stuck') and then called DestroyWindow? I noticed this this afternoon and though maybe in some way that if the parent window was destroyed first the second one is left there hanging, like an orphan where most of the times windows takes care of it but sometimes leaves it in the gutter mmm?
|
|
|
|
|
Hi,
I have an ActiveX control, with the source code, I use it in my application ( it uses un ugly wrapper, with calls like raw_(...)).
What I would like to do is to be able of going to the source code of the ActiveX when debugging... is there anyway to do that ?
( or I have to start the DLL in another Visual Studio waiting for a server to activate it ?).
Thanks in advance, greetings
Braulio
|
|
|
|
|
You have to start second instance only if it is outproc and you use VC6.
1. VC6+outproc - wait until Your program instantiates control than attach the second instance of DevStudio to the process of your control(menu Build->Start Debug->Attach To Process).
2. VC7+outproc - wait until Your program instantiates control than attach the studio to the process of your control(menu Debug->Processes).
3. inproc - in both cases it is just normal debugging
|
|
|
|
|
What does a user’s computer have to have in order to use MSChart if I include it in a program? Can I distribute these items with my program?
I have searched MS website but no solid information.
"Best file compression around: DEL *.* = 100% compression."
<><><><><><><><><><><><><>
Matthew R. Miller
mattrmiller@computersmarts.net
www.computersmarts.net
|
|
|
|
|
If it's MSChart, the Active-X COntrol that comes with VS6, I think it's redistributable. I forget the ocx or dll it's in, but if you do a dependancy trace you can find it. I think it is self registering too, but I'm not sure.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I have to create a Visual Studio Installer Project
in order to install my application (a single executable file)
and a Freeware Tool (as in example Acrobat Reader).
I can't find the way to let the Freeware Tool installation
executable file to be launched by the Visual Studio Installer Project
(during the installation of the mine application)!!!
Which settings have I to do in my Visual Studio Installer Project?
Thanks a lot !!!!
|
|
|
|
|
Anthony B. wrote:
Visual Studio Installer Project
in VS .Net? try posting in the .net forum.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
hi all,
I have heard that you must use an dll for the windows keyboard hook apis to work in Win2000/XP in a global state, is that correct? If so then why?
Is there any other way to "hide" or prevent applications from recieving keystroke messages? If so then how?
Does hotkey apis prevent messages and must they always use combined keys like ctrl+..., alt+... or shift+...?
I thank you for any reply
Aidman » over and out
|
|
|
|
|
In order to have system-wide keyboard hooking, you should work with SetWindowsHookEx win32 API.
Your code should be a dll since the operating system injects the dll to every running process.
|
|
|
|
|
hi,
I need to send to a serial port a char*.
I am accepting the data through an edit box ==> CString.
I tried to convert the string through lstrcpy( )
from CString to char*, but when comparing the char* string whith an "identical" char* I got NULL. I had in both strings '\n' .
thanx
Moshe
|
|
|
|
|
Try:
CString s = "Test";
char* ch = static_cast<char*>(s.GetBuffer(0));
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I tried the following:
CString s = "Test";
char* ch = static_cast<char*>(s.GetBuffer(0)), *test="Test";
int d = ( ch == test);
ch = test;
d = ( ch == test );
the first d is 0 and the second 1. so the arn't really equal
even though they seem so!!!
|
|
|
|
|
citroen wrote:
the first d is 0 and the second 1. so the arn't really equal
even though they seem so!!!
NO! NO! NO!
don't confuse yourself! Read my article on Pointers[^] and you'll see why ch != test. Actually, they'd better not be equal!
Download the demo project, and go over the article. It will hopefully enlighten you! I understand how confusing it can be at first, trust me.
Let me know what you find out, and tell me why they are not equal.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
First, thanx.
It works.
so they will be equal I should have written:
*ch==*test; to dereference them.
thanx again
Moshe
|
|
|
|
|
citroen wrote:
so they will be equal I should have written:
*ch==*test; to dereference them.
You are exactly right!
[happy-cry] sniff... sniff... I'm so proud... [/happy-cry]
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
|
How can I get application path ?
such as I want to get icq path,acrobat path,...;
How should I do (Howto or Library) ?
Thank you for your kindness.
|
|
|
|
|
The way I solved this was to call GetEnvironmentVariable and ask for the 'path' variable. Here's an MFC code snippet:
<code>
DWORD dwPathLen = GetEnvironmentVariable("path", NULL, 0);
CString csCurrentPath;
DWORD dwPathLenVerify = GetEnvironmentVariable("path",
csCurrentPath.GetBuffer(dwPathLen), dwPathLen);
ASSERT(dwPathLenVerify == (dwPathLen - 1));
csCurrentPath.ReleaseBuffer();</code>
The only MFC thing about it is the GetBuffer call, which you could easily remove.
|
|
|
|
|
I am using winsock application. i am making the client server application. I want to get the ip address and port of the client connecting to my server socket. I am already using the function getpeername() but it is not working please help me.
Reply me soon
|
|
|
|
|
When you do accept, why don't you use the second parameter? read msdn about "WSAAccept" and pay attention to "ATM_CALLING_PARTY_NUMBER_IE" (I suspect that is why your getpeername call fails).
|
|
|
|
|
Thanx 4 guidence but we r simply using simple sockets not ATM based sockets. Is there any other function to get the information(e.g IP,Port no)of the client attached. Can u plz provide us with some helping code for proper understanding as we r beginners.
Reply me soon
|
|
|
|
|
Well, from what I just read this is provider specific.
What network are you using?
What is the error code (see error hadling example MSDN "IPv6-Enabled Client Code")?
|
|
|
|
|
Well I am using LAN(ethernet) with an OS Windows Xp. The exact thing that is happening is when I get the port no by
(getpeername), I receive junk not the exact port no and the junk value changes whenever the program is restarted. U can have a better idea of it by viewing the code. Plz help me out.
getpeername(ClientSock,
(struct sockaddr *) &accept_sin,
(int *) &accept_sin_len);
short x=accept_sin.sin_port;
m_port=x;
UpdateData(false);
MessageBox (x, TEXT("family"), MB_OK);
Reply me soon
|
|
|
|
|
Having not enough info to say directly. But if you accept your sockets through AcceptEx there is only one way how to get the socket info as the getpeername() doesn't work anymore after AcceptEx .
If this is your case, look at the GetAcceptExSockaddrs function, this is a way how to handle it.
|
|
|
|
|
Well I am using "accept" to make connection. The exact thing that is happening is when I get the port no by(getpeername), I receive junk not the exact port no and the junk value changes whenever the program is restarted. U can have a better idea of it by viewing the code. Plz help me out.
getpeername(ClientSock,
(struct sockaddr *) &accept_sin,
(int *) &accept_sin_len);
short x=accept_sin.sin_port;
m_port=x;
UpdateData(false);
MessageBox (x, TEXT("family"), MB_OK);
Reply me soon
|
|
|
|