Hi!
I want to show a blinking text over my derived CMDIChildWnd-class. The
blinking is done by one view which is hold by my frame. I set up a timer and
write text to the parent frame, which works fine. But I can't get the text
away the next time the timer fires. Here is some code:
void MyView::OnTimer (UINT nIDEvent)
{
if (nIDEvent!=1) return;
showText = !showText;
// Call base class handler.
CView::OnTimer( nIDEvent);
CUserFrame* frame = (CUserFrame*)(t his->GetParentFrame ());
CRect clientRect;
frame->GetClientRect( &clientRect) ;
if (showText){
// display the text --------- THIS WORKS FINE
CFont font;
CDC* dc = frame->GetDC();
font.CreatePoin tFont (720, _T ("Arial"));
CFont* oldFond = dc->SelectObject (&font);;
dc->SetBkMode (TRANSPARENT);
dc->SetTextColor(R GB(255,100,0));
dc->DrawText(_T("b link"), clientRect, DT_SINGLELINE | DT_CENTER |
DT_VCENTER);
dc->SelectObject (oldFond);
frame->ReleaseDC(dc );
}else{
// remove the text -------------- DOESN'T WORK
// here are many things I tried, but without success
::InvalidateRec t(frame->m_hWnd,0,TRUE) ;
::InvalidateRec t(frame->m_hWnd,&client Rect,TRUE);
::UpdateWindow( frame->m_hWnd);
frame->UnlockWindowUp date();
frame->Invalidate(tru e);
frame->UpdateWindow() ;
frame->RedrawWindow() ;
frame->my2View->UnlockWindowUp date(); /* my2View is anoter
view that the frame holds (It has a static splitter)*/
frame->my2View->InvalidateRect (&clientRect) ;
frame->my2View->Invalidate(tru e);
frame->my2View->UpdateWindow() ;
frame->my2View->RedrawWindow() ;
AfxGetMainWnd()->RedrawWindow() ;
/* To be sure that the code is working corect I added a drawText
here,
which is displayed correctly above the first text and is under
the "blink" after the next timer event */
CDC* dc = frame->GetDC();
dc->DrawText(_T("h ello..."), clientRect, DT_SINGLELINE | DT_CENTER |
DT_VCENTER);
frame->ReleaseDC(dc );
}
}
So the result of the above code is that "blink" is written on my window,
then "hello" is written above it, than "blink" again... but the other text
will never be deleted.
Anyone any ideas why this is so, why the window is not redrawn, so the
"blink" should disapear, becaus it is not in the frames OnPaint()?
Thanks for any help
Maik 2 3435
"Maik Wiege" <mi*****@gmx.de > wrote in message
news:bu******** *****@news.t-online.com... Hi! I want to show a blinking text over my derived CMDIChildWnd-class.
The blinking is done by one view which is hold by my frame. I set up a
timer and write text to the parent frame, which works fine. But I can't get
the text away the next time the timer fires. Here is some code:
This is a very advanced subject. We cannot help you here. You should
post in a newsgroup devoted to blinking text.
Jonathan
Jonathan Turkanis wrote: "Maik Wiege" <mi*****@gmx.de > wrote in message news:bu******** *****@news.t-online.com...
Hi! I want to show a blinking text over my derived CMDIChildWnd-class. The
blinking is done by one view which is hold by my frame. I set up a
timer and
write text to the parent frame, which works fine. But I can't get
the text
away the next time the timer fires. Here is some code:
This is a very advanced subject. We cannot help you here. You should post in a newsgroup devoted to blinking text.
Actually, we can't help you here because it is and MFC question.
Go to a VisualC newsgroup.
:)
Jorge L. Jonathan
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Marc |
last post by:
Hi all,
I have an application that uses a Pmw ComboBox to display a list that
is dynamic. The user has the ability to add and delete items from the
list at different points in the program.
However, once the list is updated it needs to automatically refresh
the ComboBox to reflect the updated list. The only way I have been
able to solve the problem so far is to redraw the window (by
withdrawing the window and calling the function that...
|
by: Phil |
last post by:
how do I force a window, pened alone, to be displayed in its frame set?
tried this:
if (parent.location.href == self.location.href) {
window.location.href = '../';
}
the problem is that the original page is replaced by the main.htm page (the
default page for the 'main' frame)., because the open event of the menu page
|
by: Maik Wiege |
last post by:
Hi!
I want to show a blinking text over my derived CMDIChildWnd-class. The
blinking is done by one view which is hold by my frame. I set up a timer and
write text to the parent frame, which works fine. But I can't get the text
away the next time the timer fires. Here is some code:
void MyView::OnTimer(UINT nIDEvent)
{
if (nIDEvent!=1) return;
showText = !showText;
|
by: Crirus |
last post by:
I have a 20x16 array of objects.
I need a way to iterate through the array and only consider few rows and few
columns.
To be clearer, sometimes I need only first 2 rows and last 3 columns to be
considered in loop
Another time, I whould need only first 3 columns and last 4 rows to be
considered...
Anyhow, I will not have separate rows or columns in the same iteration...
|
by: Don |
last post by:
Is there anyway to force an area of the desktop to redraw in VB.NET?
- Don
| |
by: beatdown |
last post by:
Hi all,
I have a set of Javascript functions that dinamically update the
contents of a HTML <selectelement, depending on the value of another
<select>. For easy understanding: I select a region/state in one
<selectand then I update the list of towns in that region in the
other <select>.
Some regions have lots of towns and there is a little wait until the
browser updates completely the <select>. I want to show a "Loading..."
message,...
|
by: markwalker84 |
last post by:
Hello everyone!
Got a bit of a problem...
Two of the panels on my program contain a number of check boxes. The exact number of which is determined by a pair of variables.
I have recently implemented a Wizard which changes that number, as well as a save and load function to the program.
I know the number of being altered in memory (i added a quick check button) but what i'm struggling with is how to refresh the panel with the new...
|
by: adubra |
last post by:
Hi there,
I am using a device context (DC) and a buffer to successfully draw to screen. However, when I update the DC at very high frame rate and drag the frame containing the image very quickly over the screen or I drag another window on top of the fast display, I get errors (Pyassertion ....). I believe those are related to a conflict between the thread that is updating the buffer (over which I have control) and the thread that is doing the...
|
by: dmc2409 |
last post by:
Well, I am more a desigber than developer. Need to solve the folloving
problem. I have a page on, lets call it Firstserver. It opens Page1,
Page2 and Page3 on Secondserver through a frame on the mainpage of the
Firstserver. I have big problems with refreshing content of the pages
on the Secondserver. I need a way to delete session cookies of the
pages on the Secondserver ON FIRSTSERVER'S MAINPAGE UNLOAD... and
force Secondserver pages...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |