|
|
[Message Deleted due to spam]
|
|
|
|
|
Hello!
I'm sure you guys with tons of experience had same dilemma some time in your carrier. I got in my mind almost impossible task to implement from my project manager. I have to implement click and double click on the same button control.
The idea is that single-click would do some action A and double click would do action B that is totally unrelated to action A. At first look it seems ok, but windows manifest double-click like single-click followed by double-click event.
So how would I know that single-click will be followed by double-click event and not do anything on the first event but just the second one and execute just action B?
In my mind there is no solution to this problem except delaying the single-click event for the time in which double-click may happen. This can result that clients would complain that single-click is slow responsive.
Please help me or direct me to some resources so I can convince myself or my project manager that there is or is not the solution for the given problem.
Best regards,
Rostfrei
|
|
|
|
|
When you get the first WM_LBUTTONDOWN , start a timer whose timeout value is at least GetDoubleClickTime() . If the timer expires before you get WM_LBUTTONDBLCLK , then do your single-click action.
Rostfrei wrote: This can result that clients would complain that single-click is slow responsive.
Bill them for the time spent researching time travel so your code can see into the future to determine whether the user is going to double-click.
|
|
|
|
|
i am wonder how to extract the pixel data from video stream capture window (supppose 320x320) by using visual c++? anyone can do me a favour and related sources for me to refer? Thank you very much and god bless!
love-peace-joy
|
|
|
|
|
baby_fong82 wrote: i am wonder how to extract the pixel data from video stream capture window (supppose 320x320) by using visual c++?
That depends much on what "video stream capture window" you are referring to!
Mark
|
|
|
|
|
Is that 'grab bitmap' same meaning with 'extract pixel data' from video capture window? Microsoft directX 9.0 sdk has provided such grab bitmap tool. How can i utilize it?
love-peace-joy
|
|
|
|
|
baby_fong82 wrote: Microsoft directX 9.0 sdk
So you are referring to DirectShow[^]?
|
|
|
|
|
hai to all...
Can any body plzz help me for this process?
i want to read the contents of a doc file(ms word file) and write the contents
into another doc file(ms word file)...
How shall i do this?
i tried the following method, but itz working only reading and writing text files..
#include <iostream>
#include <fstream>
#include <string>
#include <conio.h>
using namespace std;
void main () {
string line;
ifstream myfile ("C:/1.doc");
if (myfile.is_open())
{
while (! myfile.eof() )
{
getline (myfile,line);
cout << line << endl;
}
myfile.close();
}
else cout << "Unable to open file";
ofstream myfile1;
myfile1.open ("C:/2.doc");
myfile1 << line;
myfile1.close();
getch();
}
Can anybocy plzz help me how to read and write for doc files...
senthil.
|
|
|
|
|
Maybe writing a MACRO for MSWord (or OpenOffice!) is easier than deciphering the proprietary DOC-Format?
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
senthil wrote: Can anybocy plzz help me how to read and write for doc files...
You can't read the content of the ms document as it is binary file.
You can read from one doc and write to another doc by using binary files(i.e. open files in binary mode).
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hai laxman,
thanks for ur reply...
now itz working perfectly in binary mode....
thanks for ur valuble suggestion...
now i'm trying to convert a html file into a pdf file or an image file using
VC++... R u having any idea about this...
thanks...
senthil.
|
|
|
|
|
senthil wrote: now i'm trying to convert a html file into a pdf file or an image file using VC++... R u having any idea about this...
No, I don't have any idea, but you may refer following article. it may help you.
http://www.codeproject.com/csharp/sertf2pdf.asp[ ^]
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
does anyone of you know what message will be posted when a system is logged in?
if so, can you please be so kind and respond me.
thanks in advance!
thanks to one and all who respond to the questions posted here!
Shalini nair
|
|
|
|
|
As far as I know, the system doesn't send any notification upon login. But, upon logoff, it sends.
Could u tell me, why this concept is needed?
Come online at:-
jubinc@skype
|
|
|
|
|
What exactly you want to do?
|
|
|
|
|
|
I want to check that the "1234.EXE" is running or not. (This program have no windows),if so I will go to some job...
What's function use for this issue?
|
|
|
|
|
Use CreateToolhelp32Snapshot . Refer example[^] from MSDN .
|
|
|
|
|
|
I'm having a problem sending a message from one window to another in my (Win32) application. A little background:
1) It's a dialog based app
2) It consists of a tab control and several child window dialogs
I want to send the text of an edit control from one tab/child window to another tab/child window's list box using:
SendMessage(hwnd, LB_ADDSTRING, 0, (LPARAM) szString);
However I can not get them to communicate.
I can't figure this out (never attempted it before). I have a single function handling all messages of each child window of the tab control. Everything works great as long as I'm updating the window/tab in view.
Can anyone point me in the right direction? Thanks in advance.
|
|
|
|
|
You cannot do that with a string. The string is in the memory of your process, all that you are sending is the address, which the second process will not be able to read. To send a string send the WM_COPYDATA message instead. But this will not allow you to add it to a listbox like you are trying.
|
|
|
|
|
He doesn't mention two windows from two processes here.
|
|
|
|
|
Make sure your message handler is prototyped as follows:
in the header file:
afx_msg LRESULT OnHandleMyMessage(WPARAM wParam, LPARAM lParam);
and in the cpp file:
BEGIN_MESSAGE_MAP(CMyClass, CDialog)
ON_MESSAGE(LB_ADDSTRING, OnHandleMyMessage)
END_MESSAGE_MAP()
LRESULT CMyClass::OnHandleMyMessage(WPARAM wParam, LPARAM lParam)
{
return 1L;
}
Also, you should call PostMessage unless you need to wait for the message handler to return.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks for the reply. I'm quite new at coding and can't quite decipher what you provided, but are you suggesting I subclass the control?
|
|
|
|