|
And in the continue with NS17 use of these functions on the WM_SIZE .
|
|
|
|
|
Hamid. wrote: use of these functions on the WM_SIZE.
What do u mean?WM_SIZE of which control?
|
|
|
|
|
For when he changes size of dialog.
|
|
|
|
|
Hamid. wrote: For when he changes size of dialog
But he didnt mention about changing the dialog size.
|
|
|
|
|
Naveen.R wrote: But he didnt mention about changing the dialog size
See the other branch of this thread...
- NS -
|
|
|
|
|
Hey Naveen.R did you see othe thread he used on the wm_size so my guess was true.;)
|
|
|
|
|
Hamid. wrote: so my guess was true.
WOW
|
|
|
|
|
how to program an simple interrupt?
-- modified at 7:04 Friday 31st August, 2007
|
|
|
|
|
What do you mean by interrupt? Can you explain a little more?
- NS -
|
|
|
|
|
I think he wants to programming with assembly.
|
|
|
|
|
|
If helps ... using _asm you can include assembler code in the C++ code
Russell
|
|
|
|
|
|
I am working on a win32 SDI application where i want to know if no event has occured or fired on a window a password dialog should be fired. I want to know how to track that no event has occured on the window.
Thanks in advance.
Dhiraj
Dhiraj Kumar Saini
|
|
|
|
|
you mean you want to make something like a screen saver?
means, if any body does not do anything on the application for some time (say 10 mins) do you want to lock it by displaying the password screen.
|
|
|
|
|
yes is anybody does not do with the application for sometime it should be locked and requires password just like a screen saver.
|
|
|
|
|
thats very simple.
take a global variable say timeout=0;
initiate a timer in the main view, which gets invoked once in 1 second.
inside the timer,
{
increment the timeout by one
if(timeout==60)//say 60 seconds
{
show the password screen.
}
}
and in all the other events like opening a dialog, closing a dialog,
doing some frequent operations,
reset the timeout flag to zero.
i am sure this will solve your problem.
|
|
|
|
|
Dhiraj kumar Saini wrote: if no event has occured or fired on a window
You mean events like mouse click, key strokes, etc., right?
- NS -
|
|
|
|
|
yes u right i want functionality like screen saver
|
|
|
|
|
Since it is a Win32 Aplication (No MFC), there will be a message loop.
Like...
while( GetMessage( &msg, ....<br />
{<br />
TranslateMsg...<br />
DisapatchMsg...<br />
}
You have to modify it like...
<br />
SetTimer( IDT_LOCK, LOCK_TIME, 0 );<br />
while( GetMessage( &msg, ....<br />
{<br />
switch( msg.message )<br />
{<br />
case WM_LBUTTONDOWN:<br />
case WM_RBUTTONDOWN:<br />
case WM_KEYDOWN:<br />
SetTimer( IDT_LOCK, LOCK_TIME, 0 );<br />
break;<br />
}<br />
TranslateMsg...<br />
DisapatchMsg...<br />
}
And handle the WM_TIMER in the windowproc, like...
case WM_TIMER:<br />
switch( wParam )<br />
{<br />
case IDT_LOCK:<br />
KillTimer(IDT_LOCK);<br />
DialogBox( ...,IDD_PASSWORD,...<br />
SetTimer( IDT_LOCK, LOCK_TIME, 0 );<br />
break;<br />
}
Hope you got the idea...
- NS -
|
|
|
|
|
Do you want to show a dialog to user when he want to use of your program?
|
|
|
|
|
yes a dialog for entering password
|
|
|
|
|
Dhiraj kumar Saini wrote: ...i want to know if no event has occured or fired on...
For idle detection, use GetLastInputInfo() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
Am getting data continuously from the serial port(COM), i want to display the data in an multiline edit box,How to do it?
I tried one method as below but edit box flickers
void CDialog::ReadSerialData(CString sIn)
{
sIn.Replace("\r","\r\n");
m_StrCmdResp += sIn;
int nLineCount = m_CtrlCmdResp.GetLineCount();
m_CtrlCmdResp.LineScroll(nLineCount+1);
m_CtrlCmdResp.SetWindowText(m_StrCmdResp);
nLineCount = m_CtrlCmdResp.GetLineCount();
m_CtrlCmdResp.LineScroll(nLineCount+1);
if(nLineCount > MAX_RUN_BUFFERSIZE)
{
m_StrCmdResp.Delete(0,REMOVE_CHAR);
while(!(m_StrCmdResp.Find("\r\n")))
{
m_StrCmdResp.Delete(0,1);
};
}
m_StrCmdResp.FreeExtra();
}
Can we use edit box for this type of data displaying
Thanks in advance
|
|
|
|
|
use listbox or may be list control instead.
even i had this problem and list control solved my problem.
|
|
|
|