|
I did it like this for solid colour:
if (m_bFilled)
{
brush.CreateSolidBrush(m_Colour);
WhiteBrush.CreateSolidBrush(RGB(255,255,255));
}
else
{
LOGBRUSH lb;
lb.lbStyle = BS_HOLLOW;
brush.CreateBrushIndirect(&lb);
WhiteBrush.CreateBrushIndirect(&lb);
}
pen.CreatePen(PS_SOLID,1,m_Colour);
whitePen.CreatePen(PS_SOLID,1,RGB(255,255,255));
CBrush * pOldBrush = NULL, * pOldMaskBrush = NULL;
CPen * pOldPen = NULL, * pOldMaskPen = NULL;
dc.SelectObject((HBITMAP)(pLayer->dib->GetHandle()));
dc.SetBkMode(TRANSPARENT);
dc.SetPolyFillMode(ALTERNATE);
pOldBrush = dc.SelectObject(&brush);
pOldPen = dc.SelectObject(&pen);
MaskDC.SelectObject((HBITMAP)(pLayer->alpha->GetHandle()));
MaskDC.SetBkMode(TRANSPARENT);
MaskDC.SetPolyFillMode(ALTERNATE);
pOldMaskBrush = MaskDC.SelectObject(&WhiteBrush);
pOldMaskPen = MaskDC.SelectObject(&whitePen);
int Width = pLayer->dib->GetWidth();
int Height = pLayer->dib->GetHeight();
VBList<CPoint> Lines;
for(int i=0;i<m_Lines.GetSize();i++)
Lines.Add(m_Lines[i]);
dc.Polygon(Lines.GetData(),m_Lines.GetSize());
MaskDC.Polygon(Lines.GetData(),m_Lines.GetSize());
It would appear I only used paths in GDI+ to fill an area with a bitmap, but I still believe it's possible to do it using MFC and GDI. Look up CRgn in the MSDN for more info on what I have in mind, or if you want a concrete exmaple using GDI+, refer to my Doodle article here.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
I am looking for a software company on the cutting edge of programming(i.e. Programming in 256k or higher) if such a company even exists? Any help would be appreciated.
|
|
|
|
|
I want an source code for real time graph plotting for discrete event simulation project. I u have any then please send me as early as possible. OR if u know about any resource for concerned project then let me know.
Imran Farooqui
Imran Farooqui
|
|
|
|
|
Nimda virus propagates by scanning windows shares in the network.
I wanna write a program that searches my pc for shares, and removes them. This will save us a lot of time in the process of going thru 400 PCs and removing shares manually.
Where should I start looking ???
What APIs, etc....
Thanks a lot !!!
-dagga
|
|
|
|
|
Hi.
I've made a small program (a few years ago) that scans the local network for shared directories, it's not hard to do.
If you want I can send you the program (of course I made it just for fun so don't expect a great thing. Oh, and if you can find any comments at all probably will be in spanish
Anyway, if you wanna do it yourself, take a look at MSDN for this keywords:
WNetOpenEnum
NetEnumResource
WNetAddConnection2
Andres.
Buenos Aires - Argentina.
|
|
|
|
|
I am developing a project in VC++ regarding mathematics using VC++/MFC. I want to plot "graphs" of various algebraic and trignometric expressions. If you know any article or if you have source code for "exprssion plotting" then please let me know through this forum or e-mail me. I shall be very thankful to you. There are few articles on codeproject that deals with statistical data plotting but not a single that plots the "expressions".
Imran Farooqui
email: imran@imilabs.private.as
|
|
|
|
|
I have had problem with registering COM components on clean winNT (sp 6) systems. Now it seems that the c++ runtime libraries on a clean system are older than on a system with WinNT & visual studio 6 (sp 4). Is there any way (application/source) that can check for MISSING dependencies of a COM component (exe & dll)?
regards,
Brian.
|
|
|
|
|
What kind of COM object is it, was it created with ATL? The Depends utility (Platform SDK tools) will tell you what DLL's are being used.
Michael
|
|
|
|
|
We use "Unicode Release Min Dependency" but still we need to copy dll's like msvcrt.dll to the clean winNT system in order to register/run our (ATL) components. I know I can use visual studio's 'depends' nut that tells me the dependencies of a file and not which dependencies are missing on my system.
What I would really like is a program (or source code) with which I can check if all dependencies are installed on a target system.
regards,
Brian
|
|
|
|
|
To reduce our support problems, we are using "Release Min Dependency" or "Release Unicode Min Dependency" for our components. If the component are using MFC too (basically CString & COleDateTime for programmers that can't live whitout it), we change the MFC settings to "Static Library"
Although the components are a bit larger, they are almost standalone.
In our case, this means 15% more code size in our entire system. And a lot less support calls.
Furor fit laesa saepius patientia
|
|
|
|
|
We use "Unicode Release Min Dependency" but still we need to copy dll's like msvcrt.dll to the clean winNT system in order to register/run our (ATL) components. I know I can use visual studio's 'depends' nut that tells me the dependencies of a file and not which dependencies are missing on my system.
What I would really like is a program (or source code) with which I can check if all dependencies are installed on a target system.
regards,
Brian
|
|
|
|
|
You can always write another msvcrt.dll and so, on the instalation directory of your component. Your dll will be loaded instead of the \<win..>\System32
Furor fit laesa saepius patientia
|
|
|
|
|
Matrix theory
I am looking for something along the lines of crossword finder or word search.
The user enters in the dimentions along with the letters in each RowxColumn if yu have the double looping structure please let me know
thanks
karen
kginsberg@hotmail.com
|
|
|
|
|
I'm trying to write a program which needs access to the id3v2 tags in some MP3s I have downloaded and compiled id3lib from sourceforge successfully (to a dll).
http://id3lib.sourceforge.net/
I am now trying to write the code in my program.
I have looked at the documentation for the API online:
http://id3lib.sourceforge.net/api/index.html
I have tried copying some of the code snippets from the first page (that is the only help they give you!). I have tried to alter it so that it reads the TIT2 field from a sample mp3 as a test. I renamed one of my MP3s to song.mp3 put it in the directory with the compiled exe and ran the program. It should have printed the title on the screen (it is a simple console program just for testing). It doesn't but I don't know what I am doing wrong.
What I would like to request is some proper sample code, with explanations, for a program which uses id3lib to read the title tag from an mp3 file and prints it to the screen. A helpful addition to make it useful to everyone would be code for writing a new title to the mp3 file.
Please help
Thankyou in advance.
|
|
|
|
|
Hi,
I have a snapshot file (.snp) Certain tools are available which read the code and display the formatted contents. Is there any way to convert this into a normal text file, or a doc (ms word) file?? Can i get the source code of the snapshot viewer or get my hands on the syntax of a snapshot file??
Any help would be welcome.
Thanks.
Ankur.
|
|
|
|
|
Hi.
I would like to know how an application to block/release access to the network by the IP from the station.
Why do I wannt to do it?
I have a network with 16 win 9x that my clients can access the web. they pay per minute, sou I want develop a program to be installed at each machine that do this:
- my custumers will choose how many time they will be connected,
- they will click on start button and then they will acess;
- 5 minutes before the time expires they will be prompted to renew the connection;
- at the end of the time they must be blocked.
I need some ideas how to do this.
Thanks in advance
Marco Andrieli
|
|
|
|
|
This might not be relevant, but I will post anyway...
You could probably do this without coding much if you use Mirosoft ISA server. If you are not familair with ISA server, check out http://www.isaserver.org
What you could do is create an ALLOW or DENY protocol rule for certain IPs or users. You would then schedule these rules so you could enable these rules for certain times only (eg. Now till 15 mins more).
ISA server could be configured from a scripting language, so you could make a script that will help you configure ISA server (calculating of schedules,payments etc..).
Notifications 5 mins before would have to be coded seperately, however, that is the easy part.
If you try this out, let me know!
Jeremy.
"Hey man, Taliban, Tali me Banana."
|
|
|
|
|
I have added a 'version' resource to my project, and am using a build auto increment add in. How can I read the current build number from within my program to display it in the about box.
Thank you,
Novice
|
|
|
|
|
I am trying to use this API function but having a lot of troulbe. When I try to compile it does not recognize the BROWSEINFO structure. Is there a header I need to include. What about shell32.dll, if so how do I include it in my project.
Thank You,
Novice
|
|
|
|
|
shlobj.h
---
Better to be silent and thought the fool, than to open your mouth and prove it!
|
|
|
|
|
PJ Arends:
Thank you, thank you, thank you ...wasted half a day on this...thanks again
|
|
|
|
|
I am trying to find some code which will enable me to determine what domain or workgroup a given host is in.
There is a function available on Win2000 (NetGetJoinInformation), but I am using NT4.
Any ideas?
---
"The way of a fool seems right to him, but a wise man listens to advice" - Proverbs 12:15 (NIV)
|
|
|
|
|
|
Hi,
I try to implement an ActiveX that creates a thread (through AfxBeginThread). This thread is calling a custom event. When I try to terminating the thread, it makes an uncaught exception. Even, when I try to communicate from the custom event with the activeX (by testing a property for example), I get a memory problem.
How can I solve these problems ?
thank you very much for your help.
|
|
|
|
|
Hi all,
I need to find a way to put scancodes in the keyboardbuffer. I need scancodes because serveral apps on the system only react to scancodes (most of them are accessibility tools like JAWS) On Win2K I'm using SendInput and that works fine but I can't find anything similar on Win9X.
Any thoughts ?
|
|
|
|