|
Nicolas Bonamy wrote: Everybody known how to handle left-click on Item1, Item2, PopupIem1 and PopupItem2. But how can one detect a left-click on the "Popup" item? Is this feasible with a regular CMenu instance?
Hope I understood you!
This is from the documentation...
TPM_LEFTBUTTON If this flag is set, the user can select menu items with only the left mouse button.
TPM_RIGHTBUTTON If this flag is set, the user can select menu items with both the left and right mouse buttons.
|
|
|
|
|
No sorry this is not my point. This will not add a notification if the user clicks on the "Popup" item. This will only change the behavior when clicking on "real" menu items.
|
|
|
|
|
Hi.
In my application I have added a listbox on a dialog box. This list contain numbers of elements that user has to scroll so much to see all the contents.
I want to minimize the scrolling efforts of user and I want to provide auto scrolling to the list box. The elements of the list box should get scroll automatically when user movies the mouse pointer over scroll bars of the list.
How I can proceed to achieve this?
Thanks
Sameer Thakur
|
|
|
|
|
What would be the difference between an registered dll and a normal dll that doesn't have to be registered, would there be any performance differences?
Many Thanks
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
Assuming the DLL's are the same as far as their core code is concerned, No.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Yes the code would be the same ... Thanx for clearing that one up John.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
Programm3r wrote: Yes the code would be the same ... Thanx for clearing that one up John.
Normal dll should be present in Exe Current Directory or environment path.. but no such compulsion with registered dll as it path is stored in registry
|
|
|
|
|
So that is the difference between the two? (in a nutshell)
Thanks for the response.
Regards,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r My Blog: ^_^
|
|
|
|
|
Hello,
I have a Dialog, where in I show some text and draw some images using DrawText() and Draw(..) functions respectively.
Now I need to introduce an IEControl on this dialog. I wish the IE control to behave as if, its the background of my dialog, i.e. when I draw text on my main dialog, some part of the text is present on the main dialog and some part of the text spills over the IE control(this behavior is desired.) however, I wish to show my text in the foreground and the IE control to be on the background.
However windows is not providing any APIs for definind Z-Order for a child window and the text out on the dialog.
Any pointers in this regard will be highly appreciated.
Thanks
Suyash
|
|
|
|
|
No, there's no Z-order for drawing on a window. It's up to you to make sure you draw on top
of whatever you want the text to be on top of.
I'm not sure what "IEControl" you are using so I'm not sure how you could potentially know when
it's appropriate to draw the text.
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
What is difference between File pointer and File Descriptor?
|
|
|
|
|
a file descriptor is an unique number managed by the system itself to identify the file opened.
in your code, you don't get it. you get a FILE* (file pointer) to a copy of the opened file mounted in memory
you actually never work directly on the hard disk file, but on its copy into memory
|
|
|
|
|
|
Hi guys
I'm trying to figure out how to make a template class History. This class should be able to record history moves.(for any application). e.g. a history of changed in an editor, or a history of URLs in a web browser etc.
This is what i came up with so far.
<br />
#include < stack ><br />
#include < iostream ><br />
#include < string ><br />
<br />
using namespace std;<br />
<br />
template < typename E > <br />
class history<br />
{<br />
private:<br />
stack < E > back_list; <br />
stack < E > forward_list;<br />
<br />
public:<br />
history();<br />
void add_entry(const E & entry);<br />
E & undo();<br />
E & redo();<br />
bool no_undo();<br />
bool no_redo();<br />
};<br />
<br />
template < typename E ><br />
void history < E >::add_entry(const E & entry)<br />
{<br />
back_list.push(entry);<br />
while(!forward_list.empty())<br />
{<br />
forward_list.pop();<br />
<br />
}<br />
}<br />
<br />
template < typename E > <br />
E & history < E >::undo()<br />
{<br />
E entry;<br />
if(!back_list.empty())<br />
{<br />
entry = back_list.top();<br />
back_list.pop();<br />
forward_list.push(entry);<br />
<br />
}<br />
<br />
return(entry);<br />
}<br />
<br />
template < typename E > <br />
E & history < E >::redo()<br />
{<br />
E entry;<br />
if(!forward_list.empty())<br />
{<br />
entry = forward_list.top();<br />
forward_list.pop();<br />
back_list.push(entry);<br />
}<br />
return(entry);<br />
}<br />
<br />
template < typename E > <br />
bool history < E >::no_undo()<br />
{<br />
if(back_list.empty())<br />
return(1);<br />
else return (0);<br />
}<br />
<br />
template < typename E > <br />
bool history < E >::no_redo()<br />
{<br />
if(forward_list.empty())<br />
return (1);<br />
else return (0);<br />
}<br />
<br />
<br />
<br />
void main()<br />
{<br />
history <int> his;<br />
his.add_entry(2);<br />
int out;<br />
out = his.undo();<br />
cout<<out;<br />
<br />
}<br />
<br />
I get no compilation errors but as soon as i try to run it i get:
<br />
Linking...<br />
history.obj : error LNK2001: unresolved external symbol "public: __thiscall history<int>::history<int>(void)" (??0?$history@H@@QAE@XZ)<br />
Debug/history.exe : fatal error LNK1120: 1 unresolved externals<br />
Error executing link.exe.<br />
<br />
history.exe - 2 error(s), 0 warning(s)<br />
Any ideas of i'm doing wrong?
It's the first time i'm using template so i'll appreciate any help.
Thank in advance.
-- modified at 4:43 Friday 2nd March, 2007
|
|
|
|
|
you don't define a constructor for you class maybe, no ?
also next time, please use the <pre></pre> tags, and replace the < and > with < and >
|
|
|
|
|
Hi toxcct
Thanks for helping me. Sorry about my post it was missing all the <parts>.
U r right i don't define a constructor. Think thats why i get the errors?
The default constructor history() won't do the job?
Thanks again toxcct
|
|
|
|
|
antonaras wrote: Think thats why i get the errors?
yes, that's exactly what the error message talks about :
unresolved external symbol "public: __thiscall <code>history<int>::history<int></code>(void)"
|
|
|
|
|
antonaras wrote: public:
history();
Yes, you have forgot to define this c'tor.
|
|
|
|
|
I'm so stubit guys.
You were right i forgot to define the constructor outside the class.
It works fine now cheers everyone.
Appreciate ur help
|
|
|
|
|
I am working on list view control.I want to add a combo box as a sub item in the list viw control. I have used the view type as report. Any suggestion is welcome.
|
|
|
|
|
|
|
Dear all,
Now I doing a thesis about industrial robot, in which I want to send data from PC to robot controller via RS232 cable, notice that robot controller is used protocol 3964R Siemens so any body know how to write a program by C++ or VC++ please show me. I had to access many website to find a communication program however, I just support for RS232 standard not for 3964R Thank for your help.
|
|
|
|
|
Hi,
How can I change the height of a dropdown/droplist combo box (not the height of the dropped listbox)? It is automatically set by the font size.
Thank you.
- NS -
|
|
|
|
|
Have a look at CComboBox::SetItemHeight .
If you want to increase dropped height, you need to increase reactangle heigh bounding it, i.e. reactangle you have mentioned while creating combobox, or use MoveWindow to mention increased height.
|
|
|
|