|
Can you more explain about create a dynamic Bitmap
|
|
|
|
|
Please use the following code if u can use MFC.
UINT BITS_IN_A_BYTE = 8;
CBitmap BlankBmp;
BYTE *pbyBits = 0;
SIZE_T nBits;
nBits = m_uImgWidth * m_uImgHeight;
pbyBits = new BYTE[nBits + UNITY];
if( 0 == pbyBits )
{
return;
}
// Fill it with Black RGB values (R=0, G=0, B=0)
ZeroMemory( pbyBits, nBits + UNITY );
BlankBmp.CreateBitmap( m_uImgWidth, m_uImgHeight,
1, BITS_IN_A_BYTE, pbyBits );
delete[] pbyBits;
akt
|
|
|
|
|
Using Win32 APIs or MFC? Do you want a DIB, DDB, or a DIB section?
How many bits per pixel?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
What is the diffrent between the above ?
I need 32 bits per pixel (or 24).
Thanks
|
|
|
|
|
Hi,
I have one application which needs to notified whenever the my windows system was locked or unlocked.
so, can you plz give me the solution for this problem as soon as possible.
Thanks & Regards
swamy
|
|
|
|
|
Hi,
use "WTSRegisterSessionNotification()" to register your window to receive
the notification "WM_WTSSESSION_CHANGE" which has "WTS_SESSION_LOCK" & "WTS_SESSION_UNLOCK" parameter to identify that.
Best Regards
Raj
|
|
|
|
|
Thank U Very Much Raj.. for giving this solution !!
cheers
swamy..
|
|
|
|
|
swamy Narasimha wrote: I have one application which needs to notified whenever the my windows system was locked or unlocked.
Implement the ISensLogon interface. The DisplayLock() and DisplayUnLock() methods are of interest to you.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi,
i am new to dll. i have developed a DLL with menu resources....
i want use that resources, which means if i call any one of the function from my exe ,it should call that DLL.... then particular menu in that DLL have to load in my exe application.....how to do that......?
please if any one know this,reply me...
Thanks in advance
|
|
|
|
|
D.Mani wrote: ,it should call that DLL.... then particular menu in that DLL have to load in my exe application.....how to do that......?
AfxGetResourceHandle, AfxSetResourceHandle and AfxFindResourceHandle
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
how to get GUID or device name for usb device
|
|
|
|
|
prathuraj wrote: how to get GUID or device name for usb device
Can you be specific with your requirement?
Thammadi
|
|
|
|
|
i want to identify the usb drive connected on system.
for every conneted drive i want separate ID .
Now i got same id for all imation drive and same id for kingstone.
|
|
|
|
|
rerewr ;)
|
|
|
|
|
|
jkhasjkhsakjdhaskjlhd l.. is that your language!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
It seems you can speak like him.;P can you translate it.
I could found two words on your message "has","ask".
|
|
|
|
|
Hi,
I have a List control and I have to change the border color of it dynamically such as, on mouse hover, on focus etc. So I handled the WM_NCPAINT and draw the border with my own color. But when I have to change the color, how will I invoke the WM_NCPAINT. Can I send that message directly? Or is there any other functions that invokes this message indireclty?
N.B - I need to paint only the non client area.
Thanks
Naveen
[OpenedFileFinder]
|
|
|
|
|
If you're using MFC try something like this:
m_ctl.RedrawWindow(NULL, NULL, RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_UPDATENOW);
For raw Win32:
RedrawWindow(m_hWnd, NULL, NULL, RDW_ERASE|RDW_FRAME|RDW_INVALIDATE|RDW_UPDATENOW);
Steve
|
|
|
|
|
But in this case paint message is also generated. I want to invoke only the WM_NCPAINT message.
|
|
|
|
|
Naveen.R wrote: Can I send that message directly? Or is there any other functions that invokes this message indireclty?
Call SetWindowPos with SWP_DRAWFRAME .
|
|
|
|
|
|
Is there a clean way to convert a #define constant like '#define MYNUM 3' to a long string for a parameter like 'SetDlgItemText (hDlg, IDC_EDIT1, MYNUM) ;'
Thanks!
|
|
|
|
|
you'd have to use sprintf or something, just the same as if you had the number 3 inline. Which in fact you do, the preprocessor replaces MYNUM with 3.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks but I am still hoping for something easier.
|
|
|
|