|
myshketer wrote: 1387475976
This is far too small. Where did you get that number ?
|
|
|
|
|
Is it possible in MFC to create an EXE file programmatically?
I hope you guys can help me on this. My application is gonna upload an image to a device. When it is uploaded it also contains meta information appended on the image data because my application has also settings. I want a way that i can preserve the image data and all its settings on the absence of the device. I want to generate an executable file and when i execute the file it can automatically upload the image and all the necessary information to the device.
With presence of the device:
image -----> application ------> image + meta information -----> device
Absence of the device:
(generate an exe file if the device is unavailable)
image ------> application -------> image + meta information -----> exe file
If exe file is executed:
(it will automatically do the same function as with the presence of the device
exe file -------->device
positive vibes
|
|
|
|
|
dacky wrote: Is it possible in MFC to create an EXE file programmatically?
Yes, assuming you knew the PE file format intimately.
"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
|
|
|
|
|
Yes,and for more information about exe files I saw a good article on the www.codeguru.com about exe files header of exe and PE and... if you see that article it will be helpful for you.
|
|
|
|
|
Thank you so much for the information
positive vibes
|
|
|
|
|
Thanks for the information. im gonna check that out
positive vibes
|
|
|
|
|
You're welcome I saw that article some times ago I dont remember its address but its a realy good article.
Good luck.;)
|
|
|
|
|
You could make the application yourself, and store a small image in its resources. Also, a string saying "<none>" in the string table.
Then, your main app can either put the image straight to the device, or make a copy of mystubapp.exe, and change the image resource to be the one to upload later, and the string to be the name of the resource?
That's all very handwavy stuff, but have a look at ::UpdateResource[^] for more information on my Cunning Plan (tm)
Iain.
|
|
|
|
|
Thank you so much for your ideas..i will try to investigate them and gonna post some comments soon
positive vibes
|
|
|
|
|
Hello,
I'm creating a Wizard generated MFC application. The right pane displays a CFrameWnd, which in turn displays various views at different times. Whenever it displays a CFormView, there is an unsightly sunken border around its perimetre. This sunken border does not appear if I display a CListView, for example.
How can I remove this sunken border?
Regards,
Sternoceral
|
|
|
|
|
Change the style of the window in OnCreate().
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
What function should I call from within OnCreate()? I've found a glossary of window styles, including WS_BORDER, which creates a bordered window, but there is no such style for creating a window without a border. I would have imagined that I'd have to explicitly state I wanted a border in my CFormView derived class, but that is evidently not the case....
Thanks
|
|
|
|
|
I've figured it out:
BOOL CMyView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
cs.style = WS_THICKFRAME;
return CFormView::PreCreateWindow(cs);
}
Thanks,
Sternocera
|
|
|
|
|
You may want to be careful in the way you do this.
This is the proper place to change window styles before a window is created...
BUT...
You've set a window style (without any other styles like WS_VISIBLE, which is fine if
that's what you want) but then you call the base class PreCreateWindow(), assuming the
base class implementation would keep your style setting.
It's safer to call the base class first to fill in the defaults for the CREATESTRUCT, then
alter the style flags as desired.
Cheers!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hello every one..
i want to import my openGL codes in vc++..
help me...
vikram
|
|
|
|
|
Why don't you outsource your development to the U.S.?
Oh yeah, you have to post your question one time.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Will you please stop reposting the same question again and again ?
Actually what are you trying to do exactly ? What do you mean exactly by ímport'??
|
|
|
|
|
|
Hi,
CString* strData;
When I am calling "delete [] strData" , I am getting a crash . What are the possible reasons for getting the crashes.
Taruni
|
|
|
|
|
you didn't initialise strdata as new?
CString *strData = new CString();
then use
delete strData;
|
|
|
|
|
I have initialised. I forgot to mention.
Before deleting , I am checking whether strData exists or not as follows.
if(strData)
{
delete [] strData;
}
The if condition is satisfied , but a crash when deleting strData.
Taruni
|
|
|
|
|
check *strData: that a pointer in your code.
Greetings from Germany
|
|
|
|
|
Why you need [] in delete as it is a single pointer variable ?
It is applicable when you are trying to delete an array of pointer.
CString* strData = new CString;<br />
<br />
if(NULL != strData)<br />
{<br />
delete strData;<br />
}
Regards,
Paresh.
|
|
|
|
|
Thank You Paresh.
But I am trying to delete an array of pointers of CString type.
Taruni
|
|
|
|
|
How did you allocate memory to strData pointer ? Please post the code snippet.
Regards,
Paresh.
|
|
|
|