|
thanks ,
actually this [^] is what i was looking for
|
|
|
|
|
That's it! That's a good link - thank you for sharing!
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
can you halp me finding good article (way) how to get system metrics (Volume serial number, processor ID , type of operating system, etc... )
thanks
|
|
|
|
|
Zilo(svk) wrote: can you halp me finding good article (way) how to get system metrics (Volume serial number, processor ID , type of operating system, etc... )
DiskId32
GetVersionEx()
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanx. Isn't there an easier way how to get the HDD Serial number ?
|
|
|
|
|
Zilo(svk) wrote: Isn't there an easier way how to get the HDD Serial number ?
Possibly, but then it may not work on so many platforms. Have a look at the Win32_LogicalDisk WMI class.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Lookup WMI (Windows Management Instrumentation) in MSDN.
|
|
|
|
|
Maybe this[^] link will be helpful for you
|
|
|
|
|
Dear All,
I want to develop a module in which I can block the number of ports (or all )according to requirement as well as open those ports. It must works for Windows XP(SP1/SP2)and above.
I have gone through Developing Firewalls for Windows 2000/XP By Jesús O.. article on codeproject, but it doesn't satisfy my criteria. Is there any other/simple method to block the ports?
Please help me. I am totally stucked on this point.
ThankYou In Advace.
Regards,
CraZyToLearn
|
|
|
|
|
Maybe this link will help: Firewall for Windows[^]
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Can u please tell me how to debug multithreaded application in vc++?
Regards
Trinadh
|
|
|
|
|
What seems to be the problem?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
The problem is if i put break point in function i am not able to find whether the function is accessing my multiple threads or not. My friend told that there is a procedure for debugging like putting one thread suspended like that.. if u know any procedure please let me know.
|
|
|
|
|
trinadh_t wrote: The problem is if i put break point in function i am not able to find whether the function is accessing my multiple threads or not.
How is the function supposed to "access" multiple threads?
Do you by any chance mean "the function being called from multiple threads"?
How do you expect your code to behave, how have you implemented that and what happens that you didn't expect?
trinadh_t wrote: My friend told that there is a procedure for debugging like putting one thread suspended
Well, you can suspend desired thread while debugging but I doubt it would help you here. It would probably make the problem harder to detect.
If you want to know from which thread a certain function is being called, I suggest you write the ID of the thread to the debug window; e.g.
TRACE( "MyFunctionName called from thread 0x%x.\n", ::GetCurrentThreadId() );
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
trinadh_t wrote: he problem is if i put break point in function i am not able to find whether the function is accessing my multiple threads or not. My friend told that there is a procedure for debugging like putting one thread suspended like that.. if u know any procedure please let me know.
are you sure you accessing it from Worker thread
!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
FloodFill doesn't works on printer. Are there other solution to colorized a ellipse? I need your help
many thanks
|
|
|
|
|
Why not just use CDC::Ellipse()
Just create a CBrush with the characteristics you need for the fill, a CPen for the border (if any), select them into the DC, and then call the CDC::Ellipse function.
How are you drawing the ellipse now that requires the use of CDC::Floodfill?
|
|
|
|
|
Because the ellipse is use to graphic chart pie and i have many colors in the ellipse for each part.
I haven't idea how to fill each part inside my ellipse.
Maybe used fillrgn but i don't know how do this?
|
|
|
|
|
Can you FloodFill() to an in-memory DC, and than copy that to the printer's DC?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
i do this directly on my printer (i print my view)
void myview::OnPrint(CDC *pDC, CPrintInfo *pInfo)
{
if (!pDC || !pInfo) return;
pDC->Ellipse(p1.x-(int)r,p1.y-(int)r,p1.x+(int)r,p2.y+(int)r);
pDC->FloodFill(p3.x,p3.y,0x0);
.....
}
In fact i draw all with my current pen: ellipse, part of pie and i do floddfill to fill each part.
must i used CreateCompatibleDC?
|
|
|
|
|
jerome_data wrote: must i used CreateCompatibleDC?
As I'm not much into GDI, I do not know. It wouldn't hurt to try, though.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You can use GetDeviceCaps to see if the device supports your drawing operations.
if (pDC->GetDeviceCaps(RASTERCAPS) & RC_FLOODFILL)
// flood fills are supported
...
if (pDC->GetDeviceCaps(CURVECAPS) & CC_PIE)
// pie wedges are supported
...
etc.
If they aren't supported by the printer device then you may need to do your drawing to a memory
DC and blit it to the printer DC.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I have created an MFC ActiveX Control through the wizard. In the 2nd Step of the wizard I have enabled the checkbox saying “Available in Insert Object Dialog”, so that I can use my control in Microsoft Office Application like MS Word, Excel, PowerPoint etc using Insert Objects.
I am using property sheet to change the text contents of my control. For that I followed the steps mentioned the MSDN Example CIRC.
http://msdn2.microsoft.com/en-us/library/c6hzbzz6(VS.80).aspx
My control features the following characteristics.
• Changing the painting behavior of an ActiveX control
• Adding stock properties
• Adding custom properties
• Responding to mouse events
• Adding custom events
• Using text and fonts
• Implementing ActiveX control property pages
• Using simple data binding for control properties
But at present I am stuck up problems.
1. Using property sheet I can update the text contents in ActiveX test container. But it doesn’t get updated in Word, and other Office Applications. In fact its not even recognizing any of the event fired by the user (like changing the color on mouse click, key press etc) in any of the office application.
2. I am using this control for assigning digital signatures to a document. For that I am using X509 libraries. But these libraries use Common Language Runtime (/CLR) Support. And if I enable CLR from the project settings, the control crashes while loading on the Office application, ultimately crashing the entire document.
|
|
|
|
|
Currectly I m working with "Programming Windows by Charles Petzold" and "Programming Windows with MFC second edition by Jeff Prosise" for learning Win32 and MFC . Are these resources will enough? or I'll need some more resources that you programmers would like to suggest.
Thanks a lot,
Regards,
Sumit Mandal
|
|
|
|