|
But this code is accepted and executed in VC++ is it not? If not, how would I go about doing something like this in VC++?
|
|
|
|
|
Managed C++ is a microsoft product (targetted for .NET framework), ,so, of course it compiles with VC++, but i'd say more, it compiles only with VC++ !!!
but the fact is that MC++ is a pretty different language, even thoug it is based on the C++ syntax at its beginning, codeproject has 2 different forums, one for C++, VC++, MFC, and all that unmanaged stuff, and another for MC++, C++/CLI...
hope you better understand what i mean now.
|
|
|
|
|
Thanks for the info. Should I just post again in the correct forum or can someone not just move this post?
|
|
|
|
|
you better repost it on the correct place
|
|
|
|
|
every employee in a company reports to 1 person above him. The leader's cost of company is equal to his salary plus the cost of comapny of all his subordinates. write a program to find the cost of company of each employee. A program in a either C/C++/Java. Plz help me
Sat Shri Akal
Harsimran Singh Bhatia
|
|
|
|
|
Is it an assignment for me??
|
|
|
|
|
Thank You for your prompt reply. This is a question which has made me mad. Can U find the solution or atleast give me some hint of it. Please try it out. This is one of the questions of a company's placement paper.
Sat Shri Akal
Harsimran Singh
|
|
|
|
|
learn the forum's guidelines[^] first... we do not do homeworks here
|
|
|
|
|
Home-Works !!!!! Sir, this question is rated as one of the good questions !!! I dont ask U to do this but just ask to think over it and give hints. Sorry for asking !!!! Bye !!
|
|
|
|
|
First hint:
Start by yourslef and when you are stuck, ask specific questions.
Otherwise how do we know where you are stuck ? What is the problem ?
|
|
|
|
|
|
This was a specific question and not the assignment. And I dont think U even tried reading the question. You think its very easy, huh !! This was one of the questions asked by company in the recruitment procedure. And most of the students were not even able to start this question. Its ok sir if U are not interested and just sitting here for passing your time !! But stop discouraging others who want to use their grey matter !!!! I hope I have made myself clear.
I know after this discussuion I may be kicked out of the group. If any one in the visitors to my query feels interested and can help me out, mail me at harsimran.bhatia@gmail.com .
Bye and take care
Sat Shri Aakal
Harsimran Singh Bhatia
|
|
|
|
|
man, don't talk abou me and what i do at codeproject. you don't know anything about me, and YOU[^] are not in position to judge me.
|
|
|
|
|
Hi v2.0,
Whats the matter
|
|
|
|
|
Hi
You can create a Tree for achieving this so that if there is a node underneath you can add the total of all nodes to the parent .
This will be for the person who is the leader.
Similarly for the person under the leader check for the nodes that are lying underneath and then add the total of all those nodes
It will be easier for you to find a solution if you go according to the iterative method rather than moving on with the more conventional solution of iterating with each node in a different manner.
Vision is Always important and so is your ATTITUDE.
Wishes.
Anshuman Dandekar
|
|
|
|
|
hi all,
i want to adjust the progress bar step size according to the reading of the Records from the Database. If i read Three Records then the Progressbar steps accordingly. if i read 1000 records then the progress bar must steps accordingly. please give a snippet of the code for this. urgent.
thanks,
uday.
uday kiran
|
|
|
|
|
Try this:
void setRange(CProgressCtrl* pWnd, int nLower, int nUpper, int nStep)<br />
{<br />
ASSERT(-0x7FFFFFFF <= nLower && nLower <= 0x7FFFFFFF);<br />
ASSERT(-0x7FFFFFFF <= nUpper && nUpper <= 0x7FFFFFFF);<br />
pWnd->SendMessage(PBM_SETRANGE32, (WPARAM)nLower, (LPARAM)nUpper);<br />
pWnd->SetStep(nStep);<br />
}
Hope this help
Abyss
|
|
|
|
|
Abyss wrote: pWnd->SendMessage(PBM_SETRANGE32, (WPARAM)nLower, (LPARAM)nUpper);
Why not call SetRange32() directly?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Here is a small algo that might help you in implementing .
int iTotalSize = FindTheTotalSizeOfRecords();
CProgressCtrl DlgCtrl;<br />
DlgCtrl.Create(WS_CHILD|WS_VISIBLE, CRect(10,10,200,30), pParentWnd, 1);<br />
DlgCtrl.SetRange(1,100);<br />
while (RecordPresent)<br />
{<br />
int iTillNow = FindTillReadnow() ;
int iPos = iTillNow/iTotalSize;<br />
DlgCtrl.SetPos(iPos);<br />
}
Regards,
FarPointer
|
|
|
|
|
I have to write a module in VC++ which will enumerate all controls(including menus, buttons etc) present in a Window and launch each control programatically e.g for a submenu item i have to launch it using only it's shortcut key.
I have successfully been able to enumerate all submenu items within each menu e.g WordPad. i get each submenu string using GetMenuString() and it's id using GetMenuItemID().
The problem is how do i enumerate the other controls present e.g in the Wordpad window e.g we have the 'New', 'Open' buttons, and a no. of drop down combo boxes etc. i want to be able to enumerate all of these controls and get their id/ hwnd / string name and programatically launch each window associated with e.g. the 'New' button etc.
How do i do this?
This is a test application to enumerate all Menu/submenus and all controls present in a window and launch each submenu window or controls window one after the other using their short cut keys if the menu has one.
Kindly suggest me a way to do, if a sample code exists kindly update.
Awaiting a response.
Sincerely
Giftsana
|
|
|
|
|
Try this:
for(CWnd* pChild = GetTopWindow(); pChild; pChild = pChild->GetNextWindow()) {<br />
if(!pChild->IsKindOf(RUNTIME_CLASS(CListCtrl))) continue;<br />
}
Hope this helps
Abyss
|
|
|
|
|
Hello
Thank you, let me try it.
Thanks
Giftsana
|
|
|
|
|
Try this
EnumChildWindows
Regards,
FarPointer
|
|
|
|
|
Sure, will try with EnumChildWindows()
Thank You.
Sincerely
Giftsana
|
|
|
|
|
I'm trying to create an OLE link to a file using WinAPI method OleCreateLinkToFile. By this my document will contain a link to a file on the disk. This works fine for Excel XLS files.
However for some reason this method embeds other type of documents. If I try to link PDF file to my document it is embedded - what I do not want, because it increases my document size. Note I do not have PDF reader installed.
Do you have any idea how to solve this situation? Is it possible to force the link creation? If not, is it possible to detect such situation so I'll rather ignore such files from linking?
Thanks, Abyss
|
|
|
|