// Change progress bar color to yellow
m_ProgressCtrl.SendMessage( PBM_SETBARCOLOR, 0, RGB ( 255, 255, 0 ));
Sunday, April 19, 2009
[VC++] Change color of Progress bar
Have you ever thought of changing the color of the progress bar you created using CProgressCtrl? PBM_SETBARCOLOR is the message which will help you to change the color of progress bar. See the below code snippet showing how to send the above said message for changing the progress bar color.
[VC++] Disabling Ctrl+Alt+Del key
Simplest way to disable the Ctrl+Alt+Del key press is to use the API SystemParametersInfo(). See the below code snippet.
SystemParametersInfo ( SPI_SETSCREENSAVERRUNNING, TRUE, NULL, 0 );
[VC++] MFC Collection classes
Collection class
A collection class is characterized by its "shape" and by the types of its elements. The shape refers to the way the objects are organized and stored by the collection. MFC provides three basic collection shapes: lists, arrays, and maps (also known as dictionaries).
MFC provides collection classes of three categories.
Array
List
Map
Below is a list of classes under each category and type of elements each store,
MFC Array Classes
CByteArray - 8-bit bytes (BYTEs)
CWordArray - 16-bit words (WORDs)
CUIntArray - Unsigned integers (UINTs)
CPtrArray - void pointers
CObArray - CObject pointers
CStringArray - CStrings
MFC List Classes
CObList - CObject pointers
CPtrList - void pointers
CStringList - CStrings
MFC Map Classes
CMapWordToPtr - Stores void pointers keyed by WORDs
CMapPtrToWord - Stores WORDs keyed by void pointers
CMapPtrToPtr - Stores void pointers keyed by other void pointers
CMapWordToOb - Stores CObject pointers keyed by WORDs
CMapStringToOb - Stores CObject pointers keyed by strings
CMapStringToPtr - Stores void pointer keyed by strings
CMapStringToString - Stores strings keyed by other strings
A collection class is characterized by its "shape" and by the types of its elements. The shape refers to the way the objects are organized and stored by the collection. MFC provides three basic collection shapes: lists, arrays, and maps (also known as dictionaries).
MFC provides collection classes of three categories.
Array
List
Map
Below is a list of classes under each category and type of elements each store,
MFC Array Classes
CByteArray - 8-bit bytes (BYTEs)
CWordArray - 16-bit words (WORDs)
CUIntArray - Unsigned integers (UINTs)
CPtrArray - void pointers
CObArray - CObject pointers
CStringArray - CStrings
MFC List Classes
CObList - CObject pointers
CPtrList - void pointers
CStringList - CStrings
MFC Map Classes
CMapWordToPtr - Stores void pointers keyed by WORDs
CMapPtrToWord - Stores WORDs keyed by void pointers
CMapPtrToPtr - Stores void pointers keyed by other void pointers
CMapWordToOb - Stores CObject pointers keyed by WORDs
CMapStringToOb - Stores CObject pointers keyed by strings
CMapStringToPtr - Stores void pointer keyed by strings
CMapStringToString - Stores strings keyed by other strings
[VC++] Expanding MFC macros
You may be seeing the MFC macros DECLARE_MESSAGE_MAP, BEGIN_MESSAGE_MAP etc from the day one you started using MFC. Have you ever thought of what goes inside these macros ?
Follow the below steps and you can see these macros expanded,
1. Select Project->Settings->Link tabs in the Visual Studio editor.
2. In the 'Project Options' edit box delete all the options and type /EP in it.
3. Now compile the file. You will see the expanded code in the output window.
Follow the below steps and you can see these macros expanded,
1. Select Project->Settings->Link tabs in the Visual Studio editor.
2. In the 'Project Options' edit box delete all the options and type /EP in it.
3. Now compile the file. You will see the expanded code in the output window.
Tuesday, April 7, 2009
Google tips for effective googling
Most of us use Google in our daily life, in one way or other. Here are a few tips to Google more effectively:

Use "info:" for accessing the above specified tips. For e.g.: "info:http://google.com" will show the options for searching similar to, link to, google's cache, from the site options. Use "related:" for searching related sites of the specified site. For e.g.: "related:http://google.com" will display the results with sites similar/related to google. Use "filetype:" for specifying the file type of the search results. For e.g.: ".net tutorial filetype:ppt" will display .net PPT Tutorials. Use google as a calculator simply enter the expression in the search box and Go. Use google as a convertor. For eg: try "1 USD to JPY"

- Use quotation marks for searching exact phrases. For e.g.: "Your exact phrase" will return results containing the exact phrase Your exact phrase.
- Use "tilde" for getting search with synonym. For e.g.: "~Health decission" will display the results for the synonyms of Health decission.
- Use "minus sign" for filtering the search results removing the word you do not want. For e.g.: "nano -ipod" results nano results other than ipod nano.
- Use "define:" for getting the defnition/meaning of a given word/phrase. For e.g.: "define: electromagnetic spectrum" will show the definitions of electromagnetic spectrum.
- Use "site:" for limiting the search to the specified site or domain only. For e.g.: "site:freshtechies.blogspot.com" will display the search result for the pages from the site freshtechies.blogspot.com. If you give "VC++" site:freshtechies.blogspot.com it will display the VC++ result from the pages of that site.
See more search operators and usages here.
Subscribe to:
Posts (Atom)