|
Hamid. wrote: why 1!!!
because <big>Win</big>+F1 is different from just F1 !
|
|
|
|
|
Oh I saw only F1 not Win+F1 at that question.
|
|
|
|
|
Mohammad Khodaea wrote: By the way, when "Windows + F1" is pressed, no messages will be sent to my application.
No surprise there (since it's a special key). You might create a global message hook to see what messages are generated when the Windows key is pressed.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I develop a software with VC++ 6.0.Now I wanna display several windows in the main view. And every window completes one specific task.For example, you can input some parameters in one window and get results data in another window.
If anyone has good solution you can message me or post your solution to my E-MAIL:toschl@yeah.net
Thank for your heip sincerely
Thank you
|
|
|
|
|
|
I think a single document, multiple view approach might be better. If one view is changed a single call to UpdateAllViews will cause them all to be updated.
|
|
|
|
|
Does this concept of an interactive system service still exist on Vista?
From what I am reading, the interactive service seems no longer viable here.
If one wants to write a system service which interacts with the user...
Is the only way just to write 2 apps (service+ui-app) that can talk to each other?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
Peter Weyzen wrote: Does this concept of an interactive system service still exist on Vista?
"Important Services cannot directly interact with
a user as of Windows Vista. Therefore, the techniques
mentioned in the section titled Using an Interactive
Service should not be used in new code." (Source[^])
I read that as it's a bad idea
Peter Weyzen wrote: s the only way just to write 2 apps (service+ui-app) that can talk to each other?
If the service doesn't need to be available when no user is
logged on, you could also have a single process that runs
when a user logs on.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
All this documentation reads like stereo instructions.
It seems that there are many what-if's -- that the chances of an interactive service working in most cases, is slim.
Would you think that it's prudent to avoid an interactive service?
And, that the prudent choice is to write 2 apps -- service (running all of the time) and a user app which runs in the user session.
And, then create some inter-app communication to handle notifications?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
Peter Weyzen wrote: Would you think that it's prudent to avoid an interactive service?
IMO yes. It's been hinted since Windows 2000 (if I
remember right) that interactive service support could
go away.
Peter Weyzen wrote: And, that the prudent choice is to write 2 apps -- service (running all of the time) and a user app which runs in the user session.
And, then create some inter-app communication to handle notifications?
That works well for me. Any IPC[^] method will do...
I like named pipes for performance, but for ease of coding,
nothing beats .NET remoting (if managed code is an option,
of course).
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thank you very much, I appreciate your candid opinion on the matter.
I am one of those work at homers -- I don't really have any colleagues who work on the same kinds of stuff I do.
I appreciate CP and people like you, who know their stuff.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<a href="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</a>
|
|
|
|
|
You're welcome!
I work at home as well so discussions here
are the only programming discussions I have.
I'm always learning new stuff here
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I've implemented a named pipes server according to microsoft's KB: http://msdn.microsoft.com/en-us/library/aa365588(VS.85).aspx[^]
so far so good ..
the next step was to add timeouts handling. i.e in case the server failed, the connected clients should NOT be blocked and should exit with timouts.
according to the documentations, this should be done using the following procedure:
1. create a file:
m_hPipe = CreateFileA(
m_sPipeName, // pipe name
GENERIC_READ | // read and write access
GENERIC_WRITE,
0, // no sharing
NULL, // default security attributes
OPEN_EXISTING, // opens existing pipe
0, // default attributes
NULL); // no template file
.
2. set timeouts and Setup com:
GetCommTimeouts(m_hPipe,&m_comm_timeout);
m_comm_timeout.ReadIntervalTimeout = MAXDWORD;
m_comm_timeout.ReadTotalTimeoutMultiplier = MAXDWORD;
m_comm_timeout.ReadTotalTimeoutConstant = 1;
SetupComm(m_hPipe, BUFSIZE+3,BUFSIZE+3);
DCB cDCB;
GetCommState(m_hPipe, &cDCB);
SetCommState(m_hPipe, &cDCB);
SetCommTimeouts(m_hPipe, &m_comm_timeout);
3. execute the read file command ...
fSuccess = ReadFile( m_hPipe, // pipe handle
chBuf, // buffer to receive reply
BUFSIZE, // size of buffer
&cbRead,// number of bytes read
NULL); // not overlapped
the above procedure should cause the ReadFile to exit after 100 miliseconds, however, it doesnt seems to work
Any suggestions will be wellcomed ...
|
|
|
|
|
I haven't used pipes for a while, but I'm quite certain that the ...Comm... functions only operates on communication devices such as serial COM or parallel ports.
The DCB struct in particular has members that sets baudrate, parity and such, which doesn't make sense on pipes.
If you check the return values of those functions I'm pretty sure they will all return FALSE .
Open the pipe in overlapped mode instead. That will give you the possibility to do other things than just waiting on a blocking read request.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi Masters!
--------------
Could you please tell me what's a Message Only Window and how can I
create one using Pure Win32 APIs?
Thank you in advance ...
Thank you masters!
|
|
|
|
|
A Message Only Window is typically a window that you create that is kept invisible and does not receive any user input. Its sole purpose is to receive window messages.
You can use the CreateWindow(...) function to create just about any window that you would ever need.
BTW - I think that there is a special style available in later versions of the Win32 SDK for message-only windows, but I cannot find it now.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
|
I need some help interpreting the Spy++ listing of window items...
In the listing of windows, handle values (in HEX), short description, ... all listing in a tree view, is the ordering within a group meaningful?
Let me clarify my question:
I am debugging a huge GUI application and the past developer created most of the buttons on the GUI dynamically (on the fly) using bitmap images and the CButton::CREATE() method(s).
I am using Spy++ to identify some buttons.
If I am looking at the listing of window handles in Spy++, does the order listed reflect the order in which the buttons were created?
I am trying to find a run-away button that is in a place it shouldn't be on the GUI and not controlled (hidden/enabled) when it should be.
Thanks!
John John
|
|
|
|
|
I am working on a program that takes an input of 2 numbers from the user, checks the primality, generates a public and private keys, validates those keys by encrypting text entered by the user and decrypting text entered by the user. Can anyone help me with some code for this project?
Thanks!
|
|
|
|
|
|
Hi
I am looking at someone elses project and source code and seeing something I need explaining!
There is a STATIC member function declared in a class.
eg.
class myClass
{
static void myFunction();
}
Then it is called using the scope resolution opperator.
myClass::myFunction()
but it is being called from another source file in the project!
I can't see any reason why it is aloud to do this. In fact I have added my own class and function
looking exactly the same and it gives me LNK 2019 error.
Any Ideas what I am missing.
Thanks in advance for your time.
|
|
|
|
|
steph5 wrote: it is being called from another source file in the project!
I can't see any reason why it is aloud to do this.
If it wasn't allowed, then all our source code would
have to be in one file. Thankfully we have a linker
to link separate compiled code modules
steph5 wrote: In fact I have added my own class and function
looking exactly the same and it gives me LNK 2019 error.
To do its job, the linker needs to know where to find
the code to link to. What's the complete error you're getting?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: If it wasn't allowed
shouldn't it be: "if it weren't allowed" ?
|
|
|
|
|
Probably.
I'm a software engineer, dammit, not an English professor.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|