|
jgeorge21 wrote:
fileName[5] 46 '.' char
fileName[6] 116 't' char
fileName[7] 103 'g' char
fileName[8] 97 'a' char
From MSDN:
[quote]
Bitmap::Bitmap(filename, useIcm)
Creates a Bitmap object based on an image file.
Bitmap(
const WCHAR* filename,
BOOL useIcm
);
Parameters
filename
[in] Pointer to a null-terminated string that specifies the path name of the image file. The graphics file formats supported by GDI+ are BMP, GIF, JPEG, PNG, TIFF, Exif, WMF, and EMF.
[/quote]
I do not see tga in the list of supported formats.
Try http://www.codeproject.com/bitmap/cximage.asp[^] instead.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
hello
This is meant as a theorethical programming question basically but if you could acompany some examples in c and vbs to your answers as examples or proof of concepts that would be lovely.
So the question is:
Can code be archived(made smaller than it actually is)?
Like for exemple could I have a function make_code_big_again that could receive as a parameter a array like structure, string wharever containing some code that was made small andmake it bigg again and run it???
or could this be done with binary files???
like could I somehow archive them, put them inside the exe in a big string or as resources and then unpack them, but withouth utilising any third paryt software like winrar or winzip cause that wouldn't make the program very platform independent.
???
thank you for your time
|
|
|
|
|
Sure, if the code is run on an interpreter.
|
|
|
|
|
something like an auto-extractable zip archive ? yes it's possible...
I think that you can find an example somewhere here on codeproject.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
|
how to create thread in runtime
|
|
|
|
|
UINT thFun(void*){
return 0;
}
fun(){
AfxBeginThread(thFun,NULL); //starts thFun() in a new thread
return 0;
}
This creats a worker thread. There is something called UI thread also-
search cp for them ...
suhredayan There is no spoon.
|
|
|
|
|
I have 2 parse a xml in my vc++ programs , which parser should i used , how 2 implement that.
Rahul Agarwal
|
|
|
|
|
there is very well documented Interface in COM known as IXMLDOMDocument,IXMLDOMElement which help you in parsing the XML.
MSDN has Example to show working of IXMLDOMDocument, IXMLDOMElement .
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hain Rahul,
Here is your Sample Code For XML Parsing in both VB and vc++. i hace taken this code from the MSDN
[Visual Basic]
Example
The following Microsoft® Visual Basic® example creates an IXMLDOMAttribute object from the first attribute of the root and displays the object's value and xml properties.
Dim xmlDoc As New Msxml2.DOMDocument
Dim root As IXMLDOMElement
Dim objDOMatt As IXMLDOMAttribute
xmlDoc.async = False
xmlDoc.Load ("books.xml")
Set root = xmlDoc.documentElement
Set objDOMatt = root.firstChild.Attributes.Item(0)
MsgBox (objDOMatt.Value)
MsgBox (objDOMatt.xml)
[C/C++]
Example
#import "msxml3.dll"
using namespace MSXML2;
#define CHECK_AND_RELEASE(pInterface) \
if(pInterface) \
{\
pInterface->Release();\
pInterface = NULL;\
}\
#define RELEASE(pInterface) \
{\
pInterface->Release();\
pInterface = NULL;\
}\
_variant_t varValue;
BSTR bstrAttributeName = ::SysAllocString(_T("dateCreated"));
IXMLDOMElement *pIXMLDOMElement = NULL;
IXMLDOMDocument *pIXMLDOMDocument = NULL;
HRESULT hr;
try
{
hr = pIXMLDOMDocument->get_documentElement( &pIXMLDOMElement);
SUCCEEDED(hr) ? 0 : throw hr;
if(pIXMLDOMElement)
{
varValue = _T("year 2000");
hr = pIXMLDOMElement->setAttribute(bstrAttributeName, varValue);
SUCCEEDED(hr) ? 0 : throw hr;
hr = pIXMLDOMElement->getAttribute(bstrAttributeName, &varValue);
SUCCEEDED(hr) ? 0 : throw hr;
if(varValue.vt != VT_NULL)
{
::MessageBox(NULL, _bstr_t(varValue), bstrAttributeName, MB_OK);
bResult = TRUE;
}
RELEASE(pIXMLDOMElement);
}
::SysFreeString(bstrAttributeName);
bstrAttributeName=NULL;
}
catch(...)
{
if(bstrAttributeName)
{
::SysFreeString(bstrAttributeName);
bstrAttributeName = NULL;
}
CHECK_AND_RELEASE(pIXMLDOMElement);
DisplayErrorToUser();
}
// Release pIXMLDOMDocument when finished with it.
Output (in a message box)
Year 2000
---
And Please Don't refer me BY SIR,as i don't deserve it yet,may be after 10 or 20 years
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
hello friends
i have to make project on ids. so how shld i start
using vc++. plz guide me soon.
thanx
bye
|
|
|
|
|
good for you ...
this should help you start ...
int id;
but more seriously, HUH ? what IDs, and in which context ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
IDS means "intrusion detection system"
|
|
|
|
|
like in alarm systems ?
2 other people asked you the same question, you should rephrase your original question to include as much information as possible so that we can help yip ( if possible ).
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
What do you mean by ids ?
suhredayan There is no spoon.
|
|
|
|
|
IDS means "intrusion detection system"
|
|
|
|
|
r u talking about Some type of Identification systems here Ms Smriti
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
no IDS means "intrusion detection system"
|
|
|
|
|
OK,So from where is intruder coming to your computer, i.e.
Virtual Intruder from net or other virtual Sources or IN real way, as any unauthorized person is trying to use your computer.
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
I hope you have already seen this
http://www.datanerds.net/~mike/snort.html
This is a port of SNORT(www.snort.org), which is one fo the most widely used IDS. Sadly though, it's quite a old version, but could give you a starter. Sadly, I am not a experinced programmer in VC++ to help you out in this matter.
Amitabh
|
|
|
|
|
Hi all,
First posting from me. I'll try to be concice.
I'm writing an app. In this app I've got a button "send e-mail". When I press this button, I can start a new e-mail with the address correctly filled in by getting the mail-tool path from the Registry and using the following command line
(psuedo code - cs means a CSrring)
CString csApp = GetAppPathFromRegistry( "Outlook.exe");
csApp += "/c ipm.note /m " + csEmailAddress;
My question is, what are the command line switches to add text to the "subject" and "body" fields?
I've trawelled the net and can only find VB examples. So, it's got to be do-able. I just can't find the command line options to fill out these fields from a non-VB app.
Any help, much appreciated.
Matt
Birmingham
UK
|
|
|
|
|
Suggested way is to use followilng:
ShellExecute(NULL,"open", "mailto:code@project.com?Subject=hi&body=its me","","", SW_SHOW );
Which takes everything as default, like email application, default mail account etc.
suhredayan There is no spoon.
|
|
|
|
|
Thanks! Fantastic. Worked first time. I'm very grateful.
Matt
|
|
|
|
|
Hi All,
I have developed an MFC ActiceX Control. Say Shapes. and I have Imaplemented function for drawing Circle and Ellipse. Now I need to Update this component for Implementing the functionality for drawing Square and Triangle. Say ShapesNew.
I just want to inherit the functionality of the Control Shapes, to the Newly Created one, the ShapesNew through Dynamic linking.
ie. For Invoking the Function Circle, It must use the Old .OCX file for linking.
How can this be achieved..
TIA
Rajesh
|
|
|
|
|
Rajesh_Parameswaran wrote:
I just want to inherit the functionality of the Control Shapes, to the Newly Created one, the ShapesNew through Dynamic linking.
Are you looking for implementation inheritance in COM ?
suhredayan There is no spoon.
|
|
|
|