|
Which OnSetFocus handler ? YOu're saying you call OnSetFocus in the dialog, and the handler in your control calls it as well, as it's a composite control ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Probably it because my bad English.
Start from begin step by step:
1. I wrote a Cwnd-derived control which must to get a WM_KEYDOWN
2. I'm put his to MODAL DEMO DIALOG
3. If I press TAB in my demo then I see as a focus jump from the control to the control. Focus also jump into WM_SETFOCUS handler of the my control CMyControl::OnSetFocus()
4. In the WM_SETFOCUS handler of the my control I call CWnd::OnSetFocus() or SetFocus() but it has not effect to getting a WM_KEYDOWN message. I can't get this message neither in the WM_KEYDOWN handler of the CMyControl nor in the CMyControl::PreTranslateMessage.
Best regards,
Eugene Pustovoyt
ICQ UIN: 161325180
|
|
|
|
|
Now what - dialog of CWnd??
With dialogs you'll never get this msg since always a child wnd has the focus.
Dig into PreTranslateMessage() instead.
----------------------
~hamster1
|
|
|
|
|
I'm understand, but how can I set a focus, if SetFocus() method has not effect.
In the PreTranslateMessage() method I don't retrive a WM_KEYDOWN message too.
Best regards,
Eugene Pustovoyt
ICQ UIN: 161325180
|
|
|
|
|
Hello,
For some reason my dialog boxes that have radio buttons in them don't show the "underscore" portion of the name unless the user hits the "Alt" key. So if I have a radio button with the word "&Hello" as its caption it doesn't put an underscore the 'H' as it should.
Any clues as to why this is happening?
Thank you,
Al
|
|
|
|
|
there's a display property ( display control panel, in the appearance section ) that regulates the display or not of the underscore.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Thank you Maximilien, but I'm unfamiliar with this property. Is it a property of the Radio Button, the Dialog Box, or withing Visual C++ itself?
Any help is greatly appreciated.
Thanks,
Al
|
|
|
|
|
It's a property which controls all radio buttons, irrelevant of which toolkit you use. If this property is set to true, the underscores will only show up whenever the user presses ALT. This property also controls the underscores in menus.
Good music: In my rosary[^]
|
|
|
|
|
I should also add that this is a MFC project and I'm using Visual C++.
Thanks,
Al
|
|
|
|
|
Thank you. I figured out you meant within the acutal display property of the OS not Visual Studio. It works now.
|
|
|
|
|
Hello !
I'm a newbie and I hope to get help from here.
I must send a file from a specific location on my pc to a switch. The switch has an TFTP-Server, so the upload works with the dos-tool
> tftp 172.16.0.2 put file.csv config.csv
Now I have to do the same from my program, but i must have the possibility to check if the upload worked fine. So shellExecute is not well. Or if the state of the upload could be checked, i have to know.
How can i do that ?
With WinInet it does not work, because the protocol and port is not available
It is possible by winsock ? The examples just show how to send data to a console and not how to send files....
Thanks for help
|
|
|
|
|
schaf13 wrote:
It is possible by winsock ? The examples just show how to send data to a console and not how to send files....
You will have to implement the TFTP protcol yourself, or find/buy a function/class library.
Good music: In my rosary[^]
|
|
|
|
|
Jorgen is right. Do a search on "Rfc 1350". It is a document on the protocol. Get familiar with that then do a search for "tftp.c" and/or "tftp.h" for a code sample. There is also a sample function called tftp_print .
There should be enough samples out there and once you have an understanding of the protocol, to make your own version of a client or server. I've implemented my own version as a TFTP server. I had an embedded device (client) connect to my computer (server) and it requested a file. I sent it the file receiving status messages as it progressed. Thus, I only processed the RDRQ (read request) and not the write but also handled the OACK to display a status in the program as it progressed and when it was complete.
|
|
|
|
|
Hello!
I'm currently writing a Windows service that should upload each day some files to some webserver. I decided to use a Windows service, so it can use the network functions also when no user is logged in (workstation locked).
Now I got a problem: for the uploading, I need to call an external program (WinSCP, I need to upload the files using the SCP protocol). A command-line version of WinSCP is available, that's not the problem. The problem is that WinSCP doesn't have the required rights to access the network!
Is there any way to execute the WinSCP executable so that it has the same rights as the Windows service? It must be able to access the network while the workstation is locked, and to my knowledge only Windows services are permitted to do so...
Best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
|
No. It's logging in under the local system account... Does that matter?
If I would set it to Network Service, would the other executed application inherit the rights of the service?
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
From the MSDN docs:
Using the Local System Account
The local system account does not require a password, does not have network access rights in Windows NT 4.0 and Windows 2000, and restricts your SQL Server installation from interacting with other servers.
Good music: In my rosary[^]
-- modified at 17:00 Monday 29th August, 2005
|
|
|
|
|
The System and LocalService accounts don't have network access by design. If you need the network, NetworkService is what you should use.
Child processes inherit the security and access of their parents, so that part should work.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | NEW~! CP SearchBar v3.0 | C++ Forum FAQ
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
Hello all !
I have a little problem with VC++ 2005 beta.
The problem is with styles of controls.
I can't make them in modern style (I mean style of XP ).
What can I do to make them in modern style ?
|
|
|
|
|
it is not a VC++2005 problem.
you have to insert a manifest into your project...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I have to write something in *.rc
file or just add the manifest to the project ?
|
|
|
|
|
Just create a file called MyApp.manifest, or something like that, and copy the following text into it:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" processorArchitecture="x86" name="App" type="win32" />
<description>Application</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="x86" publicKeyToken="6595b64144ccf1df" language="*"/>
</dependentAssembly>
</dependency>
</assembly>
I know that in Visual C++ 6, you just have to import it as a resource, and when it asks for the resource type, you enter "24", and then change the resource's ID to "1". I'm not sure if it will work similarly in the 2005 beta, but it should be something along those lines.
[Insert witty and relevant signature here]
|
|
|
|
|
Hello,
Is it an imported project or a new one? I've had no such problems when I was using the beta..
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
|
In that case, the new styles manifest should be linked in automatically with your executable after the normal link step. What does the output window of your build display?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|