|
It's a pleasure
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
SetWindowsHookEx(WH_MOUSE, KeyBoardProc, g_hMod, 0);<br />
<br />
LRESULT CALLBACK KeyBoardProc(INT iCode, WPARAM wParam, LPARAM lParam)<br />
{<br />
<br />
}
How to know the "A" key is down and the CTRL key is down?
how to get {repeat count, scan code, extended-key flag, context code, previous key-state flag, transition-state flag} from lParam?
and what is KF_DLGMODE? how to use it in KeyBoardProc?
Thanks very much.
|
|
|
|
|
|
HOW WHAT wrote: How to know the "A" key is down and the CTRL key is down?
Look at MSDN for GetKeyState() , GetAsyncKeyState()
|
|
|
|
|
The dos window is displayed when running the batch file ,that batch file have a call to exe.how to hide this dos window (cmd.exe)
|
|
|
|
|
Are you using "start " command for launching your application ?
Regards,
Paresh.
|
|
|
|
|
I am not using start command
This is my batch file content :
@echo off
rem Add a new TAP-Win32 virtual ethernet adapter
"C:\Program Files\OpenVPN\bin\tapinstall.exe" install "C:\Program Files\OpenVPN\driver\OemWin2k.inf" tap0801
exit
-- modified at 4:00 Friday 20th April, 2007
|
|
|
|
|
Use of ShellExecute with SW_HIDE
|
|
|
|
|
Hi All,
How can i convert LPWSTR to CString. Can anyone please help.
Thanks,
Arun.
|
|
|
|
|
arunperi wrote: convert LPWSTR to CString
LPWSTR pwStr;
CString s = pwStr;
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Actually I am not getting the whole text instead i'm getting only the first character.
---Arun.
|
|
|
|
|
(Voting you 5 because you answer was correct but you had two 1 votes for some reason.)
|
|
|
|
|
Look at one of the constructor of CString,
CString( LPCWSTR lpsz );<br />
throw( CMemoryException );
PS. Where are you seeing the only one char ?
Regards,
Paresh.
|
|
|
|
|
Paresh Chitte wrote: PS. Where are you seeing the only one char ?
you didn't get it.
his project certainly doesn't define UNICODE, so his CString is actually CStringA (ansi string - char*).
but he assigns a wide characters string into an ansi string; and wide string contain \0 bytes into some characters, that's why he sees only the first one...
BTW, see my other reply to have a working solution for this pb
|
|
|
|
|
The ANSI/Unicode setting doesn't affect the CString ctor that accepts an LPCWSTR .
|
|
|
|
|
then why does the OP get only the first character of his original string ?
|
|
|
|
|
LPWSTR pwStr;
CString s = <code>CW2T</code>(pwStr);
|
|
|
|
|
Or you can just use the CString ctor that accepts an LPCWSTR , as the other posters said.
|
|
|
|
|
arunperi wrote: How can i convert LPWSTR to CString. Can anyone please help.
CString::Format with L"%s"
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi all,
Actually i have made a sdi application and started various number of thread inside it.
Now what i want is to close all thread simultaneously at ExitInstance().
Can anybody please help me in this..
Thanks in advance
|
|
|
|
|
Are they worker threads or UI-threads?
What mechanism do you use to stop any of them?
Perhaps some excellent articles about how to use threads can be of service: worker threads[^], UI-threads[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
They are all UI threads
Is it possible to close all of them without using their objects..
like
PostThreadMessage(WM_QUIT,NULL,NULL);
|
|
|
|
|
PostThreadMessage(...) is the correct way to end a UI-thread, you're right about that.
It usually desired and considered good practice to wait on the thread handle to make sure that the thread has finished and delete the CWinThread object afterwards.
The articles I linked to in my previous post will show you how.
However, this requires that you keep track of all threads in some kind of container, e.g. std::vector .
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
neha.agarwal27 wrote: PostThreadMessage(WM_QUIT,NULL,NULL);
yeah you have to post same to all the object which are representing the UI thread
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi
Can u send partial code so that i can give u solution.
In which company ur working now.
Thanks and Regards
Atul
Atool
|
|
|
|