Solved

Question for Answer2000!

Posted on 1998-10-20
3
157 Views
Last Modified: 2010-04-15
Hi Answer2000,
   The "blinking text" code segment that u give me can only implement it at the beginning of a program, when the dialog
display, the text blinking. How if i want to blink the text only if i press the button?
0
Comment
Question by:softyan
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
Answers2000 earned 70 total points
ID: 1253712
Modify Step 2 of my original answer (you did see my comment on colors too ??? - login and click on your name, and then the other Question to see the comment I added)

remove this line from WM_INITDIALOG case

   uTimerId = SetTimer( hDlg, 1, 1000 /* Time in Millisecs */, NULL ) ;

add a case WM_COMMAND :-

i. To start flashing - assuming ID_BUTTON1 is the button for this

if (LOWORD(wParam) == ID_BUTTON1 )
{
  // kill prev timer
   if ( uTimerId != 0 ) KillTimer( uTimerId ) ;
   uTimerId = 0 ;

   uTimerId = SetTimer( hDlg, 1, 1000 /* Time in Millisecs */, NULL ) ;
}

ii. To stopflashing - assuming ID_BUTTON2 is the button for this

if (LOWORD(wParam) == ID_BUTTON2 )
{
  // kill prev timer
   if ( uTimerId != 0 ) KillTimer( uTimerId ) ;
   uTimerId = 0 ;
}

0
 

Author Comment

by:softyan
ID: 1253713
I did read the set colour answer, and it is great. My program work fine, and here is the point. BTW, i would like to know where can i get more information or knowledge on the windows message system? Any suggestion?
0
 
LVL 8

Expert Comment

by:Answers2000
ID: 1253714
1. Get the Charles Petzold book - for Win32 API/SDK programming

http://www.amazon.com/exec/obidos/ASIN/1556156766/answers2000limit

Tonnes of samples (not fantastic code - some duplication - but easy to read).  Covers all the core Windows API (one chapter on OLE - which is a waste of time).  

All the customer comments tell you it's a good book (and I'd recommend it too) - except for the guy who tells you to learn MFC or VB instead

Even if you switch to MFC in future, get this book too for background, as MFC builds on top of the Win32 API


2. In case you move on to MFC later, Jeff Prosise has done the best introductory book I've seen on MFC :

http://www.amazon.com/exec/obidos/ASIN/1556159021/answers2000limit


3. The links are from Amazon and both books have discounts.

If you decide to buy online, please use my links from above (normal cost - you still get the same discount from Amazon), but my site gets referral credit.




0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now