Click here to Skip to main content
15,902,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: winsock api Pin
wim ton11-Jun-05 22:03
wim ton11-Jun-05 22:03 
GeneralRecord Header reading problem Pin
softtec11-Jun-05 4:25
softtec11-Jun-05 4:25 
GeneralRe: Record Header reading problem Pin
David Crow11-Jun-05 6:13
David Crow11-Jun-05 6:13 
GeneralRe: Record Header reading problem Pin
softtec11-Jun-05 7:22
softtec11-Jun-05 7:22 
GeneralRe: Record Header reading problem Pin
Ravi Bhavnani11-Jun-05 19:45
professionalRavi Bhavnani11-Jun-05 19:45 
GeneralBi-dimensional List in MFC Pin
CosminU11-Jun-05 3:53
CosminU11-Jun-05 3:53 
GeneralRe: Bi-dimensional List in MFC Pin
Lasse11-Jun-05 12:14
Lasse11-Jun-05 12:14 
GeneralUsing IsClipboardFormatAvailable function to check CF_OWNERDISPLAY Pin
hcmuns11-Jun-05 3:52
susshcmuns11-Jun-05 3:52 
May I use IsClipboardFormatAvailable function to check CF_OWNERDISPLAY ?

if (IsClipboardFormatAvailable(CF_TEXT) || IsClipboardFormatAvailable(CF_OEMTEXT))
{
HANDLE hClipboardData = GetClipboardData(CF_TEXT);

// char* pchData = (char*)GlobalLock(hClipboardData);

LPTSTR pchData = (LPTSTR)GlobalLock(hClipboardData);

CString strFromClipboard = pchData;

//TextOut(hdc,10,10,strFromClipboard,strFromClipboard.GetLength());

dc->TextOut(0,0,strFromClipboard);
}
else if(IsClipboardFormatAvailable(CF_BITMAP))
{
HBITMAP hClibBmp = (HBITMAP)GetClipboardData(CF_BITMAP);

HDC hMemDC = CreateCompatibleDC(hdc);

HBITMAP hOldBmp = (HBITMAP)SelectObject(hMemDC,hClibBmp);

BITMAP bm;

GetObject(hClibBmp,sizeof(BITMAP),(LPSTR)&bm);

BitBlt(hdc,0,0,bm.bmWidth,bm.bmHeight,hMemDC,0,0,SRCCOPY);

SelectObject(hMemDC,hOldBmp);

DeleteDC(hMemDC);

ReleaseDC(dc);
}
else if (IsClipboardFormatAvailable(CF_OWNERDISPLAY))
{
HWND hClipboardOwner;

HGLOBAL hglobal;

hClipboardOwner = GetClipboardOwner()->GetSafeHwnd();

hglobal = GlobalAlloc(GMEM_MOVEABLE,sizeof(PAINTSTRUCT));

LPPAINTSTRUCT lpps;

lpps = (LPPAINTSTRUCT)GlobalLock(hglobal);

CopyMemory(lpps, &dc->m_ps, sizeof(PAINTSTRUCT));

GlobalUnlock(hglobal);

hdc = dc->Detach();

::SendMessage(hClipboardOwner,WM_PAINTCLIPBOARD, (WPARAM) m_hWnd, (LPARAM) hglobal);

dc->Attach(hdc);
}

Thanks in advanceSmile | :)
QuestionVisual Assist 6 (or 4.1), Anyone? Pin
Guido Loupias10-Jun-05 23:06
Guido Loupias10-Jun-05 23:06 
AnswerRe: Visual Assist 6 (or 4.1), Anyone? Pin
ThatsAlok10-Jun-05 23:20
ThatsAlok10-Jun-05 23:20 
GeneralRe: Visual Assist 6 (or 4.1), Anyone? Pin
Guido Loupias11-Jun-05 0:15
Guido Loupias11-Jun-05 0:15 
AnswerRe: Visual Assist 6 (or 4.1), Anyone? Pin
John R. Shaw11-Jun-05 0:05
John R. Shaw11-Jun-05 0:05 
Questioncan an app know if computer is connect to the internet? Pin
includeh1010-Jun-05 21:51
includeh1010-Jun-05 21:51 
AnswerRe: can an app know if computer is connect to the internet? Pin
John R. Shaw10-Jun-05 22:24
John R. Shaw10-Jun-05 22:24 
AnswerRe: can an app know if computer is connect to the internet? Pin
ThatsAlok10-Jun-05 23:24
ThatsAlok10-Jun-05 23:24 
AnswerRe: can an app know if computer is connect to the internet? Pin
David Crow11-Jun-05 6:28
David Crow11-Jun-05 6:28 
Generalproblem with bstr Pin
pardis10-Jun-05 20:45
pardis10-Jun-05 20:45 
GeneralRe: problem with bstr Pin
ThatsAlok10-Jun-05 21:09
ThatsAlok10-Jun-05 21:09 
GeneralRe: problem with bstr Pin
S. Senthil Kumar10-Jun-05 21:51
S. Senthil Kumar10-Jun-05 21:51 
GeneralRe: problem with bstr Pin
pardis11-Jun-05 1:21
pardis11-Jun-05 1:21 
GeneralRe: problem with bstr Pin
S. Senthil Kumar12-Jun-05 4:59
S. Senthil Kumar12-Jun-05 4:59 
GeneralRe: problem with bstr Pin
pardis18-Jun-05 18:40
pardis18-Jun-05 18:40 
GeneralWord Automation Pin
Veera Raghavendra10-Jun-05 19:38
Veera Raghavendra10-Jun-05 19:38 
Generalproblem in tab control Pin
chethu66510-Jun-05 19:29
chethu66510-Jun-05 19:29 
GeneralRe: problem in tab control Pin
John R. Shaw10-Jun-05 23:23
John R. Shaw10-Jun-05 23:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.