|
A bit of common sense might tell you to look at www.programmingparadise.com and further look at the code for Vikas Yadav's ftp server code as a starting point. But then people are lacking in strange ways.
I'm an alien, I'm an alien
it's a beautiful life....
Bush
|
|
|
|
|
I would like to see detailed article or the fragments of a code devoted to features of a printing graphics to the printer. In particular filling of areas by brushes, others than pattern and solid
|
|
|
|
|
You can only use solid brushes, because you need to stretchblt to a print DC. Anything else simply will become a dithered solid colour when you stretch it up.
Did I answer a version of this question in the C++ forum ? Maybe you should explain what you're trying to do ?
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.
|
|
|
|
|
The problem is to force the following code correctly print to the printer:
CMyView::OnDraw(...)
{
CBitmap m_bitmap;
m_bitmap.LoadBitmap(IDB_...);
CBrush m_brush;
m_brush.CreatePatternBrush(m_bitmap);
CBrush * pOldBrush = pDC->SelectObject(&m_brush);
pDC->Rectangle(0, 0, 300, 300);
pDC->SelectObject(pOldBrush);
}
This code correctly draw on the screen, but on the printer is a empty rectangle?
|
|
|
|
|
To reiterate: a pattern brush cannot be stretched, and you need to stretchblt or set different logical units to compensate when drawing to a print DC. Therefore you cannot, cannot, print using a patternbrush. You'll need to grab the bitmap and stretchblt it instead.
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.
|
|
|
|
|
So, there is no way to fill in a figure any figure at a seal!
If it is possible, result please an example of a code!
|
|
|
|
|
So, there is no way to fill in a figure any figure at a seal!
If it is possible, result please an example of a code!
Not with a pattern brush, no. To fill in any figure, define it as a path and stretchblt a bitmap into it.
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.
|
|
|
|
|
If it is possible specify a sample code as it to make, and I not absolutely understand that!
|
|
|
|
|
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."
|
|
|
|