|
Perhaps that's all I needed, but it is kind of weird, though.
Thank you
--Ziro--
|
|
|
|
|
Hi,
I have a worker threader that sends a window message to a dialog to display the threads progress. This approach works well until the users gives focus to another application. At which point I get an access violation within the Dialogs call to UpdateData().
Can anyone offer any advice? Or does anyone know how I can detect when my MFC app loses focus, so I can at least guard against this situation happening
Cheers
Richard
|
|
|
|
|
hello
i need to know how could i know how many harddisk drive installed and how many partitions and there names using vc 6.0
thanks
|
|
|
|
|
Not sure about getting the # of physical drives, but you can get the drive letters with GetLogicalDriveStrings() , then call GetVolumeInformation() to get the volume names.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
TCHAR drive[] = "a:\\";
int NoDrives =0;
for (int i= 'A';i<'Z';i++)
{
drive[0] = i;
UINT type= GetDriveType (drive);
if (type !=DRIVE_NO_ROOT_DIR )
{
SHFILEINFO fi;
SHGetFileInfo (drive,0,&fi,sizeof
(fi),SHGFI_TYPENAME|SHGFI_DISPLAYNAME|SHGFI_SMALLICON|SHGFI_ICON );
// fi.szDisplayName; Partition or drive name
// fi.TypeName Type name
// fi.hIcon Index of the icon of the drive in the system
NoDrives ++;
);
};
This should work .
|
|
|
|
|
|
I'm implementing a window in which some parts are valid drop-targets and some arent.
I've read that if I return DROPEFFECT_NONE in OnDragEnter() I won't get any calls to OnDragOver(), so I always send back DROPEFFECT_COPY.
In OnDragOver() i perform my minute-logic and return any of the drop effects, including DROPEFFECT_NONE for which I expect a 'do not do this' icon to appear next to the mouse icon.
This doesn't happen to my regret, whenever I return DROPEFFECT_NONE windows treats it as if I didn't return anything, it keeps the previous cursor.
What am I doing wrong ?
Thank you very much
|
|
|
|
|
Hi.
I am trying to find a truly free network spy program. By this I want to be able to see all traffic on the internal network and also filter by addresses etc. The reason I want to do this is we have this old machine run on OS2 and I would like to replace it but need to learn the messages it is sending etc.
Appreciat eany help.
|
|
|
|
|
|
|
I have tryed to build a static library which includes a method to show a dialog (defined in a ressource file) The linker warning I get is:
GLAP.res : warning LNK4221: no public symbols found; archive member will be inaccessible
Guess that's why the dialog never shows up when I use the generated lib in in a project.
Does anybody know what's the problem?
Is it possible to build static libs with ressources like dialogs at all?
Thanks! Constantin
|
|
|
|
|
You can only have one resource block in an executable. The linker doesn't know how to link two compiled resources (.res files) together.
The way I've done it in the past is to include the library's resource file in the application's resource file. See how afxres.rc is included by the MFC wizard (View > Resource Includes in VC6).
|
|
|
|
|
Seems as if that's the only way. Thanks!
|
|
|
|
|
hello everyone
i have a project i have been trying to do mainly for myself .. well i posted a few days ago about buttons well i got that to work in a way
hmm lets see ok i have a dialog made with 9 buttons on it ok well i have also created 9 other dialogs well what i am trying to do is when i click on a button i want it to load up one of the other dialogs i made well with them other dialogs they have anywere from 10-25 buttons on them and when i click on one of them buttons i want it to bring up a web page if possable
if anyone knows of a few good tutorials on this or anything that would be great
....i dont start collage for programing till next year if everything goes ok so i am mailny learning how to use VC++ from this web page .. and it has been a great help.... thats the reason for these newbie questions hehe ..
thanks
"Effort within the mind further limits the mind, because effort implies struggle towards a goal and when you have a goal, a purpose, an end in view, you have placed a limit on the mind"
|
|
|
|
|
Is there an easy way to read a file line-by-line, not using MFC? I looked at fread, ReadFile, and ofstream, but I couldn't find a "ReadLine" function in any of them.
Thanks!
|
|
|
|
|
Take a look at ifstream::getline and string::getline .
- Mike
|
|
|
|
|
|
|
You can use getline()
#include <fstream.h>
void main()
{
char buffer[256];
ifstream file;
file.open("c:\\autoexec.bat", ios::in | ios::nocreate);
if (file.good())
{
while(file.peek() != EOF)
{
file.getline(buffer,255);
cout << buffer << endl;
}
file.close();
}
else
cout << "error opening autoexec.bat" << endl;
} the default delimiter for getline is \n, see msdn for more details.
Hope this helps
sledge
|
|
|
|
|
One solution is std::getline().
string sInput;
std::getline(file, sInput);
Kuphryn
|
|
|
|
|
pFile = pHttpConnection->OpenRequest(CHttpConnection::HTTP_VERB_GET,sObject, NULL, 1, NULL, NULL,INTERNET_FLAG_EXISTING_CONNECT | INTERNET_FLAG_NO_AUTO_REDIRECT);
How to change param number 5 to get all kinds of requests not only text?
I need to fetch a picture in jpeg-format
Thx
|
|
|
|
|
i've to submit a project in my final sem. on building a mail application in VC++ having features of sending,recieving , replying , setting priority ,setting account (POP3 , SMTP ) etc. like Outlook Express . please suggest me good books on this which can provide me all this in single book.
Also suggest me any book on making own POP3 & SMTP server in VC++ .
Also suggest Websites on both
> please mail me at :in_sukhdeepsingh@yahoo.com as soon as possible
deep
|
|
|
|
|
i've to submit a project in my final sem. on building a mail application in VC++ having features of sending,recieving , replying , setting priority ,setting account (POP3 , SMTP ) etc. like Outlook Express . please suggest me good books on this which can provide me all this in single book.
Also suggest me any book on making own POP3 & SMTP server in VC++ .
Also suggest Websites on both
mail me at <in_sukhdeepsingh@yahoo.com>
deep
|
|
|
|
|
I recommend Network Programming for Microsoft Windows, Second Edition
by Anthony Jones and Jim Ohmund for winsock programming.
As for SMTP protocal, search FAQs and Google.
http://www.faqs.org/faqs/
Kuphryn
|
|
|
|
|
Is there any way (In code)from my MFC application to Copy,Paste and rename a file...such as an .exe file?
For example,lets say i have an imaginary .exe file in a folder called "Test".
I want to make a copy of test.exe,rename the copy(not the original)to test1.exe,and place it(or
copy it)to a folder named "Test1".
Is this at all possible?
Appreciate your answers.
Thanks.
|
|
|
|