|
Hi,
try this
HDC hdc = ::GetDC(hWnd);
CDC dc, memDC;
dc.Attach(hdc);
memDC.CreateCompatibleDC(&dc);
CRect rc;
::GetClientRect(hWnd, &rc);
CSize sz(rc.Width(), rc.Height());
CBitmap bm;
bm.CreateCompatibleBitmap(&dc, sz.cx, sz.cy);
CBitmap *pOldbm = memDC.SelectObject(&bm);
memDC.BitBlt(0, 0, sz.cx, sz.cy, &dc, 0, 0, SRCCOPY);
// now you can do what you need to with bm.m_hObject
memDC.SelectObject(pOldbm);
bm.Detach();
::ReleaseDC(dc.Detach());
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
HDC hdc = ::GetDC(hWnd);
this line gives error i thinks u had not get mey question i only needed the
HBITMAP variable with ptr to only the drawings not whole window.
ddd
|
|
|
|
|
Hi,
check this link
this[^]
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
thanks for ur reply
there was only problem with my code was the HBITMAP object was not proerly initilzed i mean there was not value in it now i got the pt where i was wrong
once agin thanks.
ddd
|
|
|
|
|
Is there any method to make the focus more obvious when it is staying at a radio button?
Because a very thin black dash squre line is not easy to find, especially when there are many radio button in the dialog.
Thanks!
|
|
|
|
|
and what are you especting for a "more obvious" focused radio button ?
|
|
|
|
|
My program will run on a computer without mouse.
So it is very important to make everything obvious, Especially the focus of the keyboard.
When I use the radio button, especially when the radio button is more than 10 in a dialog, it is difficult to find the focus.
|
|
|
|
|
cant the user use the "Tab" key to navigate between the controls, and use mnemonics to access more quickly to a specific control like :
<big>O</big> My radio
to access this radio directly with the keyboard, press Alt+M (as M is underscored)
|
|
|
|
|
The key board is not standard.
It has only number keys and moving keys like -> <- up down and enter.
It does not have tab and system keys.
I think I should ask my question like this: ^-^
Is there any way to make the controls of the dialog like radio button or check box highlighted when the focus of the keyboard is staying at them?
Once again, my computer has no mouse.
Thanks!
-- modified at 5:21 Tuesday 14th March, 2006
|
|
|
|
|
One option would be to dynamically set the WS_EX_DLGMODALFRAME extended style on each control as it receives the focus. As it loses focus, you would then need to clear it.
Software Zen: delete this;
|
|
|
|
|
Can anyone please tell me the usefulness of thread local storage compared to a more OO solution involving a base class for workerthreads and variables?
|
|
|
|
|
|
Hi all,
I need to use a CHtmlEditCtrl to display an HTML document. I have created the control and added it programmatically to my dialog and it appears correctly. However when I call SetDocumentHTML, nothing is displayed in the control. Based on a suggestion found on another site, I tried calling Invalidate and UpdateWindow but that made no difference. The GetDocumentHTML method is working as documented.
Thanks
|
|
|
|
|
i have to integrate google earth and GPS device.how can i do that.waiting for a reply.
|
|
|
|
|
Hello,
I have a problem that I hope someone have face before.
I have developed a MFC application which is a dll and executes C:\WINDOWS\system32\rundll32.exe C:\test\test.dll rdl (where the rdl is the entry point in the dll). Everything works just fine.
Now I am trying to run the same dll located into a network share: executes C:\WINDOWS\system32\rundll32.exe \\sharename\test.dll rdl and I receive an error that rundll32 cannot find the rdl entry point.
Any idea regarding how to run my dll from a network share?
Thank you.
|
|
|
|
|
plz check the entry point in the test.dll by depends.
|
|
|
|
|
Yes, but is the same dll. If I run it locally it works as it should. The problem appears when I run it from a network share.
|
|
|
|
|
try run like this :
C:\\WINDOWS\\system32\\rundll32.exe \"\\\\sharename\\test.dll\",rdl
-- modified at 3:54 Tuesday 14th March, 2006
|
|
|
|
|
Thank you.
It seems to work.
|
|
|
|
|
Hello!
I need help with tooltips on a Listbox which lays in a view.
If I go with mouse on a free space (an empty row) on my listbox the tooltip works but If I go on a used row the tooltip only flickers / flashes.
BOOL FMExListContol::OnToolTipText( UINT id, NMHDR * pNMHDR, LRESULT * pResult )
{
if (!m_bWithToolTip)
return FALSE;
TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
CString strToolTipText;
strToolTipText = "test";
UINT nID = pNMHDR->idFrom;
#ifndef _UNICODE
if (pNMHDR->code == TTN_NEEDTEXTA)
lstrcpyn(pTTTA->szText, strToolTipText, 80);
else
_mbstowcsz(pTTTW->szText, strToolTipText, 80);
#else
if (pNMHDR->code == TTN_NEEDTEXTA)
_wcstombsz(pTTTA->szText, strToolTipText, 80);
else
lstrcpyn(pTTTW->szText, strToolTipText, 80);
#endif
*pResult = 0;
return TRUE;
}
-- modified at 3:31 Tuesday 14th March, 2006
|
|
|
|
|
Hi
ShellExecute(hwnd,"open","MyPrg.exe",NULL,NULL);
DeleteFile("MyPrg.exe");
I use ShellExecute function in a program. But the program executed both process simultaneously. How can i delete MyPrg.Exe after execution.
pls Help
thanx in advance
by
KK
|
|
|
|
|
Krishna Kumar N wrote: I use ShellExecute function in a program. But the program executed both process simultaneously. How can i delete MyPrg.Exe after execution.
Try this[^]
Take note of this line:
WaitForSingleObject( pi.hProcess, INFINITE );
Nibu thomas
Software Developer
|
|
|
|
|
Sometime will using "application.exe text.txt" to pass the option/value to the application.
But in MFC Application, how to put the option and receive the option in the MFC Applcation ?
Because i can't find the main and args..
Thanks
-- modified at 2:15 Tuesday 14th March, 2006
|
|
|
|
|
LPTSTR GetCommandLine(void);
Nibu thomas
Software Developer
|
|
|
|
|
Good Evening...
I was wondering if anyone has had issues with code from libraries operating differently than the same code in the .exe modules?
I am chasing a bug in some code, and the only thing I can point at is the fact that the code was moved out of the main program/exe project and into a link library....
I have no clue why?
Any thoughts?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|