|
Hi all,
I've simple file manager, in which I display icons for EXE files using ExtractIconEx() this way:
ExtractIconEx (pathToEXEFile, 0, &bigIcon, &smallIcon, 1);
It works fine. But I also found EXE files, for which this function takes much more time than normally.
One example of such file is RLUninstall.exe, located in WINNT directory.
Doesn't some know how is this possible or how to bypass it?
Thank you for any suggestion.
|
|
|
|
|
|
I could have sworn that in VC++, when implmenting an interface, IntelliSense is supposed to prompt you "Press TAB to implement <interface>" and it'll give you the method/property signatures with empty bodies, but mine doesn't seem to want to do this. This helps a lot with large interfaces.
There are no errors from syntax checking displayed, it's just a #using and a class header so far - what are my options for filling out the interface?
|
|
|
|
|
Chris Cornell wrote:
I could have sworn that in VC++, when implmenting an interface, IntelliSense is supposed to prompt you "Press TAB to implement " and it'll give you the method/property signatures with empty bodies
I have never seen this In VC++, in C# yes, but not VC++.
Which version do you use?
- Anders
Money talks, but all mine ever says is "Goodbye!"
http://SourceLocker.net[^] SourceControl and DefectTracker Project.
nsms@spyf.dk <- Spam Collecting
|
|
|
|
|
2k3.
I don't know, I could be wrong. I just thought it did... I know for sure it does it in C#, because I ended up just using the intellisense from C# and porting to C++... shame on me for not going with a template for a type-safe collection, I guess.
|
|
|
|
|
Try Visual Assist.Nifty tool but.. not free.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Here is another easy question for you guru's who responded to my last question within minutes
why the heck is the program I made (set up as a dialog box) ALWAYS on top... it's always the up most window and is never toppled by a newly focused window.
Is there a simple switch I'm missing that allows it to behave like every other window in the world?
lead2gold
|
|
|
|
|
read about the SetWindowPos api, especially the second parameter!
Don't try it, just do it!
|
|
|
|
|
A few questions regarding SHGetFileInfo() :
1) Is it possible to use this function to determine whether filename
is a file or a folder? When filename is a directory CFile causes an error messages to be displayed and I want directory to be shown too.
2) Is using CFile the best way to get the file info i'm looking for?
(Size, Type, Path, Accessed Date, etc...) When CFile is first instantiated it opens the file, so wouldn't this change the last accessed date to the moment of creation, thus skewing accessed date each?
SHGetFileInfo(filename, 0, &shInfo, sizeof(SHFILEINFO), SHGFI_SYSICONINDEX|SHGFI_DISPLAYNAME|SHGFI_ICON|SHGFI_SMALLICON|SHGFI_TYPENAME);
CFile myFile(filename, CFile::modeRead);
CString fSize, fTitle(myFile.GetFileTitle());
fSize.Format("%d", myFile.GetLength());
LVITEM lvi;
lvi.mask = LVIF_IMAGE|LVIF_TEXT;
lvi.iItem = GetItemCount();
lvi.iSubItem = 0;
lvi.iImage = shInfo.iIcon;
lvi.pszText = shInfo.szDisplayName;
InsertItem(&lvi);
I'm drinking triples, seeing double and acting single
|
|
|
|
|
How about CFile::IsDirectory() function?
|
|
|
|
|
Hi all,
I have created a MFC dialog based application. Now, I am creating an installer with WISE installer 4.0. This installer works on my machine where Visual C++ 6.0 and many other softwares are installed but gives the error message on client machine where only Windows 2000 Server is installed without any other software installtion. Client machine only contains Windows 2000 Server.
It gives the error that mfco42d.dll is not found in System Path.
What to do? Is there any merge module for this file so that I can include it Wise installer??
Urgent help is needed.
thanks
|
|
|
|
|
|
thanks, this will help a lot.
I am now trying to deploy the release exe of my application and test it on the client machine.
If it also fails, then i ll try to link the application statically wih MFC Dlls.
Hope this works !!!
|
|
|
|
|
I have now build a release version of my app and it is working. Can you tell me why it was not working with debug version, while i was including the proper merge modules?? Why it was not working in the presense of the required dlls??
Note: I included the merge module for mfc42d.dll in Wise installer but when I execute this installer on the client machine (having only Windows 2000 Professional) installer does not installs these debug dlls. What is the reason behind this?????????
Thanks
|
|
|
|
|
the windows operating system does not include debug versions of dll software, because they are not needed for non-developer windows users.
|
|
|
|
|
I'm not sure if I summarized what I want to do properly.
Visualize a small dialog box infront of you with 2 buttons (Button1, Button2).
I want to be able to have them both call the same function but within the function distinguish which one was pressed.
example:
OnButtonPressed()
{
if (button1) -blah;
if (button2) -blah;
return
}
I have one more tiny quick question... whats the SDK function that opens the "Browse for Folder" dialog box. i made a quick image of it, it can be seen here http://www.lead2gold.org/BrowseFFolder.jpg
lead2gold
|
|
|
|
|
1- I don't think you can distinguish the 2 buttons since the callback is anonymous, can't you have 2 callbacks that simply call a third function ?
You might do something with some other messages than ON_BN_CLICKED, but I don't know how to do it without looking into it right now.
2- the function is ShBrowseForFolder
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
Thank you! I'll try this... thanks for everyone who replied, the other answers were great too, until one said it might be a maintnance nightmare.
p.s. i didn't expect to get the answer so fast!
lead2gold
|
|
|
|
|
You can use GetFocus() to test the pressed button if your buttons are members of your Dialog like this;
OnButtonPressed()
{
CWnd* pWnd = GetFocus()
if (pWnd == m_Button1)
-blah;
else if (pWnd == m_Button2)
-blah;
return;
}
But I think it's better to let every button have its own OnButton pressed function.
SHBrowseForFolder will show the folder dialog.
Arjan.
|
|
|
|
|
Oops this won't work!
Arjan.
|
|
|
|
|
Oké here it is!
Look for ON_CONTROL_RANGE in the MSDN.
ON_CONTROL_RANGE( BN_CLICKED, ID_BUTTON1, ID_BUTTONn, OnButtonPressed )
Arjan.
|
|
|
|
|
but you still don't know which button called the callback .
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
You do!
Your OnButtonPressed function will now look like this;
void OnbuttonPressed(UINT nID)
{
}
Arjan.
|
|
|
|
|
darn !! I stand corrected ...
Thanks.
Maximilien Lincourt
"Never underestimate the bandwidth of a station wagon filled with backup tapes." ("Computer Networks" by Andrew S Tannenbaum )
|
|
|
|
|
Imho, the ON_CONTROL_RANGE can result in a maintenance nightmare. As your software evolves, it's possible that ID_BUTTON1 and ID_BUTTONn may not be consecutive, which can cause hard-to-find bugs.
/ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|