|
Thanks for the response John, the only problem is that I don`t actually have a DIB, but a LPDIBSECTION. Once I have received a handle (through LoadImage or CreateDIBSection) to a bitmap, GetObject is used to complete the DIBSection. However, I`m not sure whether this is the best way to go about things. Is this used only to gain access to the bits of the bitmap, or can you somehow select this into a CDC and draw onto the bitmap/DIBSection directly?
Cheers,
Alan.
AEGC
|
|
|
|
|
The VC6 example code (cited in my first post) has a routine that converts a DIB to a bitmap. Also, the CDIBSectionLite class (I think) has a routine that blt's the DIB to a CDC. I'm almost sure that the answer you're looking for lies somewhere in that code (the download associated with the article).
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Yeah I`ve checked the CDIBSectionLite example and found that it selects the DIB into the CDC using the HBITMAP handle. I presume that GetObject(etc.) is only used to get the particulars about that bitmap such as width, height, bitsperpixel, and the actual pixel bits themselves. At the moment I`m storing these DIBSECTION structures in a vector and then trying to draw them, instead what I`ll do is store the actual handles and only use a DIBSECTION structure at the exact point I need it, such as when I come to do image processing.
Thanks for your help, though John, much appreciated. I would post a "This helped" but they seem to have disappeared off the Web pages.
Cheers,
Alan.
AEGC
|
|
|
|
|
Hello all,
I was wondering if anyone can tell me how can I read the file names of a set of files that are dropped on my drop target simultaneously.
Thanks.
|
|
|
|
|
|
In my MFC program, I use the OnKeyDown() function to capture single keystrokes, such as the Delete Key, as below
void CDlgMain::OnKeydownLvwMain(NMHDR* pNMHDR, LRESULT* pResult)
{
LV_KEYDOWN* pLVKeyDow = (LV_KEYDOWN*)pNMHDR;
if(pLVKeyDow->wVKey == VK_DELETE)
DeleteAListViewItem();
}
My question is, how do I capture keystroke combinations using the Control Key and a letter key (specifically CTRL-A)? I need this, so I can include "select all" functionality in a list view. I know you can check the status flag for ALT, but there is no flag for CTRL.
|
|
|
|
|
GetAsyncKeyStatus(VK_CONTROL). The trick is to call it then check it, like this:
GetAsyncKeyStatus(VK_CONTROL);
if (GetAsyncKeyStatus(VK_CONTROL) && <insert check="" for="" a="" down="">)
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
[ccode]
GetKeyState(VK_CONTROL) < 0 ? it's down : it's up
[/ccode]
|
|
|
|
|
Hi, all!
Does anyone of you know where I can get the C++ source codes for an algorithm named "Subspace iteration", which is mainly for the calculation of eigenvalues and eigenvectors.
Thank you very much for your help!
Jeffrey
|
|
|
|
|
- How to read C++ in English? "C plus plus" or "C double plus"?
- Still a question, how to read "Windows 2000"? "Windows two thousand"?
- Can you help?
- Regards,
Maer
|
|
|
|
|
Who on earth says C double plus ? How else would you say Windows 2000 ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
C double plus is doubleplusungood
--Mike--
http://home.inreach.com/mdunn/
If there's something strange / in your VC code / Who you gonna call? / Ghostbusters!
your with and
|
|
|
|
|
- Thanks pal!
- I want to know how you read it? "C plus plus"?
- Can you help?
- Regards,
Maer
|
|
|
|
|
- Thanks pal!
- A fellow told me today when VOA says "C++", it is often pronounce as "C double plus". So I am puzzled.
- I do not know how to read is popular.
- Can you help?
- Regards,
Maer
|
|
|
|
|
I'm not sure you've asked me another question ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
- I just want to know how to read is correct. I think yours is correct. So I ask for your pronunciation. : )
- Regards,
Maer
|
|
|
|
|
C++ = "C plus plus"
Windows 2000 = "Windows two thousand"
Hope this helps.
|
|
|
|
|
C plus plus. Most programmers I know say "win 2K" or just "2K" when referencing Win 2000.
--Mike--
http://home.inreach.com/mdunn/
If there's something strange / in your VC code / Who you gonna call? / Ghostbusters!
your with and
|
|
|
|
|
Maer727 If you concentrate on naff stuff like this in a section about C++ programming techniques then I;m afraid there's not much hope for you in programming.
Concentrate on the real work and leave the nonsense behind.
We do it for the joy of seeing the users struggle.
|
|
|
|
|
- Thanks for your suggestions, Rassman pal!
- I am not a native speaker of English speaking country, so there is often trouble when dealing with some special words about C++ with native speaker of English.
- Have a nice weekend,
Maer
|
|
|
|
|
- In MSDN(Ti:SystemParametersInfo), it is said "fWinIni ... This parameter can be zero if you don't want to update the user profile or broadcast the WM_SETTINGCHANGE message ... ".
- I do not know what means "user profile" here.
- Can you show me an example?
- Regards,
Maer
|
|
|
|
|
I've understood that all the minimized windows can be grouped into a single bar, called taskbar just like the windows taskbar, but i don't know how can i make that the minimized windows don't have the restore button, and all the rest. So my question is how, can i build a taskbar into an app?, using the doking windows?, or how?
|
|
|
|
|
- In MSDN (Ti: NONCLIENTMETRICS), first paragraph, it is said "The NONCLIENTMETRICS structure contains the scalable metrics associated with the nonclient area of a nonminimized window. "
- I do not know what means "scalable metrics" here.
- Can you show me an example?
- Regards,
Maer
|
|
|
|
|
Here is my problem! I have three classes set up sort of like this:
class MainClass
{
CSocketClass * pSock; // instance of my socket class.
}
class CSocketClass
{
CSocketAddr * pObj;
};
class CSocketAddr
{
operator LPSOCKADDR()
{
return ( LPSOCKADDR )( LPSOCKADDR_IN )this;
}
}
When I call my MainObject->pSock->bind() [which uses my LPSOCKADDR override] and try to do some binding, the pointer this does not refer to the class I called it from, it points back to my main object! That is bunk! When I say "this" I want the class I am calling in. Is it just me?
Peace.
----
Xian
|
|
|
|
|
What does you bind function look like?
Todd Smith
|
|
|
|