|
Hello All,
i am working in VS 6 using VC++ Win32 ::
I made a window using CreateWindowEx API and WNDCLASSEX Structure
with Background Brush as (HOLLOW_BRUSH) and Style as WS_EX_TRANSPARENT...
These 2 things made my window transparent....But the problem is when i maximize other window over my created window, its Background color changes to maximized window, that should not happen .......i always want my window background as desktop.....
Any suggesstion is heartly appreciated
|
|
|
|
|
This a "repainting" pbm : there is sort of an asynchrnous notification that needs be handled and but it is not.
WM_ACTIVATE issue ? I do'nt have sufficient facts to reason and tell you.
Good luck.
|
|
|
|
|
You want to make your window a sort of "hole" on the screen that lets you see the desktop all the time? I doubt there's a sane way of doing that, you could try hooking into explorer's process and somehow make the desktop window's part that your window is over being drawn onto your window but i don't much recommend it.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
|
Hello,
We have an application icon on desktop. If I drag and drop any file / folder to the MyApp desktop icon. Then it works fine on Windows XP and Vista. But, the same process is not working with Windows Ultimate 7. Also it is not getting focus while holding any file / folder on the MyApp desktop icon.
Other functionalities are working fine on all platforms; like doubleclick, rightclick->open file, etc.
Also Win7 can move file / folder using drag and drop functionality.
So request you to suggest me why this is happening and is there any way to overcome this issue?
Thank you.
With regards,
Shashikant
|
|
|
|
|
Windows Ultimate 7 ??
|
|
|
|
|
There 2 32bpp bitmaps with some images:
bitmap1
bitmap2
and graphics object g1 created from bitmap1
I set individualy alpha values in bitmap2 using LockBits:
Gdiplus::BitmapData bitmapData;
Gdiplus::Status s = pBitmap->LockBits(&Gdiplus::Rect(0, 0, pBitmap->GetWidth(), pBitmap->GetHeight()),
Gdiplus::ImageLockModeWrite | Gdiplus::ImageLockModeRead,
PixelFormat32bppRGB, &bitmapData);
if (s == Gdiplus::Ok) {
unsigned int* pPixels = (unsigned int *)bitmapData.Scan0;
for (unsigned int i = 0; i < bitmapData.Height; i++) {
for (unsigned int j = 0; j < bitmapData.Width; j++) {
if (mask(i, j) > 0)
pPixels[j] &= 0xFFFFFFFF;
else
pPixels[j] = 0x00FFFFFF;
}
pPixels += bitmapData.Stride / 4;
}
pBitmap->UnlockBits(&bitmapData);
}
And then draw it on bitmap1 using g1. But the alpha blending does not happen?
chesnokov
|
|
|
|
|
I don't see where you're doing any alpha blending. Alpha blending would mean blending the values of two bitmaps. What are you trying to do ?
Also, have you stepped through the code to see if mask(i,j) is ever > 0 ?
I assume that mask is a method, calling a method for every pixel will really slow your code down.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
sure. mask is a unsigned int version of
http://www.codeproject.com/KB/recipes/SSE_optimized_2D_vector.aspx[^]
it is inline operator(y,x) for m_data[y][x].
it has print() function so you can view its contents before hand.
I need to turn off some pixels in bitmap2 by setting their A values to 0, so if you draw it to bitmap2, the pixels with A = 0 will not affect bitmap1 pixels
chesnokov
|
|
|
|
|
|
Shouldn´t the PixelFormat be PixelFormat32bppARGB instead of PixelFormat32bppRGB?
|
|
|
|
|
Hi,
I have created a toolbar button. I want to give a short cut key to it. Can any body help me.
thanks all of them who open it
|
|
|
|
|
See about accelerators[^]
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_SYSTRAYDEMO));
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage (&msg);
}
}
You need to add resourecs :: accelelators there u need to mention shortcut key and resource id
|
|
|
|
|
Hi
I am using Visual Studio 2008 with VC++ settings
While i try to add a C++ class the application header include in not comming is it problem or we need to set any properties.
I any one know please help me
Thanks in advance
----------------------------
KRISHNA KUMAR T M
|
|
|
|
|
How do you add the class...
The include has to be added manually since the software does not know where do you want to use the class being added....
Is there a problem in adding the header manually?
Some things seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Can I use InvalidateRect() in place of CWnd::Invalidate().
|
|
|
|
|
You can, this is what Invalidate looks like from MFC headers:
_AFXWIN_INLINE void CWnd::Invalidate(BOOL bErase)
{ ASSERT(::IsWindow(m_hWnd)); ::InvalidateRect(m_hWnd, NULL, bErase); }
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hi,
I have an application which opens .doc file and saves it with .prt extention. I would like to know how can we provide icon new custom to these newly generated files.
Suhas
SNI
|
|
|
|
|
Look for "file associations", there are plenty of articles and useful hints around the net. It's basicly nothing more than modifying the registry afaik.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Hi All,
I want to write(append) word(data) into a file(CFile). I'm using
CFile to do the same..
CFile cf;
cf.SeekToEnd() is called before every
cf.Write()
But i need to write every data in a new line of text file.
In CFile how could i achieve this?
Thanks & Regards,
Anitha
|
|
|
|
|
void WriteFile(CString sFilename, CString sText)
{
CFileException CFE;
CStdioFile outFile;
if (outFile.Open(sFilename, CFile::modeCreate | CFile::modeNoTruncate |
CFile::modeWrite | CFile::typeText, &CFE))
{
// Seek to the end
outFile.SeekToEnd();
// Start outputting to the new file
outFile.WriteString(sText);
outFile.WriteString("\n");
// Cleanup
outFile.Close();
}
you can use above function to do this..i hope this will help
SNI
|
|
|
|
|
Do you know files can be open in append mode?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hi,
I want to change the FileName Extension with FileName Edit Box when we change the extension in Combobox, i am handling the CDN_TYPECHANGE NOTIFY Event with my hook procedure.
Thanks for any help or suggestion.
|
|
|
|
|
How do i implement a marquee in my dialog based application? any leads will be of great help
|
|
|
|