|
Hi forum,
i create a litle program witch can create a work items, and it's running propertly if i loggon as a admin but if i logged on as a user or main user i recive an error ba calling Task->Activate(); when i try to show all tasks and him's property such like status and creator etc. in a list box, when i try to activate an task that is create by a another user or admin, my ask is how can i show the tasks without errors and without admin right's, for example i can see only my own tasks in the task folder, and list them in to list box with him's propertys , but not the one that is created by another user?
thanks
|
|
|
|
|
How to read the keyboard buffer in Visual C++ ? can anyone help me out with an example .....like how to read Alt + tab from the keyboard buffer?
|
|
|
|
|
I think what you are interested in are the WM_CHAR and WM_KEYDOWN messages.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Can anyone explain me this in detail with any examples ????
is it possible in Win32 application ?? if so how is it possible?
|
|
|
|
|
A little searching goes a long way.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/keyboardinput/aboutkeyboardinput.asp
http://www.xploiter.com/programming/c/borland/3130.html
http://www.advancode.com/articles.php?page=ctrl-alt-del (VB example)
http://www.google.com/search?hl=en&q=%28WM_CHAR+OR+WM_KEYDOWN%29+alt+tab&btnG=Google+Search
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks a lot friend...its really useful...
|
|
|
|
|
Hello,
I am using VC++ 6.0 and MFC to develope ActiveX Control.
How can I add scrolling functionalities to the control window(derived from COleControl) similar that in CScrollView ?
TIA,
Jahfer V P.
|
|
|
|
|
Hello,
I am working with GDI+ and MFC in VC++ 6.0
The initialization codes for GDI+ library is working fine for windows application. But its behaviour in ActiveX control is unexpected, sometimes initializes and sometime not.
In both, Windows application and ActiveXcontrol, I included the code to initialize and uninitialize the GDI+ library in Application class's ("App" class derived from CWinApp) InitInstance() and ExitInstance() member functions respectively.
Hoping to get a reply soon,
TIA,
Jahfer V P
|
|
|
|
|
|
I have a graphical control class, similar to a CListCtrl, and I'm trying to implement drag and drop for it. I've implemented drag and drop for a CListCtrl by creating a CImageList using the CListCtrl's CreateDragImage function, and then Using the CImageList's built in drag and drop functions for animating the dragging.
I'm trying to do something similar with my class (which I'll call CMyClass), but the problem is I don't have a CreateDragImage function that I can call, so I'm trying to create the drag image myself, using WinAPI calls.
I've created some test code, seeing as I'm having problems, which, when the left mouse button is clicked, tries to capture the image of the current object in my list, and then animate it moving across the screen. At the moment, this kind of works, but the image moving across the screen is just a black box which is the same shape as the image I actually want.
There is some test code in the middle which successfully copies the image I want to the clipboard, so that it can be pasted into eg. paintbrush. This suggests to me that the CBitmap is successfully created, and that there's something wrong with the CImageList::Create or CImageList::Add...
void CMyClass::OnLButtonDown(UINT nFlags, CPoint point) <br />
<br />
CPoint ptCursor = point;<br />
<br />
CRect r = this->GetRect();<br />
<br />
CImageList DragImage;<br />
CBitmap CurrentDragImage; <br />
<br />
CDC dc; <br />
HDC hdc = ::GetDC(this->hWnd);<br />
dc.Attach(hdc);<br />
<br />
CDC memDC;<br />
memDC.CreateCompatibleDC(&dc);<br />
<br />
CSize sz(r.Width(), r.Height());<br />
CurrentDragImage.CreateCompatibleBitmap(&dc, sz.cx, sz.cy);<br />
CBitmap * oldbm = memDC.SelectObject(&CurrentDragImage);<br />
<br />
memDC.BitBlt(0, 0, sz.cx, sz.cy, &dc, r.TopLeft().x, r.TopLeft().y, SRCCOPY);<br />
<br />
this->GetParent()->OpenClipboard();<br />
::EmptyClipboard();<br />
::SetClipboardData(CF_BITMAP, (HBITMAP)CurrentDragImage);<br />
CloseClipboard();<br />
<br />
DragImage.Create(sz.cx, sz.cy, ILC_COLOR32, 0,1);<br />
<br />
DragImage.Add(&CurrentDragImage, RGB(0,0,0));<br />
<br />
DragImage.BeginDrag(0, point);<br />
<br />
DragImage.DragEnter(this->GetParent(), point);<br />
<br />
<br />
for (int i=20; i<200; i++)<br />
{<br />
CPoint g;<br />
g.x = i;<br />
g.y = i;<br />
DragImage.DragMove(g);<br />
<br />
for (int h=0; h<20000; h++);<br />
}<br />
<br />
<br />
}
Does anyone have any ideas why my code isn't working?
|
|
|
|
|
hiho@ll
the user can minimize my application to the systray
if the user right clicks on the systray icon he gets a menu
but if the user doesn't want to do anything in the menu and just wanted to work with another application my menu doesn't hide if he clicks somewhere other than my systray menu!?
how can i hide the systray menu if the user doesn't want to do something with my application?
thx@ll
|
|
|
|
|
|
Hi ,
I define a Data member in a Class ACB
CUIntArray m_array;
Class also have serialize function.
Its is compiling fine , but crash the program when it is build.
why this is happening?
thanx
Regards.
|
|
|
|
|
zahid_ash wrote:
Its is compiling fine , but crash the program when it is build.
Are you saying that compiling and building are two different things?
Does the problem go away if you remove the m_array member variable?
How is this member variable being used?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Sorry its not build its Execute.
its works fine when we build it , but when we Execute it crash down
Its is SDI application , as the Interface / view appears it crashes down.
Yes on removing data member it works fine
thanx
Regards.
|
|
|
|
|
zahid_ash wrote:
Sorry its not build its Execute.
its works fine when we build it , but when we Execute it crash down
I figured as much, but I just wanted clarification.
zahid_ash wrote:
Its is SDI application , as the Interface / view appears it crashes down.
Yes on removing data member it works fine
So how is this member variable being used? Simply declaring the varaible should not, in theory, cause your program to crash.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I am only adding it in header file
Using add member variable
CUIntArray m_array;
Not started to use it ...
thanx
Regards.
|
|
|
|
|
Then something must be wrong in the (default) constructor, as this is the only method called by declaration.
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Do the class has the limits that upto that limit we can add data members in a class ,
Because my class has already alot of data members .
and when the program crashes , an Access violation message occurs .
thanx.
Regards.
|
|
|
|
|
zahid_ash wrote:
Do the class has the limits that upto that limit we can add data members in a class ,
No, I've seen classes with hundreds of member variables and methods.
zahid_ash wrote:
Because my class has already alot of data members .
Define "alot."
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
can any body tell me how to create the cantrols dynamicaly in a mfc dialog application, i need some controls to display when some events occure.
any body please help me.
|
|
|
|
|
Since all controls are derived from CWnd , they each have a Create() method.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi there.
I have this annoying bug, and I would really appreciate it if someone could help me here.
I have a MFC application, that creates a Property Sheet-Page structure.
The main project invokes the creation of the property sheet and its pages, while the Dialog Page (the resource) and its corresponded class is defined and implemented in a different projct.
The Problem:
===========
The edit boxes in that page/dialog cannot be accessed by a mouse click, but only by tab - toggling between them. Other controls can be clicked by the mouse (e.g. OK button). Also, when I check the dialog with the 'test' option, the edit boxes can be accessed by the mouse.
Other dialogs and prop-pages in the application don't have this problem, but they are defined in the main resource file, of the main application. can this be the problem ?...
Please help me out here.
thank you,
yaron.
|
|
|
|
|
Hi all,
I p/Invoke a VC++ dll in C#, but there is serious memory leak, how can I fix the memory leakage by the VC++ dll caused by P/Invoke ?
(the leakage seem not come from the internal C++ code inside the dll, so I suspect it come from the loading and unloading of the dll in C#)
Thanks
|
|
|
|
|
Hi all,
How can I release the memory used by the following class in VC++ ?
1. Handle (file handle)
2. IStream
Thanks
|
|
|
|