|
Aniket Salunkhe wrote: Where should I search for that?
AfxTempl.h
|
|
|
|
|
I am doing a MFC project and want to change the tip on toolbar item.
I found some samples on Dialog to do that in codeproject, but none on MainFrame'stoolbar.
Can you help me?
|
|
|
|
|
|
Hi,
MY application consits of a button and a tree control.If i press the button, windows explorer files and folders will be displayed in the tree control with images.Now my problem is,if i press the button for the second time the images are not appearing in the tree control.How can i eliminate this problem.
Thanks in advance,
Radhika.
|
|
|
|
|
radhika28 wrote: MY application consits of a button and a tree control
What is the type of application?
radhika28 wrote: if i press the button for the second time the images are not appearing in the tree control.How can i eliminate this problem
Can you post some source code showing how are you going with the creation of the tree control etc....
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
void CApplication::OnButton1()
{
// TODO: Add your control notification handler code here
TCHAR szWorkDir[MAX_PATH];
if ( m_tree.m_hWnd )
{
if ( m_tree.SubclassDlgItem( IDC_TREE1, this ) )
{
m_tree.DisplayTree( NULL /*Display all*/, TRUE /* TRUE = Display Files*/ );
_getcwd( szWorkDir, 256 );
// set the Path to the current Work-Directory
m_tree.SetSelPath( szWorkDir );
}
}
}
|
|
|
|
|
radhika28 wrote:
TCHAR szWorkDir[MAX_PATH];
if ( m_tree.m_hWnd )
{
if ( m_tree.SubclassDlgItem( IDC_TREE1, this ) )
{
m_tree.DisplayTree( NULL /*Display all*/, TRUE /* TRUE = Display Files*/ );
_getcwd( szWorkDir, 256 );
// set the Path to the current Work-Directory
m_tree.SetSelPath( szWorkDir );
}
you have to check out for some flag !
"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
|
|
|
|
|
i just want to read .pst file made by oulook ....
i have tried reading it by using ReadString function .its reading file but the strings r in some code format i just wanted to read 'em in some understandable manner...can anybody plsss give me some tips on how to use .pst file ???Is .pst file use any kind of data structure for storing our emails etc..........
|
|
|
|
|
pst files us a variant on the Jet database engine. You need to research the file structure and impliment the code to read it if you want to work with them. You really didn't expect it to be a bunch of plain text, did you ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
actually i want to recover my deleted files from the outlook.So i m not getting from where to start with??So if u can plssss guide me thru...it'll be of g8t help
|
|
|
|
|
LOL - I can tell you from personal experience ( outlook died for me earlier this week ) the web is full of people willing to sell you a program that will recover your PST. The sample versions all show you your mail but do not recover it, but I found ones as cheap as $50, which worked really quite well.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thanku for ur suggestion
if u knw it or u can rather tell me how to read a pst file or in what file format does it contains its content or anythig related to a pst file
it'll be helpfull
thanxs
|
|
|
|
|
I thought I'd answered that question ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
if you want to read pst files see here[^]
|
|
|
|
|
I'm trying to move several CDialog-based classes to a common .lib file that will be statically linked.
I understand all the hoo-hah about resource handles when you're doing this with .dll's, but is there some magic dance I have to do to get dialogs to work when they're defined in a .lib?
My main program links to the lib just fine, but CDialog::DoModal() exits here:
if (lpDialogTemplate == NULL)
return -1;
What's more, when I open my executable file as resources in VS, the lib dialogs do not show up.
I know for a stone cold fact that this can be done, because I can statically link to external commercial libs like Stingray and get their dialogs to pop up. But I have studied that source code in vain for any clue as to why theirs works and mine doesn't.
Any suggestions?
|
|
|
|
|
how did u call the domodal of a dialog in the lib? I think this will be the issue of the resources handle.
overide the DoModal function in a derived class of the CDialog. And call
AFX_MANAGE_STATE(AfxGetStaticModuleState( )); and then call the base class' DoModal.
int MyDlg::DoModal()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState( ));
return CDialog::DoModal();
}
nave
|
|
|
|
|
Naveen R wrote: overide the DoModal function in a derived class of the CDialog. And call
AFX_MANAGE_STATE(AfxGetStaticModuleState( )); and then call the base class' DoModal.
That causes CDialog::DoModal to fail here:
HINSTANCE hInst = AfxGetResourceHandle();
because of an ASSERT:
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetResourceHandle()
{ ASSERT(afxCurrentResourceHandle != NULL);
And the CDialog resource is STILL not being linked into the executable. If I make a program that uses a statically-linked Stingray library and I open the executable as resources in VC, I can see the Stingray dialogs, whereas in my program, I cannot see the resources (and I even made sure that resource IDs were not duplicated in the lib and the main program).
I think this is the key issue here, the resources are simply not being linked into the executable for some reason.
|
|
|
|
|
I don't think you can put resources into a static library....
Steve S
Developer for hire
|
|
|
|
|
Thanks!
|
|
|
|
|
|
The idea I beleive was just that you could use stdafx as a way to get your includes type behaviour down. If you're writing code for non MS compilers as well, you shouldn't use stdafx, because you can reproduce the behaviour without having that nasty #ifdef ( nasty in the sense that you're making work for yourself, you can't rely on the stdafx, so why use it at all ? )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
|
I have a dialog that displays gif or jpeg images in a Picture control (CStatic). I can load the images from file and display them.
I have changed the size of the image to thumbnail size and I want the now save the image to disk. How is this done?
CPicture m_pMyPicture; // picture
CStatic m_cThumbCtrl; // static control
So many examples on loading and viewing but none on writing to disk! I don't know where to start.
"Complexity breeds problems. Keep it simple." - Mark
|
|
|
|
|
Your best bet to save images is GDI+. I have a number of articles on this site on using GDI+ in C++.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Don't take this personnally, but everyone seems to be pushing GDI+ which I don't have installed. I tried installing it and couldn't seem to get anywhere with it so I gave up. I know what I want to do has been done long before GDI+ was every written.
"Complexity breeds problems. Keep it simple." - Mark
|
|
|
|