|
Comment out the line and try to recompile.
|
|
|
|
|
|
Look up the erorr, C2146, via http://www.google.com/microsoft or on http://msdn.microsoft.com. It is very difficult to troubleshoot code without being able to view it.
George
|
|
|
|
|
Trust me I have done that, that dont help me at all.
If I remove CFiles m_GetFiles;
Then I can compile and it works fine. I can use funktion in he class in I let it be,
m_GetFiles.ReadInFile; // This work but if I compile now I get that eller. And If a compile that class I dont get any error. Im going cryase at this.
|
|
|
|
|
Larsson wrote: CFiles m_GetFile;
try
CFile m_GetFile;
instead.
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.
|
|
|
|
|
Hi everybody.
I just can not set a transparency for the cation part of the group box control. The project is a standat Visual C++ windows application, no MFC, I use ATL for windows (CDialogImpl), but it should be the same as for any other project that does not include the MFC. So, I can intercept the message that paints the static controls, and make static controls transparent like this in OnCtlColorStatic:
::SetBkMode((HDC)wParam, TRANSPARENT);
return (LRESULT) GetStockObject (HOLLOW_BRUSH);
but how to do that for a group box control? The caption of it gets a weird gray color, and I just can not get rid off it.
Thanks.
|
|
|
|
|
You have a handle to the DC, did you trying setting the text color on it?
|
|
|
|
|
The handle is to the message that notifies that the static controls needs to be re-drawn, there is no such message for a group-box control. Anyways, messages in ATL are much more complex than those in MFC. I am currently playing with the atlcontrols.h that comes with the new ATL 8 and is supposed to wrap most of the control's functionality...if someone does not help me here in the meantime.
Anyways, thanks for your reply.
Sarajevo, Bosnia
|
|
|
|
|
A groupbox control IS a static control, thats why the messages are the same.
|
|
|
|
|
No, a group box control is a BUTTON control, believe it or not.
|
|
|
|
|
damir_tk wrote: ...a group box control is a BUTTON control...
Indeed!
ATL draws its own controls? It should be much easier to make transparent then.
Making the Windows group box (BUTTON) control text transparent, OTOH, good luck!
|
|
|
|
|
Oh, sorry for that, I stand corrected.
|
|
|
|
|
A group box is actually a button, so you need to handle WM_CTLCOLORBTN .
|
|
|
|
|
Yup...I already know that, however the group box never receives the WM_PAINT message, even tho it is a button. One of those nice little things that makes us a true masochists programming in Visual C++.
Thanks.
|
|
|
|
|
damir_tk wrote: ...however the group box never receives the WM_PAINT message...
Neat! When does it draw itself then?
|
|
|
|
|
|
Thanks for the link.
I looked at the code. I saw no "subclassing" going on besides what MFC already does for you.
It is an owner drawn control implemented by overriding WM_PAINT and drawing the entire control
instead of using the Windows ownerdraw interface.
My point in previous posts is that no matter what wrapper you are using, if the control is a
Windows control then aside from making an owner-drawn control, there's no way to magically
change the way the control draws itself. Unfortunately, Microsoft chose to not fully implement
transparency (via WS_EX_TRANSPARENT) in all controls and multi part controls like the group box
that require more than one background brush do not work well with the WM_CTLCOLOR messages.
I have no idea how ATL wraps a window, but if there's no way to intercept every message to the
window then it sounds like a pretty lame wrapper. Even the lowly MFC lets you do that
|
|
|
|
|
Yup...thanks for your post. Looks like I am heading for another sleepless night.
|
|
|
|
|
Hi, I made a BHO for a Single Sign On system and worked fine in IE6, but doesn't in IE7.
I belive IE7 is blocking the messages sent to and from my controlling app, because PostMessage and SendMessage return OK but my app dont receive any message.
Also my BHO Dll haves a shared data area, and the data isn't beign refreshed.
Does anyone knows if IE7 block messages sent outside IE?
|
|
|
|
|
You should monitor the IE7 window with spy++ and watch out for the message you are sending it.
|
|
|
|
|
Thanks mate, I can see a lot of WM_USER messages going out, but not mine's
I dont know whats happens, in IE6 the messages were sent ok
I'm afraid MS people limited BHO communication due malware stealing logins before SSL encryption
|
|
|
|
|
Are you using XP or Vista? If it's Vista, then the behavior you're seeing is caused by extra security features that are turned on in protected mode.
|
|
|
|
|
I'm testing the BHO in XP SP2 so no protected mode is involved :S
My boss isn't going to be happy if I tell him that we must abandon the project or do it for Firefox
|
|
|
|
|
Hi.
I am a newbie in programming.
Here is a problem which I want to know.
I have one small exe file.
And I want to use one function of that exe file in my program.
Is it possible to call the function in my program?
If so, please give me the way how to do that.
Thanks for your help, sincerely.
Mr. Sonu
|
|
|
|
|
SoftDeveloper wrote: I have one small exe file.
And I want to use one function of that exe file in my program.
Is it possible to call the function in my program?
It's not possible to directly call a function in another EXE from your EXE.
How is it you even know the small EXE has a function you need?
Mark
|
|
|
|