|
Thanks a lot, it worked after doing the changes suggested by you.
|
|
|
|
|
You're welcome.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
Hello Friends
I am creating a application using GDI/PLus to save tiff as multiPage.
I got the Image object And tried
Image img;
img.save(..,..);
And its working fine
Then I used
img.saveAdd(..,..)
to add other images.but its not working.
And It is accepting one parameter as EncoderParameter which is having option to set multi Frame as I think as I found tht type in c#.
Do anyone is having idea how can I add image as MultiPage.
Thanks In Advance.
Regards
Yogesh
|
|
|
|
|
Hi,
Lets say, I am having Vendor dll and it is non-unicode.
I want to use this dll in my Application and it is unicode.
DLL is built using SDK functions such way that I cannot make is Unicode, same with Application it cannot build without unicode (frame work dependencies). Both of them are using CString.
Is there any way possible by which I can use this dll in my application without changing their nature?
Please let me know if further clarification needed.
Thanks in advance.
|
|
|
|
|
It should be easy enough. Just make sure when calling the vendor supplied DLL to use explicit specialisations of CStringT e.g. CStringT< char, ChTraitsCRT<char> > . It might be a good idea to use a typedef for this.
Oh, one other thing - make sure that around including the header for the library TCHAR is defined as char and not wchar_t or the functions won't link properly.
Cheers,
Ash
PS: Looks like there are already typedefs in MFC for this sort of thing. Have a look in Alain's answer below for their names!
modified on Thursday, October 28, 2010 8:28 AM
|
|
|
|
|
Hi,
From VS2003 the MFC (or ATL) CString classes are specializations of CStringT : see http://msdn.microsoft.com/en-us/library/5bzxfsea(VS.71).aspx[^]
Explicitly use CStringW for your framework related code and CStringA for interaction with your DLL.
cheers,
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
Hi,
I am sure the "file.exe" is not running. But when I tried to re-build the exe file. VS 2008 gives this error.
Please help.
Thanks,
|
|
|
|
|
can you rename the file? if not, it is locked by some process.
can you delete the file? if so, doing that could solve it.
|
|
|
|
|
Yes, I can rename and delete it. But it is painful to delete the EXE file for every build.
Do you have any other solution?
I guess it is caused by the windows 7 security.
Thanks,
|
|
|
|
|
I haven't encountered such situation on Win7 yet. If you can delete it, the EXE isn't executing any more (as it would when you had some non-main thread that goes on while not being marked background).
Here is one work-around idea: add a pre-build step to your Visual project, deleting the EXE with a DOS-like command, which you enter somewhere in the project's settings dialog.
|
|
|
|
|
I'm now coding with VC++2008.
I wanna show 2 dialogs at the same time.
So how to achieve it?
Thanks in advance.
In fact I've tried the following:
BOOL CDlg1::OnInitDialog()
{
...
dlg2.Create(IDD_DIALOG2, this);
dlg2.ShowWindow(SW_SHOW);
...
}
But this doesn't work.
|
|
|
|
|
|
A dialog, i.e. a window shown as modal, by definition is unique within a process, as it grabs you, your mouse and keyboard until you dismiss it.
If you want two dialogs, you need two processes.
Or you switch to modeless windows, which aren't dialogs at all. But then other forms of the same process could also be brought to the foreground and operated on.
|
|
|
|
|
Luc Pattyn wrote: If you want two dialogs, you need two processes.
This isn't true. It's possible and quite common for a modal dialog to have a button (or some other mechanism) which brings up another "nested" (not nested in a parent-child sense) modal dialog. Both dialogs are modal and shown at the same time although while the nested one exists the parent one is disabled.
Steve
|
|
|
|
|
You're right of course, however that still leaves only one accessible dialog, not what the OP wants.
|
|
|
|
|
define dlg2 as a member varibale of CDlg1.
CDlg2 * m_pDlg2;
BOOL CDlg1::OnInitDialog()
{
m_pDlg2 = new CDlg2();
m_pDlg2->Create(IDD_DIALOG2, this);
m_pDlg2->ShowWindow(SW_SHOW);
}
void CDlg1::OnDestroy()
{
CDialog::OnDestroy();
if(m_pDlg2)
delete m_pDlg2;
m_pDlg2 = NULL;
}
modified on Thursday, October 28, 2010 4:17 AM
|
|
|
|
|
Why bother using new and delete and the pointer m_pDlg2 ? In general I'd lose the new and delete (and in this case the OnDestroy handler too) and embed CDlg2 directly:
class CDlg1 :
{
CDlg2 m_Dlg2;
};
BOOL CDlg1::OnShowOtherDialog()
{
m_Dlg2.Create(IDD_DIALOG2, this);
m_Dlg2.ShowWindow(SW_SHOW);
}
Steve
|
|
|
|
|
Good advice,
en,, I prefer to use pointer..
|
|
|
|
|
I prefer to avoid using the heap when it's not necessary: It's faster, safer and helps minimise heap fragmentation.
Steve
|
|
|
|
|
If you don't need 2 dialogs at the same time but you need
them both displayable, then you're speaking about something like
a tabbed dialog: each tab will show a dialog.
I've a sample of doing this at the demo app that is in the article A Standard Multithreaded Dynamic Queue.
Otherwise you want to investigate modeless dialogs.
|
|
|
|
|
Hi,
for those who know 'WinRar', when you select a file which has been compressed and right click and select Properties > Archive, you get a nice column showing the compression Ratio in %.
Can someone provide a URL to a sample that implements such a type of column bar? I need such column bar for a Ratio representation in an MFC-based app (aka. C++ based-app, NO .NET).
Thanks in advance for any hint.
Marc
|
|
|
|
|
I don't have WinRar installed but just an idea: use Spy++ to find out the class of that control and then try googling it up, maybe it turn up something usefull...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Leela: Fry, you're wasting your life sitting in front of that TV. You need to get out and see the real world.
Fry: But this is HDTV. It's got better resolution than the real world <
|
|
|
|
|
It shows in the property window of compressed files.
So it must be a shell extension.
You may not be able to get to pick only the control out with spy.
It may not even be a control.
It could be simply drawn.
You never know.
|
|
|
|
|
|