|
This intrigued me, as I thought you could simply use a NULL brush, but no.
Can you use the Region::GetHRGN to get GDI (not +) HRGN, then use the ::FrameRgn function? (You'll need the Graphics::GetHDC method too)
Why the FrameRegion function isn't exposed, I don;t know - it's not as if its a new one...
Iain.
|
|
|
|
|
Not exposed? What do you mean?
FrameRgn() works ok.
Cheers,
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I meant the functionality wasn't exposed - or provided. As the Graphics object has a GetHDC method, and the Region object has a GetHRGN method, then I can;t see any reason why there wasn't a
Graphics::FrameRegion (Region *, Brush *, int xThickness, int yThickness);
method too.
I'm an old school Win32 fiddler (even if I can't see a SND_LOOP parameter when its kicking me in the face)
Our's is not to reason why - our's is to code and die.
Iain.
|
|
|
|
|
Well that makes sense. Apparently, without sufficient caffeine, I can't see all those little '+'s
after the "GDI"s so I misread your post, which is why I asked.
For GDI+ I believe they chose to handle this with paths (the GraphicsPath class) instead
(I know I read it somewhere, can't find it...).
This is also why the most complex Region that can be created directly is a rect.
Cheers!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
|
Thank you very much for your reply. I have used NULL_BRUSH but it doesn't work.
I have used Region instead of CRgn because of scalling facility using Region.
According to your instruction i have used following code
CRgn* rGn;<br />
rGn = CRgn::FromHandle(m_pRegion->GetHRGN(g));<br />
CBrush brush;<br />
brush.CreateSolidBrush(RGB(255,0,0));<br />
pDC->FrameRgn(rGn,&brush,10,10);
Now it is working............
Thank you so much...
|
|
|
|
|
hi
one of my security related project is having requirement to create a secure service.
that means users should not be able to stop the service.
i have done it using CreateProcess API.
But what more is required is to totally disable the Recovery Actions for the service same as the system critical services like "Event Log" (That enables event log messages issued by Windows-based programs and components) .
i want to make my service same as provided by windows that is "Event Log" or that of WebSence software.
So please make some suggestions for this.
Currently i am looking in the direction of DACL.
if there is any other way then please let me know.
Thanks a lot!
|
|
|
|
|
Hi All,
With MSMQ using VC++ what kind of messages we can transfer , i mean can we send and recieve binary data, SQL statements,STructures etc
Thanks
abhi
|
|
|
|
|
Well, since any message can be reduced to binary data - and IS behind the scenes anyway, you can send any kind of message you want. The processing of said messages is up to you.
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
|
|
|
|
|
The problem is as follows:
in a chat system.A and B are client ,C is server. There is only one tcp line between client and server.Client A send data to server C ,then server C transmit data to client B, but can B send data to client A throuth server C at the same time?I think there will be a problem,because B and C are sending Data to each other at the same time.There must be a conflict.My friends think there are no problem ,tcp can deal with it.
so can are a client and a server sending data on the same connection at the same time? or create establish two socket,one for receiving,the other for sending?
Thank you for helping me.
study
|
|
|
|
|
There should be no problem with this at the TCP/IP socket level. The application(s) involved being able to handle sending and receiving at the same time, well that is another issue.
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
|
|
|
|
|
Thank you for helping me
study
|
|
|
|
|
TCP can deal with your problem. What you call 'at the same time' is managed by the lower layers of the network system.
-- modified at 8:04 Wednesday 22nd August, 2007
|
|
|
|
|
Thank you for helping me !
study
|
|
|
|
|
I have to make an activex control through which i have to select multiples images files, zip them send to the server and again unzip them when dowloading from the server to the browser. All this is to be done through ActiveX control in vc++ and multiple files are to be selected through browse option.
Please help me out.
Thanks In Advance.
Dhiraj
Dhiraj
|
|
|
|
|
I am using CBitmapButton to display bitmap on the push button.
CBitmapButton m_bitmap;
m_bitmap.Create(NULL, WS_CHILD|WS_VISIBLE|BS_OWNERDRAW,
CRect(10,10,100,100), GetDc(), 1);
m_bitmap.LoadBitmap(IDB_PLAY,0,0,0);
This is not working
S.Yamini
|
|
|
|
|
If you are in VC++ try with create the CBitmapButton in your resource editor, set the Bitmap there, and then when you make click on the button set the property to visible as you want.
If not...
With your code you are creating the bitmap and loading in the button but, are u sure that your GetDC () is pointing where you need?
Take a look step by step with the debugger
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
thanks. It works now
S.Yamini
|
|
|
|
|
You are wellcome
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
yaminisridaran wrote: This is not working
See here for one that does.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
am a vb.net and java developer but i want to get back to my c++, but i dont understand why a small application should need a 50mb runtime install.
can an application developed with visual c++ 2005 , any kind run widout the .net frammwork? impossible huh?
phatkin
|
|
|
|
|
Simply start an unmanaged C++ project. Not a managed (CLR) one.
Use project type ATL, MFC or Win32.
prubyholl wrote: impossible huh?
Quite easy, huh?
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
thanks, and you can get all your forms and all the power of c++?????thanks
phatkin
|
|
|
|
|
You can get all the power of C++ and use MFC, qt, wxWidgets and WhatTheHeckElse as GUI Toolkit.
Windows forms are not possible - these are managed and require the installation of the .NET-Framework.
But you only need to install this once on a given PC. Like e.g. a Java VM.
Is this really a problem for you?
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
prubyholl wrote: can an application developed with visual c++ 2005 , any kind run widout the .net frammwork? impossible huh
As others have side, yup you can create native C++ apps without the .NET runtime. However, when you go to distribute your apps you will need to ship the updated C runtime Microsoft Visual C++ 2005 Redistributable Package (x86)[^] for older computers
With respect, I must disagree. A quick look at middle management in just about any corporation shows that the dodo not only survived, it's reproducing in record numbers. Christopher Duncan
|
|
|
|