|
Thanks guys. This helped with problem number 2.
|
|
|
|
|
If you want to debug your dll file you can use of breakpoints(and F5) when you will be calling dlls functions of your project use of F5.
|
|
|
|
|
Hi,
I have developed a window based application which is able to fetch the IPAddress but i want the url name of the IPAddress fetched.Can any one tell me how to do it.
The Server is sending the IPAddress.
Thanks In Advance.
Dhiraj Kumar Saini
|
|
|
|
|
Use the Windows socket function getnameinfo().
Regards,
--Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
|
|
I thought this was the Visual C++ / MFC forum....
Aren't jokes better placed in the lounge?
|
|
|
|
|
Hi all
Once again i am asking same question how can i remove .What happen in this code when usb drive is blank then this type of out put come
ÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌÌ .
plz help me
BOOL CUSBDlg::FileList()
{
CString acb="";
//Get Logical Drives
DWORD dwDrives=GetLogicalDrives();
if(0==dwDrives)
{
return FALSE;
}
DWORD dwCount=0;
char chDriveLabel='C';
char szRootpath[5]={0,0,0,0,0};
while(dwDrives !=0)
{
if ((dwDrives & 1) != 0)
{
sprintf(szRootpath,"%c:\\",chDriveLabel);
//removable drive
if(DRIVE_REMOVABLE==GetDriveType(szRootpath))
{
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
//Removable dirve lable
// AfxMessageBox(szRootpath);
m_ListCountries.AddString(szRootpath);
HTREEITEM hRoot1 = m_tree.InsertItem(szRootpath, 0, 0);
//* represent search all files and directories
szRootpath[3]='*';
hFind=FindFirstFile(szRootpath, &FindFileData);
if (INVALID_HANDLE_VALUE == hFind)
{
// return TRUE;
}
// List all the files in the directory .
do
{
//ignore the sub directories
if( _tcscmp( FindFileData.cFileName, _T(".") ) && _tcscmp( FindFileData.cFileName, _T("..") ) )
{
m_ListCountries.AddString(FindFileData.cFileName);
}
}while (FindNextFile(hFind, &FindFileData) != 0);
CFileFind finder;
FindClose(hFind);
}
}
dwDrives = dwDrives >> 1;//next drive
chDriveLabel++;
}
return true;
}
|
|
|
|
|
Hello,
please try using memset before calling FindFirstFile and FindNextFile for FindFileData structure, something like this:
memset( FindFileData, 0, sizeof( FindFileData ) );
hFind=FindFirstFile(szRootpath, &FindFileData);
if (INVALID_HANDLE_VALUE == hFind)
{
}
do
{
if( _tcscmp( FindFileData.cFileName, _T(".") ) && _tcscmp( FindFileData.cFileName, _T("..") ) )
{
m_ListCountries.AddString(FindFileData.cFileName);
}
memset( FindFileData, 0, sizeof( FindFileData ) );
}while (FindNextFile(hFind, &FindFileData) != 0);
CFileFind finder;
FindClose(hFind);
Best regards,
Mihai Moga
|
|
|
|
|
Thx'x it is working...just i want to say greate work for me becouse i havn't found solution of this problem..
Can i ask you some different question related to USB Device..
|
|
|
|
|
Sure, you can ask me, but I do not known too much about USB. You may consider starting a new thread for this ...
|
|
|
|
|
ok no problem i ask here..
[code]How can i show message when any one copy the file or folde from USB Device or Paste the file or folder in USB Device[/code]. Plz help me..
|
|
|
|
|
Mihai Moga wrote: please try using memset before calling FindFirstFile and FindNextFile for FindFileData structure...
Setting that structure to 0 is not necessary.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
vcprog wrote: Once again i am asking same question...
And you've been given the answer three times already. Why do you refuse to comply?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
ok DavidCrow
Can you give me some pice of code..
Plz help me
Thx,s in advance
|
|
|
|
|
NewVC++ wrote: Plz help me
Do you see anything wrong with this?
if (INVALID_HANDLE_VALUE == hFind)
{
}
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
Can i convert WIN32_FIND_DATA FindFileData into string?If yes then how?
Plz help me
|
|
|
|
|
Uh ? What do you mean exactly ?
|
|
|
|
|
You can't convert the structure itself to a string. You can, however, convert its members to a string.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
What do you need? do you want to convert size or time of a file to string?
|
|
|
|
|
probably you want to send the structure over socket or some thing similar
if this is correct then you can try.
char str[SIZE];
memcpy(str,&FindFileData,sizeof(WIN32_FIND_DATA));
I hope this makes sense.
Regards,
Sandip.
|
|
|
|
|
Hi All
How can i delete tree item.Plz help me
|
|
|
|
|
CTreeCtrl::DeleteItem
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
I am developing an MFC application on PocketPC (HP iPAQ) running Mobile 6 using VS 2008.
I am able to hide the taskbard and start button at the top for my full screen application.
In OnInitDialog() I have the following code:
RECT rc;
::SetRect(&rc, 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN));
if (::SHFullScreen(this->m_hWnd, SHFS_HIDETASKBAR | SHFS_HIDESTARTICON))
{
MoveWindow(rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, FALSE);
}
Everything is fine, but if the application displays a MessageBox or pops up another window (popup style) on top of the application window and the MessageBox or the popup window is dismissed, it takes a very very long time for the MessageBox or popup window to disappear and the whole screen appears frozen.
One more thing is that if I click on the SIP button, the SIP keyboard appears immediately, but the screen is frozen (can not input anything in the SIP) and it takes a long time to input anything using the SIP. After a while my window is shifted down to the same position as when TASKE BAR is displayed, but the TASK BAR itself is not displayed. It is at this point that I am able to input something through SIP. Please note that my window is shifted down, but the TASKBAR itslef is not displayed. At this point if a messagebox or popup window is displayed the dismissing (closing) of that window is pretty fast.
So the issue is that if the TaskBar is hidden using SHFULLScreen and the application window is moved to occupy the taskbar windows's space, the dismissal (closing) of the MessageBox or popup windows displayed by application is very slow.
I used RemoteSpy and found the following messages delived to my application window when the MessageBox or popup window is displated.
WM_WININICHANGE
WM_WINDOWPOSCHANGED
WM_MOVE
WM_SIZE
WM_PAINT
WM_ERASEBLGD
WM_CTLCOLORDLG
WM_DRAWITEM
WM_DRAWITEM
WM_DRAWITEM
WM_CTLCOLORBTN
WM_DRAWITEM
I would greatly appreciate your help.
Thanks a lot!
-A
|
|
|
|
|
in SHFileOperation(&fs), How or what way do you now create or acces the Info in fs.hNameMappings.
Regards
Bram van Kampen
|
|
|
|