|
You can do this sort of thing with the windows start menu.
But they don't actually use a windows menu...
So, if even the windows shell team need to make their own menu-lookalike window to do this, I'd assume you can't with the built in menu either.
Looks like you have a lot of work in front of you...
Just how much do you need this feature? Could you have a customise dialog box where you rearrange the order of the menu, *then* change the menu, rather than doing it on the fly?
Iain.
|
|
|
|
|
Hello,
I created a MFC-based ActiveX Control. My goal is to paint some rectangles on dc.
And when user clicks on dc area, I get the clicked point coordinate and adjudge the position of user click is in the rectangles or not.
If the click position is in the rectangles, I jumped a dialog window. If the click is out of the rectangles, nothing happened.
I used OnLButtonDown() to get the clicked point. But strange thing happened.
If I test this ActiveX Unit in the ActiveX Control Test Container, OnLButtonDown() works well and result is the expected result.
But if I packed .ocx file into .cab file and used IE to test, OnLButtonDown() failed. This method didn't be executed when I clicked on the dc area.
The creation step which I referenced is this : http://www.codeproject.com/KB/COM/CompleteActiveX.aspx
I followed the step to create the ActiveX. My control setting of creation step is the same as figure 2. of the referenced html page.
Create control based On : choose STATIC
The option "Activates when visible" and "Flicker-free activation " are checked, others are not checked.
Does anybody can help me to solve this problem ?
My environment : VS2005 SP1 + MS Platform SDK 2003 SP1 + Vista SP1
Thanks
|
|
|
|
|
Hi All
How can i export data n excel?i search forum for export data in excel but i haven't got any example of VC++.Plz help me
Thanks in advance
|
|
|
|
|
|
|
try this: http://xlw.sourceforge.net/
|
|
|
|
|
If you just want to export some text data, then write it as comma separated value (.csv) file . Check this thread[^] for more info.
[Edit]
Or you want to read or export data from excel file? You're question seems confusing.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hi want to develope my own antivirus software . can any one suggest me with type of programming I neeed and any help regarding this on windows system .
Trioum
|
|
|
|
|
You have a long way(you must be know about registry,memory,files,tcp/ip,processes/threads,and other info).
Virus Tutorial[^].
|
|
|
|
|
I have good experience in vc++ programming and good knowledge of registry,memory,files tcpip threads
your link is not sufficient . can you share me more info
Trioum
|
|
|
|
|
You must be know c++ very good so if we suppose your knowledge is good in this sphere do you know security alert about some functions for example you want to use of wsprintf Function[^] or signature of viruses?
|
|
|
|
|
I know about the wsprintf but not about the signature of the virus
Trioum
|
|
|
|
|
Person in shop: Excuse me, how much is that huge diamond ring?
Shopkeeper: If you have to ask, you can't afford it.
Same sort of answer to your question... (maybe a little more polite!)
There are so many different (and hard) things you need to know, and if you're starting from zero (even a skilled zero), a simple answer here won;t help.
I wish you luck though!
Iain.
|
|
|
|
|
trioum wrote: Hi want to develope my own antivirus software . can any one suggest me with type of programming I neeed and any help regarding this on windows system .
The best way to go would be to refer to an open source anti-virus[^] program.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
i have a dialog based application. i want to display a popup menu when user clicks on button on a dialog and user should be able to select any of the items(from popped up menus after clicking on button).
for example:in code project when user moves mouse on message boards and when user clicks on c++/mfc then it will direct to forum for c++/mfc. how can i do this?
thanks in advance.
|
|
|
|
|
You can use of WM_CONTEXTMENU.
|
|
|
|
|
could u plz explain with some demo examples?
|
|
|
|
|
|
Anjali Patil wrote: i have a dialog based application. i want to display a popup menu when user clicks on button on a dialog and user should be able to select any of the items(from popped up menus after clicking on button).
Check out this simple tutorial[^].
But the tutorial explains how to display popup menu when you right click on a button. Since you want to show your menu during button click, I'll explain how to do it, in the context of the tutorial. Just add the button click event handler, then call the OnContextMenu() explained in the tutorial. Hope it helps.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
hi Jijo raj,
thank you for helping me.
still it is not working. i did as:
afx_msg void OnContextMenu(CWnd *pWnd,CPoint pos);
ON_BN_CLICKED(IDC_BUTTON1, OnContextMenu)
void IRCNewSim::OnContextMenu(CWnd *pWnd,CPoint pos)
{
// CMessage1 ob1;
// ob1.DoModal();
CMenu mnuPopupSubmit;
mnuPopupSubmit.LoadMenu(IDR_MENU2);
// Get a pointer to the button
CButton *pButton;
pButton = reinterpret_cast<CButton *>(GetDlgItem(IDC_BUTTON1));
// Find the rectangle around the button
CRect rectSubmitButton;
pButton->GetWindowRect(&rectSubmitButton);
// Get a pointer to the first item of the menu
CMenu *mnuPopupMenu = mnuPopupSubmit.GetSubMenu(0);
ASSERT(mnuPopupMenu);
// Find out if the user right-clicked the button
// because we are interested only in the button
if( rectSubmitButton.PtInRect(point) ) // Since the user right-clicked the button, display the context menu
mnuPopupMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);
}
mnuPopupMenu is getting NULL value
plz help me
|
|
|
|
|
Hai!
I posted the following question recently
I have a multiline edit box in my MFC application , it is also enabled with auto V-Scroll, after all the data is being displayed, it goes to the initial position, i have to scroll to the end, for data verification, is there any way to make the cursor to stay at the end or last position after printing all the data ?
Thankyou !
i got the replies as
CEdit medt
medt.LineScroll (medt.GetLineCount ());
but what is happening is each time the data is entered into the multiline edit box the scroll bar goes to initial position and then comes down, it appears like blinking,
what i need is it must go down first and then decrease the size of scrollbar and stay at the end when data printed on the multiline edit box is completed!
thanks!
|
|
|
|
|
Does the SetRedraw function help? You could stop the control updating it's view until you've finished adding data. Then setredraw(true), then invalidate it.
Hopefully that will stop flickering!
Iain.
|
|
|
|
|
the function looks excatly as the codeblock below like this :
I suspect that the function is virtual or something very werid but can this function be hooked really interested to do that. I have hooked standard apis and other functions but hooking this i have no idea how do do it if anyone helps it BE great thx.
char *__cdecl sub_1000F61C()
{
byte_10095AA0 = (unsigned __int8)byte_10090A14 ^ 0x62;
byte_10095AA1 = (unsigned __int8)byte_10090A11 ^ 0x8F;
byte_10095AA2 = (unsigned __int8)byte_10090A12 ^ 0xF;
byte_10095AA3 = (unsigned __int8)byte_10090A10 ^ 0x19;
byte_10095AA4 = (unsigned __int8)byte_10090A12 ^ 0xD;
byte_10095AA5 = (unsigned __int8)byte_10090A10 ^ 0x1B;
byte_10095AA6 = (unsigned __int8)byte_10090A14 ^ 0x3E;
byte_10095AA8 = (unsigned __int8)byte_10090A10 ^ 0x59;
byte_10095AA9 = (unsigned __int8)byte_10090A14 ^ 0x69;
byte_10095AA7 = (unsigned __int8)byte_10090A10 ^ 0x45;
byte_10095AAC = (unsigned __int8)byte_10090A13 ^ 0xE0;
byte_10095AAA = (unsigned __int8)byte_10090A13 ^ 0x8C;
byte_10095AAB = (unsigned __int8)byte_10090A11 ^ 0x93;
dword_10095BA0 = 12;
return &byte_10095AA0;
}
char byte_10095AA0
all the byte_andnumbers are declared as chars.
|
|
|
|
|
Uh, what do you want to do?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I want hook the function char *__cdecl sub_1000F61C()
char *__cdecl sub_1000F61C()
{
byte_10095AA0 = (unsigned __int8)byte_10090A14 ^ 0x62;
byte_10095AA1 = (unsigned __int8)byte_10090A11 ^ 0x8F;
byte_10095AA2 = (unsigned __int8)byte_10090A12 ^ 0xF;
byte_10095AA3 = (unsigned __int8)byte_10090A10 ^ 0x19;
byte_10095AA4 = (unsigned __int8)byte_10090A12 ^ 0xD;
byte_10095AA5 = (unsigned __int8)byte_10090A10 ^ 0x1B;
byte_10095AA6 = (unsigned __int8)byte_10090A14 ^ 0x3E;
byte_10095AA8 = (unsigned __int8)byte_10090A10 ^ 0x59;
byte_10095AA9 = (unsigned __int8)byte_10090A14 ^ 0x69;
byte_10095AA7 = (unsigned __int8)byte_10090A10 ^ 0x45;
byte_10095AAC = (unsigned __int8)byte_10090A13 ^ 0xE0;
byte_10095AAA = (unsigned __int8)byte_10090A13 ^ 0x8C;
byte_10095AAB = (unsigned __int8)byte_10090A11 ^ 0x93;
dword_10095BA0 = 12;
return &byte_10095AA0;
}
|
|
|
|