Click here to Skip to main content
15,896,912 members
Articles / Programming Languages / C++

Windows Fortune Application

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
17 Apr 20023 min read 81.2K   1.2K   21  
This application will display a random fortune in the font and colors of your choice.
/******************************************************************************\
*       This is a part of the Microsoft Source Code Samples. 
*       Copyright (C) 1993-1997 Microsoft Corporation.
*       All rights reserved. 
*       This source code is only intended as a supplement to 
*       Microsoft Development Tools and/or WinHelp documentation.
*       See these sources for detailed information regarding the 
*       Microsoft samples programs.
\******************************************************************************/
//
//	toolbar.h -	header for the text button toolbar library
//

#ifndef _TOOLBAR_H
#define _TOOLBAR_H
#else
#error Repeated include of this file
#endif // _TOOLBAR_H


#define TB_SPACE 0xFFFFFFFF			// use this to insert a gap


typedef struct TEXTBUTTON_STRUCT
	{
	LPTSTR	lpButtonText;			// string that appears on the button
	INT		idButton;				// this id is sent to the window proc
	HWND	hWndButton;				// returned window handle of button
	} TEXTBUTTON, *LPTEXTBUTTON;


#ifdef __cplusplus
extern "C" {
#endif


HWND TextButtonBar( HWND hwOwner, LPTEXTBUTTON buttons, LPINT barheight );
BOOL SetButtonText( LPTEXTBUTTON buttons, INT buttonid, LPTSTR newtext );
BOOL EnableTextButton( LPTEXTBUTTON buttons, INT buttonid, BOOL state );


#ifdef __cplusplus
}
#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
United States United States
I work on an industrial HPC project that can run on either the CPU or the GPU. I usually use which ever one has the most horsepower on a given machine. It's written with CUDA with very few ifdefs used. My company is quite large, in the top five in our industry in North America, and I work in a small group with just five programmers.

Comments and Discussions