|
Um, er, ah, Just to hazard a guess -
Minimum supported client is WinXP SP1.
XP SP1 was released on Sep 9 2002, not quite sure how it would make it into the MSDN that was released 11 months prior.
Well, that's my uneducated take on it anyway...
The thing I'm curious about, is why you would want to know how to (a)hide your program from the task-manager programs list and (b) how to get a processId.
Me wonders if you aren't producing a piece of malware?
modified on Sunday, May 3, 2009 9:39 AM
|
|
|
|
|
i am not producing a malware.I work on a office lan control app.I don't want the employee to stop my client part.so i need these technics.
thank you to your help.
|
|
|
|
|
tyr2000 wrote: office lan control app
Well, that sounds like malware to me
|
|
|
|
|
I am using templates for a class for the first time and I cannot figure out what I am doing wrong.
Any help would be greatly appreciated.
This code will generate LNK2019 Unresolved External
AssocArray<Vector3> myArray;
Class Definition
template <class TValue>
class AssocArray
{
public:
AssocArray();
AssocArray(int size, int resizeBy);
int GetCount() { return m_nItems; }
void SetNewSize(int size, bool copy = true);
void IncreaseSize(int size, bool copy = true);
TValue operator [](int i);
TValue operator [](string s);
private:
int m_nItems;
int m_nMaxItems;
int m_nResizeBy;
KeyValuePair<string, TValue>* m_array;
};
Class Constructor
template <class TValue>
AssocArray<TValue>::AssocArray()
{
m_nItems = 0;
m_nMaxItems = 2;
m_nResizeBy = 2;
m_array = new KeyValuePair[2];
}
modified on Sunday, May 3, 2009 5:28 AM
|
|
|
|
|
What's the exact error that is displayed on Output window???
|
|
|
|
|
Error 1 error LNK2019: unresolved external symbol "public: __thiscall AssocArray<class Vector3>::AssocArray<class Vector3>(void)" (??0?$AssocArray@VVector3@@@@QAE@XZ) referenced in function "public: void __thiscall EngineRoot::InitializeLater(void)" (?InitializeLater@EngineRoot@@QAEXXZ) EngineRoot.obj
Error 2 fatal error LNK1120: 1 unresolved externals
modified on Sunday, May 3, 2009 9:39 PM
|
|
|
|
|
Is the constructor in the same file as the class definition? (Hint: it isn't.)
(If you're wondering why it doesn't give you a compilation error, it's because the compiler doesn't know if you have a class template specialization defined somewhere.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Constructor and all member functions are in a separate file to the definition.
There is no template specialization in the code.
|
|
|
|
|
That's my point; put everything into one file. By their nature, template classes are nothing but definition.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Thank you, that has solved the problem
|
|
|
|
|
Help,is anyone who can tell me how can I change the height of the item in the list control????
|
|
|
|
|
See here[^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Sure.
Do a search and find some code that implements a custom list control. Look through the source
until you find code that alters the height of each item. Copy this code and apply appropriately.
Something else you may consider: LPNMCUSTOMDRAW & WM_NOTIFY
|
|
|
|
|
For example, I post a request that read n bytes from a file,
then what its completion condition?
Is it like this:
if the file is larger than n bytes, it won't complete until n bytes is read, and if the are less than n bytes to read, it will complete as soon as the end of file is reached.
|
|
|
|
|
followait wrote:
Is it like this:
if the file is larger than n bytes, it won't complete until n bytes is read, and if the are less than n bytes to read, it will complete as soon as the end of file is reached.
Yes, that sounds correct. The read request could also be subject to cancelation of pending asynchronous I/O operations if FILE_FLAG_OVERLAPPED.
Additional Info:
Inside I/O Completion Ports[^]
I/O Completion Ports[^]
ReadFile Function[^]
Best Wishes,
-David Delaune
|
|
|
|
|
Hi,
I am having problem with creating CTabCtrl. I derived my class MyCTabCtrl from CTabCtrl.
In the view I am trying to dynamicaly create the control of MyCTabCtrl but always fails.
MyCTabCtrl* tab;
tab = new MyCTabCtrl();
tab->Create(TCS_TABS|WS_VISIBLE|WS_CHILD,CRect(10,10,100,100),this,12345);
When I define tab as CTabCtrl it creates fine. The default constructor of my class calls the base CTabCtrl constructor
MyCTabCtrl::MyCTabCtrl():CTabCtrl()
{
}
Thank you for your help, Tomas
|
|
|
|
|
How does it fail? Create returns FALSE? Check GetLastError, what does it give you?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
I can't call the GetLastError, because the Create function stops on
ASSERT(::IsWindow(m_hWND)||(m_pCtrlSite != NULL)) in BOOL CWnd::SetWindowPos. It is called from AfxCtxCreateWindowEx.
I can post here the definition of MyCTabCtrl, but I think it is ok.
Thanks, Tomas
|
|
|
|
|
Around asserts in MFC code they usually also leave comments for you to know what the problem might be, so check that...
Try one thing, add a message map to your MyCTabCtrl if you didn't yet.
class MyCTabCtrl: public CTabCtrl
{
...
DECLARE_MESSAGE_MAP()
...
};
...
BEGIN_MESSAGE_MAP(MyCTabCtrl, CTabCtrl)
END_MESSAGE_MAP()
...
Another thing, you don't need to explicitly call the superclass's default constructor in your own default constructor, it will be called for you "automatically".
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi,
the ASSERT failure is on line 318 in winocc.cpp file. It is in a CWnd::SetWindowPos and the problem is that m_hWnd is bad pointer.
Why I am doing all this is because of the problem with serialization. When I had member of MyCTabCtrl associated to the CTabCtrl create in the designer it worked fine till open new file. I thought I would solve this problem by having a pointer an create new instance on every OnInitialUpdate(). If there is another solution to this problem I don't mind which one would I use.
But I still don't understand what is wrong with my class. I used the name MyCTabCtrl instead of Am_AnalysisParameters_TabCtrl for simplifying.
class Am_AnalysisParameters_TabCtrl : public CTabCtrl
{
DECLARE_DYNAMIC(Am_AnalysisParameters_TabCtrl)
public:
Am_AnalysisParameters_TabCtrl();
virtual ~Am_AnalysisParameters_TabCtrl();
int viewsID[2];
CFormView *views[2];
void InitViews();
void ActivateView();
protected:
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnTcnSelchange(NMHDR *pNMHDR, LRESULT *pResult);
afx_msg void OnSize(UINT nType, int cx, int cy);
};
implementation of the class
IMPLEMENT_DYNAMIC(Am_AnalysisParameters_TabCtrl, CTabCtrl)
Am_AnalysisParameters_TabCtrl::Am_AnalysisParameters_TabCtrl()
{
viewsID[0] = IDD_AM_ANALYSISPARAM_BUILDINGTAB_FORMVIEW;
viewsID[1] = IDD_AM_ANALYSISPARAM_ADVANCEDTAB_FORMVIEW;
views[0] = new Am_AnalysisParameters_BuildingTab_FormView();
views[1] = new Am_AnalysisParameters_AdvancedTab_FormView();
}
Am_AnalysisParameters_TabCtrl::~Am_AnalysisParameters_TabCtrl()
{
}
BEGIN_MESSAGE_MAP(Am_AnalysisParameters_TabCtrl, CTabCtrl)
ON_NOTIFY_REFLECT(TCN_SELCHANGE, &Am_AnalysisParameters_TabCtrl::OnTcnSelchange)
ON_WM_SIZE()
END_MESSAGE_MAP()
and in my view class
void Am_AnalysisParameters_FormView::OnInitialUpdate()
{
CFormView::OnInitialUpdate();
CRect rect;
GetWindowRect(rect);
analysisParamTabCtrl = new Am_AnalysisParameters_TabCtrl;
analysisParamTabCtrl->Create(TCS_TABS|WS_VISIBLE|WS_CHILD,CRect(10,10,100,100),this,12345);
}
Tomas
|
|
|
|
|
This is a guess from me but, i see that you have an array of views in your tab control and that you have a handler for the WM_SIZE message. Do you try to position/resize these views when the tab control itself gets the WM_SIZE? When the control gets created, it will receive a WM_SIZE message, so could it be that in your handler you call the SetWindowPos method on your views but these views were not yet created?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
No, there shouldn't be any problem with WM_SIZE. I just resize the tabcontrol itself and the tab views have there own method to handle WM_SIZE.
SetWindowPos it is called everytime you create new control.
Any sugestion??
Tomas
|
|
|
|
|
I juse copy-pasted your class into a basic dialog based project, removed the message handlers (since you didn't provide the code for those) and tried it, there was no failing assert, no problem at all. I think without actually seeing your full code i am at this point unable to suggest anything.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Hi
I want to make a button with two tool tips
I,e when the mouse cursor over the left half of the button it displays different tooltip than when the mouse over the right half
As you can see in www.visualcsamples.blogspot.com
I made a button with a button with 2 hover states one on the left and one on the right
Now I,am interested in making a button with 2 tooltips
It works fine the button with 2 hover state
help me
Thanks
|
|
|
|
|
As you can see in the documentation of CToolTipCtrl::AddTool[^], you can specify it a rectangle in the lpRectTool parameter, so basicly i guess all you need to do is add your button twice to the tooltip specifying the left and then the right part of it. Something like this:
m_myToolTip.AddTool(&m_myButton, _T("left side of my cool button"), &left_side_rect, left_tool_id);
m_myToolTip.AddTool(&m_myButton, _T("right side of my cool button"), &right_side_rect, right_tool_id);
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|