Originally Posted by
execute
That's terrible code...
Not only did i spend 15 minutes getting header files, and placing them in my folders. Only to find out the header files themselves don't work either, just errors everywhere. I've included everything, and no libraries were mentioned to link to.
Please post code and then explain what they do.... what to link.... and what libraries are needed. This code requires specstring.h, safestr.h, and safestr.h just gives error after error.
I'm either missing a library or this was coded by someone who wasn't thinking about ming compiler.
You're right, I wasn't thinking about the ming compiler. I use a real windows compiler for making windows-specific apps.
Also, if you want the source of this information, I shelled the code from a C++ class here: http://www.codeproject.com/shell/system_tray.asp
So enjoy using that code if you like.
Code:
// Required for balloon text information.
#define _WIN32_IE 0x0600
#include <windows.h>
#include <string.h>
#include <stdio.h>
#include <commctrl.h>
#include <shellapi.h>
#include <richedit.h>
#include <wininet.h>
#include <time.h>
#include "resource.h"
// Taskbar Icon include. This is located in a library directory
// of code. Feel free to move TaskBarIcons.h/.cpp to this
// folder and change the relative path to include it easier.
#include <TaskBarIcons.h>
#include <strsafe.h>
#include <shellapi.h>
//////////////////////////////////////////////////////////////////
///////////////////////// LIBRARIES //////////////////////////////
//////////////////////////////////////////////////////////////////
#pragma comment(lib, "comctl32.lib")
#pragma comment(lib, "shell32.lib")
#pragma comment(lib, "winInet.lib")
#pragma comment(lib, "comctl32.lib")
//////////////////////////////////////////////////////////////////
//////////////////////// DEFINITIONS /////////////////////////////
//////////////////////////////////////////////////////////////////
#define ICONID 0