|
Generally i want to store the image, image size and its extension in a file(it may be any file type) when user click save option in the menu. when he want to display that image after some time, he can get the image by read that file and display that image in the screen.
I use Load() to load the image using CImage Class.
|
|
|
|
|
It's still not clear for me what you should do with this file. So, you have a button on which the user can click on and you want to save the image with some properties in a file.
Bernaad wrote: when he want to display that image after some time, he can get the image by read that file and display that image in the screen.
That's the part I don't get. This file will only be opened by your program right ? So why do you have to make things complicated like that ? Why don't you simply save the image directly and then retrieve those properties later when the user wants to disaply the file. It will avoid you to make your own complex file type with duplicate informations that are already contained in the original file.
|
|
|
|
|
Bernaad wrote: Now i want to store the image in a .txt file
Please elaborate (you're walking on the edge of the nonsense).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
CPallini wrote: you're walking on the edge of the nonsense
Looks like the holiday worked. It has added more to your sense of humor.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
THHB back again!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
or there was a very powerful troll here [^], since first vote was a five.
BTW: nowdays people don't appreciate the power of the tutorials...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
No worries - adjusted.
*some people just don't like tutorials*
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
Thank you pal.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
If you want to save a your draw on the bitmap file see here[^].
|
|
|
|
|
i am creating a dialog based application. in my application there is a requirement where i have to save the page as it is in jpg extension. and it needs to get saved in a location. please give me some leads for this.
thanks in advance.
|
|
|
|
|
There are two tasks:
1. Take a screen capture
2. Save it to a file
You can get started here:
1. Various methods for capturing the screen[^]
2. Saving it to a file, I think should be relatively easy.
Many are stubborn in pursuit of the path they have chosen, few in pursuit of the goal - Friedrich Nietzsche
.·´¯`·->Rajesh<-·´¯`·.
[Microsoft MVP - Visual C++]
|
|
|
|
|
|
you can use the bitblt and getdc to capture a part of the screen to a picture control. Say you can try using to get the desktop by getdesktopwindow()
Vikas Amin
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
|
thanks for the reply. but the code is in VB and u need to open MSPAINT for saving it. i dont want the user to give such an option. once agaain thanks for the reply
|
|
|
|
|
|
|
Hi!
I've to navigate between two Buttons. i.e If I press the Tab key the focus should change from one Button to the other. How to do this?
|
|
|
|
|
set the tab order. u can do it using the layout option in the menu.
|
|
|
|
|
you can set Tab Order on the dialog forum you must be press Ctrl+D.
|
|
|
|
|
Hello EveryOne,
Hi..I am doing one vc++ program in that i want to call VB OCX file.I am doing that but when i am accessing the funtions from the ocx or activex control it is giving error.in VB OCX program function is like this:
Public Sub Processattendacne(strProcess As Integer)
lblProcessing.Caption = strProcess
End Sub
when i am adding know then this function is like this:
void C_UserControl1::Processattendacne(BSTR* strProcess)
{
static BYTE parms[] =
VTS_PBSTR;
InvokeHelper(0x60030000, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
strProcess);
}
I am calling this function in my program it is giving parameter missmatch error..like this..
void CPassingVarsDlg::OnGetIt()
{
// TODO: Add your control notification handler code here
CString str='s';
m_UserVariable.Processattendacne(str);
}
ERROR IS LIKE THIS:
:\Program Files\Microsoft Visual Studio\My Projects\PassingVars\PassingVarsDlg.cpp(177) : error C2664: 'Processattendacne' : cannot convert parameter 1 from 'class CString' to 'unsigned short ** '
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.
Please Help me out to solve this problem.I am not getting which datatype i have to use to resovle this problem.
Reply me As Soon As Possible..
Thanks In Advance,
Savitri
|
|
|
|
|
savitri wrote: Reply me As Soon As Possible..
[military tone]
Of course, Sir!
[/military tone]
If the function requires a pointer to a BSTR object, why are you passing a CString instance?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
Hii..
If i took variable of type BSTR* then also it is giving error...please tell me what type i have to use...I am not getting how to use this give me some suggestions please..
Thanks in advance,
Savitri..
|
|
|
|
|
Please show your (updated) code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[Image resize DLL]
|
|
|
|
|
ok i am giving u activex code and aslo my program code ..
This activex is in VB..my variable of type string in vb but after adding activex it is converting as BSTR.
ActiveX code is :
void C_UserControl1::Processattendacne(BSTR* strProcess)
{
static BYTE parms[] =
VTS_PBSTR;
InvokeHelper(0x60030000, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
strProcess);
}
My code is :
void CPassingVarsDlg::OnGetIt()
{
// TODO: Add your control notification handler code here
CString str='s';
m_UserVariable.Processattendacne(str);
}
please tell me how to solve this problem..
Thanks Alot
Savitri
|
|
|
|