|
thanks for the help, i guess its good to know it cant be done (stops me trying to figure out how to do it)
oh well, i might well try that class factory thing
thanks again, Chicken64
|
|
|
|
|
I want to hook the createfile API.
Whenever a file is being created or modified i need to receive the alert so that i can check who is creating/modifying the file..after i verify the user and his quota..then i can allow creating the file or deny his request.
ANY idea on how to do this???
Ill be forever grateful to anybody who helps!!
|
|
|
|
|
|
in MSDN search :
Monitoring Changes in a Directory or Directory Tree..
this allows u just to monitor changes. not to make you allow it or not
|
|
|
|
|
Hi
I'm using FindNextFile() to extract file.Problem is i need to extract them in numerical order.I had ordered them proper through Windows explorer, but it seems that FindNextFile() doesnt retrieve the files in that order. Is it not supposed to retrieve the files in order?
Is there any way i can retrieve the files in order?
thks
|
|
|
|
|
raner wrote:
Is there any way i can retrieve the files in order?
no. you will have to sort the files yourself.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
raner wrote:
Is it not supposed to retrieve the files in order?
Yes, but the order is completely dependent on what the underlying filesystem defines it to be.
|
|
|
|
|
Hi. Im developing a pure-unmanaged VC++.NET windows application and i wanted to use a tool for print preview and printing.
- I dont require a tool that accesses the DB and fetches the data to make a report.
- I dont require web integration
- I DONT WANT to use managed code!!
- It should accecpt RTF text
- ...
I was thinking on crystal reports, but ive visited their site and that thing is huge! It has reports for everything and for everyone, and i didnt found a good start point on which to start. Anyone knows a set of examples or projects i could start on? I use VC++ .NET but i dont want to use managed code.
Thanks in advance!
|
|
|
|
|
Considering all your requirements (and explicitly stated non-requirements), have you considered WordPad?
No, seriousy - it AFAIK fulfills all of your requirements.
|
|
|
|
|
Hi all, I've dialog which has clistctrl and two buttons.
I want to know how to change the specifice item text color as I inserting into the clistctrl.. I'm not using listview.
Can I set the item text with the color text?? I mean.. we can setdlgitem text color using CFont.. I dont' know if there is a way to set the item text color doing so.
thank you
|
|
|
|
|
As far as I know there is no possible way to set an indiviual item text's color (not all items as a whole) except by making an owner draw list control.
|
|
|
|
|
Ok.. so how about setting the item images..
I tried
<br />
m_myListCtrl.SetExtendedStyle(LVS_EX_SUBITEMIMAGES |LVS_EX_FULLROWSELECT | LVS_EX_CHECKBOXES |LVS_EX_FLATSB );<br />
m_TFImages->Create(IDB_TRUE_FALSE, 16, 2, RGB (255,255,255));
<br />
m_myListCtrl.SetImageList(m_TFImages,LVSIL_STATE);<br />
m_myListCtrl.InsertColumn(0,"");<br />
m_myListCtrl.InsertColumn(1,"");<br />
<br />
I got run time error and the program get crashed...
I looked at in MSDN code sample CListCtrl::SetImageList
I have an idea of setting the item state instead of changing the color of item text..
Oh.. I also have checkboxes beside the items and now i want to add picture beside the item text...
Could you help me how to do it??
Thank you
|
|
|
|
|
Well! First of all ensure that the CImageList variable is not destroyed within the scope of the list control variable, in English that is declaring it as a global variable or a member data in the CDialog class. This is to prevent destruction of the image list before the destruction of the list control. If you did this and the crash is still there then the problem is not in the few code lines you are writing in your post.
An item's image is set during insertion,
CListCtrl::InsertItem(nItemNumber, "ITEM NAME", nImageListEntryNumber);
To change the image of an already inserted item you should use CListCtrl::SetItem like this
LVITEM item;
item.mask = LVIF_IMAGE;
item.iItem = nItemIndex;
item.iSubItem = 0;
CListCtrl::GetItem(&item);
item.iImage = nNewImageIndex;
CListCtrl::GetItem(&item);
this works for first subitem's image setting, if you need to set subitem's image (you use LVS_EX_SUBITEMIMAGES) there is no way but to use
CListCtrl::SetItem
|
|
|
|
|
|
Hello,
I am writing an email application using a listview control to show the messages, and I wish to change background colour to show which items have been read. Therefore I need to change a listview row background colour after it has been selected for a certain time. Outlook Express changes from bold to normal text in a similar fashion.
I have been looking at articles in CodeProject and other sites, and they show you how to change colour for a row when the control is initially being drawn (using customdraw), but I can't find anything to show how to change a row AFTER it has first been drawn (ie dynamically).
Does anyone know how to do this??
Many thanks,
Paul Trimming
|
|
|
|
|
trimtrom wrote:
and they show you how to change colour for a row when the control is initially being drawn (using customdraw), but I can't find anything to show how to change a row AFTER it has first been drawn (ie dynamically).
It's basically the same. You just set a flag according to which rows are drawn using particular colors. When you wanna change a row's color, set the flag for that row, say you have an array of flags, and then force a repaint of the control.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Nish,
Thanks very much. It works of course. I didn't know it was so simple!!
Trimtrom
|
|
|
|
|
I am writin a simple ODBC application in Visual C++ to manipulate data from an Access database file. I have a memo field in the Access DB and a multiline edit control in the app. When I try to write a larger text (more than 256 symbols), and try UpdateData(), I get the following error message:
"Please enter no more than 256 characters."
I tried to set the control's max. text limit by calling CEdit::SetLimitText(64000) for example, but it did not work...
If you have any clue, please respond asap...
Thanks!
"Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
|
|
|
|
|
Vladimir Georgiev wrote:
If you have any clue, please respond asap...
Looks like you have set a DDX limit on the edit control. Verify this using class wizard if you are using VC++ 6.0, if VC++.NET check the DDX message map
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Nishant, I am using VC++ 6.0. I have not set any limit (Maximum
Characters box in "Member Variables" tab). this field is empty. Is this the
correct place I am looking in?
If you have any other idea, please let me know...
"Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
|
|
|
|
|
Can you post more code? The fact that you get this mesgbox only when you call UpdateData was what prompted me to think that it is a DDX check. With the existing info I dont really have any other smart ideas. Perhaps more code will make things clearer.
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Here is the function and the place it fails:
void CContactsView::OnSave()
{
UpdateData(true); //---------------> ERROR HERE!
m_pSet->AddNew();
if (m_pSet->CanUpdate()) {
m_pSet->Update();
}
if (!m_pSet->IsEOF()) {
m_pSet->MoveLast();
}
m_pSet->Requery();
UpdateData(false);
}
"Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
|
|
|
|
|
Vladimir Georgiev wrote:
UpdateData(true); //---------------> ERROR HERE!
Maybe you should set a DDX limit to not get the default limit?
Just an idea...
|
|
|
|
|
I tried that using Class Wizzard. Did not work...
|
|
|
|
|