Leaked source code of windows server 2003
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#include <windowsx.h>
#include "dbg.h"
#include "cddbitem.h"
CDDBItem::CDDBItem() { m_lpwstrText = NULL; m_hIcon = NULL; }
CDDBItem::~CDDBItem() { if(m_lpwstrText) { MemFree(m_lpwstrText); m_lpwstrText = NULL; } }
LPWSTR CDDBItem::SetTextW(LPWSTR lpwstr) { if(m_lpwstrText) { MemFree(m_lpwstrText); } m_lpwstrText = StrdupW(lpwstr); return m_lpwstrText; }
LPWSTR CDDBItem::GetTextW(VOID) { return m_lpwstrText; }
LPSTR CDDBItem::GetTextA(VOID) { if(!m_lpwstrText) { return NULL; } WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK, m_lpwstrText, -1, m_szTmpStr, sizeof(m_szTmpStr), NULL, NULL); return m_szTmpStr; }
|