|
A window that erases its background normally, yes.
Transparent window no
Also I was assuming the OP's drawing wasn't done in WM_PAINT handler.
Bad assumption, bad answer
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
It works using Invalidate and updatewindow... thanks!
However, it seems that it does not work for the transparent dialog (using WS_EX_TRANSPARENT). The dialog becomes opaque if I use those function... Any idea?
Thanks!
-Houari
|
|
|
|
|
Then you'd need to redraw (or force to be redrawn) whatever is under the window.
Or whatever is under the drawing you want to erase.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
hmm...
actually I make an application to mark something on top of a media player
so, the main window contains the media player activeX control, and I put transparent modeless dialog on top of it. I wonder how to redraw the player in main window...
-Houari
|
|
|
|
|
Check out the InvalidateRect() API to mark a window or windows to be repainted.
(Same API used by CWnd::Invalidate() from my original reply)
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
I have a workspace A and have many projects (about 25) in this workspace A.
I have created 10 new projects (dll project) and want to add in to A but I think workspace is not clearly. So , I don't add 10 new project but add a new project B in to this workspace A and when I compile B, compiler will jump to compile 10 new projects and I receive 10 dlls correlative.
please help me!
Papais `
|
|
|
|
|
dungpapai wrote: want to add in to A but I think workspace is not clearly.
What does this mean ?
dungpapai wrote: So , I don't add 10 new project but add a new project B in to this workspace A and when I compile B, compiler will jump to compile 10 new projects and I receive 10 dlls correlative.
please help me!
Does project B has dependencies set of those 10 projects ? but in that case, those projects should be in same workspace. Can you help us to understand problem in better way ?
|
|
|
|
|
I am trying to build MagickNet (http://midimick.com/magicknet/) and I am not very familiar with c++ but I got pretty far. I am using VS2005 c++ Express and the Platform SDK 2003 R2 is loaded an configured. I downloaded the source for this project and the source for the ImageMagic and GhostScript code to satisify any requirements that MagickNet needed.
I started this project by clicking on File -> New -> Project from existing code. I hacked away until I could right click on each cpp file and compile it with out errors. I have my configuration for a release build. I don't care for the debug because I only need the release version.
However when I try to build the project I get the following error:
------ Build started: Project: MagickNet, Configuration: Release Win32 ------
Compiling...
Stdafx.cpp
MagickOptions.cpp
MagickNet.cpp
MagickImages.cpp
MagickImage.cpp
MagickGeometry.cpp
MagickColor.cpp
AssemblyInfo.cpp
Linking...
LINK : fatal error LNK1104: cannot open file '.\Release\AssemblyInfo.obj'
Build log was saved at "file://c:\Documents and Settings\cjohnson\My Documents\Visual Studio 2005\Projects\MagickNet\Release\BuildLog.htm"
MagickNet - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I don't know much about VC++ but it seems like it is not creating the object files. If you need more info I can post off of my command parameters from VS2005 c++ express edition.
Can anyone help me please?
Thanks
|
|
|
|
|
If the file has been compiled, the .obj file should be there. Verify that it has been created and that it is located where the linker is looking for it. It's possible it's being output to a different directory after your 'hacking' of the configurations.
|
|
|
|
|
When i use the func GetWindowRect(), this only returns the current visible window's rect, but i want to get the all scrolling size in this window.(for example GetWindowRect() Get the rect's size is (400*300), but the actual scrolling size is (400*800)).How can i get this value?
|
|
|
|
|
What is a "scroll window"?
You can get info for the range of a scrollbar from the scrollbar itself with GetScrollInfo().
If you mean an MFC CScrollView() I believe you can use CScrollView::GetDeviceScrollSizes().
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
This is new error for me, and MSDN has been less than helpfull on the matter.
bool D3DSpriteBatch::Add( D3DQuad* pQuad )
{
if ( find( m_liBatchQue.begin(), m_liBatchQue.end(), pQuad ) )
return false;
m_liBatchQue.push_back( pQuad );
return true;
}
where m_liBatchQue is an std::list< D3DQuad* > .
The error is
conditional expression of type 'std::list<_Ty>::_Iterator<_Secure_validation>' is illegal
|
|
|
|
|
Is your class a template? Can you show the declaration and definition of "m_liBatchQue"?
Steve
|
|
|
|
|
No, it's just a plain class.
declared as:
std::list< D3DQuad* > m_liBatchQue;
Just your average run of the mill std::list declared as a class member.
I should also note that D3DQuad is itself a standalone class. Well, it's more of a struct with a few ease of use methods.
class D3DQuad
{
D3DQuad( void );
~D3DQuad( void );
};
I have got around the issue by looping the list myself and comparing each member, but I can't understand why std::find is giving me this error. It's not the first time I have created a list of pointers and I have never had this trouble before.
|
|
|
|
|
using VC++ 6.0 sp5, Windows XP pro. SP2
I need to give user the ability to edit column structure in CListCtrl.
Problem: when data exists in rows and the user inserts or deletes columns
The row/column data will get mixed up, data will be placed in wrong column.
Microsoft has published Bugs to this effect but it appears to be for older versions.
Is ClistCtrl not capable of dynamic column structuring ?
-- modified at 13:19 Thursday 22nd February, 2007
|
|
|
|
|
This is my first time posting to something like this so bare with me.
I am using Visual Studio 2005 and C# but i can integrate visual C++ code using a dll. I've looked everywhere and I can't seem to find a way to do what I want. The goal is to be able to access a GIF file's color table. I'm trying to reduce the number of colors in that image and the best way to do that I am assuming is by accessing the color table and taking the top X number of colors and applying that to the image. I have the applying part working, but the problem is getting those colors to begin with. Currently I am going through the entire image(which is required for my purposes to be 2400 px by 2400 px) and finding the color of other pixel on every other line. This takes a little time and isn't quite as accurate as I would like.
Thanks!
|
|
|
|
|
The easiest way I know of is to use GDI+.
If you load the GIF as a GDI+ Bitmap object then you can use:
1) GetPalette()/SetPalette() to read/write the color table
2) LockBits()/UnlockBits() to access the pixel data to change pixels to index the appropriate
entries in the new color table.
3) Save() to save the new image.
With C# you can use the .NET GDI+ wrapper classes (System.Drawing.Bitmap) I believe.
Then you don't have to use C++.
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
can i remove the ok,cancel&apply buttons provided by the framework when using property sheets and provide my own buttons.Please anyone help me.
-- modified at 14:25 Wednesday 21st February, 2007
|
|
|
|
|
Yes... I believe you can get the buttons using a function like GetDlgItem(...) from the property sheet (which is the parent window of the buttons and the pages), and you can then move them, hide them, resize them, or change their text.
You can create your own buttons on the property sheet as well, but if you only need one or two features, you should be able to just change the text on the existing buttons, and override their functionality.
If you have to create your own controls, you will need to manually add message handlers for their events.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
thanks for replying me.It is really helpfull for me.
|
|
|
|
|
Is there any simple way how to get desktop rect - but without taskbar?
Thank you
viliam
|
|
|
|
|
Check out SystemParametersInfo(SPI_GETWORKAREA...)[^]
Mark
"Do you know what it's like to fall in the mud and get kicked... in the head... with an iron boot?
Of course you don't, no one does. It never happens. It's a dumb question... skip it."
|
|
|
|
|
thank you,
that's I was looking for
viliam
|
|
|
|
|
i'm writing an app with the XLAutomation class included into it, the app builds fine, but when i run it sometimes it seems i can't access Excel (read/write) and then i get this error message:
From the XLAut.. class: "ReleaseVariant: unknown type" and "ReleaseVariant: Array contains non-variant type"
and when i debug the error further:
"Unhandled exception in "MyApp" (OLEAUT32.DLL): 0xC0000005: Access Violation"
And it wont go away even if i close the app and restart it, seems theres something in the memory.
somebody know what this means? any solutions?
thanks
|
|
|
|
|
More information would be helpful. Can you show a call stack when the exception is generated and the source code around the line in that triggered it?
Steve
|
|
|
|