|
Not really (unless it has been enhanced lately). I have tried to do this. You could create multiple controls, but selection would not work across them and you will have problems with sizing.
I have published a control here on CP which does this and much more. You can find it at:
http://www.codeproject.com/miscctrl/minicalendar.asp[^]
|
|
|
|
|
thank you very much
i'll check your code asap, looks really great!
anyway i was hoping the CMonthCalCtrl could do that
best regards
|
|
|
|
|
dear all,
how to check the existence of a directory using mfc or api?
thanx
|
|
|
|
|
try to change the Dir by using
_chdir(const char* dirName) function
if the return value is -1 ,that means die not exist,else u can move forward your dir is there....
~~~~Code the Dreams~~~~~
|
|
|
|
|
Hi..
You can use CFileFind class
1)construct a CFileFind Object
2)Search the name of the directory using CFileFind::FindFile("DirNamr",0)
3)Call CFileFind::FindNextFile
4)if the search is successfull use CFileFind::IsDirectory() to make sure thet
the found file is a folder not a file.
|
|
|
|
|
Use PathIsDirectory function.
You need to include shlwapi.h and link it with shlwapi.lib
Cheers
Kannan
|
|
|
|
|
#include <io.h>
inline bool dir_exists(const char* str)
{
return _access(str,0)==0;
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
This way works pretty well, and handles the odd case where the "directory" is really a file:
bool DoesDirectoryExist(LPCTSTR inputPath)
{
bool bRet = false;
DWORD dwRc = ::GetFileAttributes(inputPath);
if (dwRc == 0xFFFFFFFF)
{
bRet = false;
} else if(dwRc & FILE_ATTRIBUTE_DIRECTORY)
{
bRet = true;
} else
{
bRet = false;
}
return bRet;
}
Even a broken clock is right twice a day.
|
|
|
|
|
hai,
We customized the default open dialog by deriving the class from
cfiledialog . These are the issues that we faced.
Issues:
1. How to handle the default messages in cfiledialog class?
2. In Win'2000 & above, we tried to change the listview style to
LVS_REPORT using Modifystyle method The style is changed, but the files and
column headers are not displayed.
3. In Win'98, how to remove the separator in toolbarwindow32.
Please give me the solution as early as possible.
sureshb
sujtha
|
|
|
|
|
|
Is there any samples/articles describing the MS Excel automation(using MFC),i want to read the data from an excel sheet and put something in to that also.
Thanks In Advance
~~~~Code the Dreams~~~~~
|
|
|
|
|
|
|
ThankYou Kannan...
~~~~Code the Dreams~~~~~
|
|
|
|
|
I have written a composite control which have many sub-controls such as button ,grid ,list ,but i have a problem with it. When i use the control in the dialog-based application , the control is not visible ( we can't see the button and grid etc. on it) in the design mode . Because i create the sub-controls in the control's WM_CREATE message response function. I want it can be seen in the design mode , how can i do? I search the msdn for some message, it has a article about the similar problem , but i can't understand it. Who can help me? I wish the master about the activex programming can give me a hand ,and i'll thank you very much!
|
|
|
|
|
This is due to the dialog editor not actually creating your control. It just puts in a placeholder and calls the OnPaint() of your control. You will have to plot the additional windows yourself in your OnPaint() handler. You can tell when you need to do this as the ActiveX controls m_hWnd member will be NULL. Your control will not actually receive an WM_CREATE until it is used in a dialog for real, so in effect until this time it upto you to draw the correct output.
Roger Allen
Sonork 100.10016
This is a multiple choice question, choose wisely
Why did the hedgehog cross the road?
A: To show he had guts?
B: To see his flat mate?
|
|
|
|
|
How can I accomplish this? Will it reuiqre nested loops?
Can someone show me code on how to accomplish this?
Thanks!
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
You can use this to traverse the tree!
HTREEITEM hItem = GetRootItem();
while(hItem)
{
hItem = GetNextTreeItem(hItem);
}
HTREEITEM C3StateTree::GetNextItem(HTREEITEM hItem)
{
HTREEITEM hti = NULL;
if (ItemHasChildren(hItem))
hti = GetChildItem(hItem);
if (hti == NULL)
{
while ((hti = GetNextSiblingItem(hItem)) == NULL)
{
if ((hItem = GetParentItem(hItem)) == NULL)
return NULL;
}
}
return hti;
}
Arjan.
|
|
|
|
|
Thanks, this was driving me nutts. I appreciate it!!!
Cheers
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
hi all,
i want to create tabbed dialogs for my application. can anyone help me out please. thanks a lot..
himanshu
|
|
|
|
|
Hello,
You might want to check this out. http://codeguru.earthweb.com/propertysheet/inside_dialog.shtml
Rob
|
|
|
|
|
dear all,
i want my mfc dialog app not to appear in tasks list in close program dialog if someone hits ctrl+alt+del.
how to do this.
this should happen for all windows platform 98, nt, 2k, xp
can anyone post some code or show me links for the same
thanx
wishing all of u a very happy new year!
|
|
|
|
|
If you want to write a Virus or Worm, you have come to quite a wrong place.
Now please piss off.
I was told by a CP participant that including "plase" was good.
|
|
|
|
|
hide the dialog, then it will not be in tasks list.
try!!
|
|
|
|
|
my app is a dlg based one & its already hidden. Only an icon is visible at notification area, which on dblclick opens the dlg.
|
|
|
|