|
|
I want to skim many bitmaps files,so I show the bitmaps in listctrl in items,and the icon is the bitmaps' shrinked ones~~ And you can find this in windows before you open a bitmap file~
But....how to do it ~`?
Thanks`
|
|
|
|
|
|
CImage::Create(...) lets me create an alpha channel,
but how do I change the bits in it?
I'd like to use TextOut and create a blurred shadow effect for a text image.
|
|
|
|
|
if you want to set some effects to your images or texts you can use of GDI+ for example(GetTextContrast or Graphics::DrawString) and also CImage has a function AlphaBlend that you can use of it.
|
|
|
|
|
HappyFunBall wrote: but how do I change the bits in it?
The CImage::GetPitch() and CImage::GetBits() methods provide direct access to the image's pixel
data.
CImage::GetBits() gets you a pointer to the image pixel data.
CImage::GetPitch() is the bytes-per-row, and if it's negative, CImage::GetBits() returns a pointer
to the LAST row of the image, so you can use the signed value returned by CImage::GetPitch()
to iterate through the rows of pixel data.
The layout of the pixel data varies depending on the format of the bitmap.
For a 32bit-per-pixel ARGB image, the pixel data bytes are layed out RGBARGBARGBA... so if you
take each pixel as a DWORD, the high order byte is the alpha channel byte.
Hope this helped!
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hey,
I have appended a new menu item at the end of the existing menu
i.e after Help Menu.
Now i want to create its submenu tried not not successful.
Pls help me out
Regards,
Pankaj Sachdeva
|
|
|
|
|
See this thread "How to close the running appliaction" "Creating and Adding Menu at runtime" below the forum.
|
|
|
|
|
|
It was a syntax error;) oh I think you are a new asker.After make it whats problem what you are not successful?
|
|
|
|
|
I have appended a new menu item at the end of the existing menu
i.e after Help Menu.
Now i want to create its submenu using InsertMenu tried not not successful.
I basically want to create the submenu that is the main task
|
|
|
|
|
|
As we know,all the project based MFC has a main thread object theApp.
For some reason,I have to send messages to it,but how should I return messages to the posters?
Thanks.
|
|
|
|
|
kcynic wrote: For some reason,I have to send messages to it
That's fine.
kcynic wrote: but how should I return messages to the posters?
Well, it depends on the posters nature (for instance, it maybe the main thread itself).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Would you like to explain it more clearly?
I think I did not understand you very well.
Thanks
|
|
|
|
|
I think you should describe with more details your problem.
It isn't difficult to post messages to the main thread of an application. As result, the main thread will perform some actions, if you want the main thread to communicate with the message poster then the kind of the performed action will depend on the nature of the poster itself (for instance, if the main thread itself posted the message, the related answer maybe a function call; on the other hand, if the message posting happens in another thread then the main thread may answer by changing some shared data value, etc..).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
I have thread which has a socket member,and I should using such thread to send data to the others in different windows.But if I simply pass the thread pointer there would something go wrong.So,I want to create the thread in the theApp.So,other dialog would send messages to it and also should get the returned messages from the theApp.
That is my task.
Thanks very much.
|
|
|
|
|
Hi,
I use a global mouse hook(WM_MOUSE_LL) to capture all mouse action.
This lead to my mouse delay and the mouse is not sensitive.
You'll feel very bad when you use move the mouse.
How can i deal it?
Or is there other smart way to capture mouse action?
I must capture all mouse action in my system,Like,
LRESULT CALLBACK MouseProc(int iCode,
WPARAM wParam,
LPARAM lParam
{<br />
process... ... <br />
return CallNextHookEx(m_hMouseHook, iCode, wParam, lParam) ;<br />
}
Thanks!
Avril-Sun
|
|
|
|
|
This link may help you out.
http://www.flounder.com/hooks.htm
I don't know how much effective it will be.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
|
Hi,
How can i close a running apllication through programming.
I have a application ,i want whenever i run my application MS-Outlook should be clode,if running.
How can i do this.
|
|
|
|
|
Send WM_CLOSE to that program.
|
|
|
|
|
But sir how can i catch the running OutLook.
|
|
|
|
|
|
I elborate the problem:
Whenever i run my Program.exe file .I should check for running OutLook.exe file.If OutLook.exe is running ,close it otherwise nothing.
|
|
|
|