All pastes #1579949 Raw Edit

segin

public c v1 · immutable
#1579949 ·published 2009-09-26 04:39 UTC
rendered paste body
// libseven.cpp : Defines the exported functions for the DLL application.//#include "stdafx.h"#include "libseven.h"extern "C" {ITaskbarList3 *taskbar = NULL;HWND hWnd = NULL;LIBSEVEN_API void InitializeTaskbar(void){	CoCreateInstance(		CLSID_TaskbarList, NULL, CLSCTX_ALL,		IID_ITaskbarList3, (void **) &taskbar	);}LIBSEVEN_API void UpdateProgressBar(int current, int maximum){	taskbar->SetProgressValue(hWnd, current, maximum);}LIBSEVEN_API void AssociateHwnd(HWND win){	hWnd = win;}LIBSEVEN_API void SetProgressType(int type){	switch (type) {		case TASKBAR_NORMAL:			taskbar->SetProgressState(hWnd, TBPF_NOPROGRESS);		case TASKBAR_PAUSED:			taskbar->SetProgressState(hWnd, TBPF_PAUSED);		case TASKBAR_PROGRESS:			taskbar->SetProgressState(hWnd, TBPF_NORMAL);	}}} /* extern "C" */