|
cannot convert parameter 1 from 'struct HWND__ *' to 'const class CWnd *'
this is the message I get when I try your solution.
Grhhhhh.... This is driving my crazy......
|
|
|
|
|
I'm sorry - it was my mistake - I didn't delete the "Pos" when I changed the
SetWindowPos to MoveWindow
void CTextView::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
if (m_RichEdit.GetSafeHwnd())
m_RichEdit.MoveWindow(0, 0, cx, cy);
}
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
YES YES YES......
Many Thanx...... You saved the day......
|
|
|
|
|
Heh You're welcome. Sorry I added to the confusion/frustration!
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
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?
|
|
|
|