|
use the following code
RegisterHotKey(hwnd, 100, MOD_ALT | MOD_SHIFT | MOD_CONTROL , 0x50);<br />
intstead of
RegisterHotKey(hwnd, 100, MOD_ALT | MOD_SHIFT | MOD_CONTROL , 'p');<br />
It requires the ASCII in the last argument. and tell me whether it worked or not.
|
|
|
|
|
thanks very much
it works now.
now I have another minor problem:
I want to run this program all the time and I dont want any window of the program to be shown (even as minimized) but the cmd window is present as long as the program is running.
|
|
|
|
|
Can anyone help me with building a toolbar with two vertical columns?
Mark
|
|
|
|
|
Mark_VC wrote: Can anyone help me with building a toolbar with two vertical columns?
Depending on what you need, I can think of a couple ways. One is to just use two toolbars. Another option is to use a "dialog bar" and make the dialog template provide two vertical columns of buttons.
Nathan
|
|
|
|
|
I would really like toolbar by itself so that the program looks professional. I may use calcFixedlayout. If you have a neat way how to do it, please do help.
thanks.
|
|
|
|
|
Mark_VC wrote: I would really like toolbar by itself so that the program looks professional. I may use calcFixedlayout. If you have a neat way how to do it, please do help.
thanks.
I'm afraid I don't understand what your saying. How would a dialog bar look nonprofesional?
Nathan
|
|
|
|
|
A toolbar will wrap the buttons if you set its size appropriately.
A problem, unless there's enough buttons, is that when you resize it to the right size,
it may not fill an entire side of a window.
To get around this, I personally embed the toolbar in a control bar - the control bar always
stays the height of the window and the width of two columns of buttons. The embedded
toolbar is sized appropriately to get the two columns.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
how can i resize it so that the buttons inside it wrap itself. As far as I know, it always aligns button in a single column in vertical toolbar. I tried resizing it, it still shows the buttons in single column. Help please.
Mark
|
|
|
|
|
Make sure the toolbar control has the TBSTYLE_WRAPABLE style.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I tried TBSTYLE_WRAPABLE. It probably works only when the toolbar is floating. When the toolbar is docked, it aligns itself in single column again. I know i have to use calcDynamicLayout and CalcFixedLayout. I do not know who to override them and what code to put in it.
Thanks every one for help though
|
|
|
|
|
It doesn't have to be floating.
You didn't mention MFC before, but now that you've mentioned it -
Override CalcFixedLayout()...
If you return the proper size for the bar it will work.
The width should be the size of two buttons (for two columns).
The height should be the height of the client area of the parent.
For CalcDynamicLayout() I often just route the call to CalcFixedLayout()
unless I need different functionality there - something like:
CSize CMyControlBar::CalcDynamicLayout(int nLength, DWORD dwMode)<br />
{<br />
return CalcFixedLayout(dwMode & LM_STRETCH, dwMode & LM_HORZ);<br />
}<br />
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
What to put in CalcFixedLayout override. I though i have to set flag for each toolbar buttion in the CalcFixedLaout function(weather the buttion is to be wrapped or not). What would that code be? Or I should simply use TBSTYLE_WRAPABLE style for Toolbar without any code in CalcFixedLayout and it should work?
Thanks again.
Mark
|
|
|
|
|
Mark_VC wrote: What to put in CalcFixedLayout override.
All you need is to return the size you want.
For vertical, two columns, something like this maybe...
CRect CliRect;
GetParent()->GetClientRect(&CliRect);
CRect ButtonRect;
GetToolBarCtrl().GetItemRect(0, &ButtonRect);
return CSize(ButtonRect.Width() * 2, CliRect.Height());
The wrapable style only needs to be set on the toolbar itself. You also don't need
separators although they can be used to aid wrapping in some instances.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I will try this code. I did try using the width function of the toolbar but that increased the width but did not wrap the buttions. I will use this approach now. I will update you how did it go.
|
|
|
|
|
Use Separator at the place from where you need to wrap.
I think this will help you.
|
|
|
|
|
may be yes but i am looking for a photoshop type of application where you see a vertical toolblar on the left side. Same as MS Paint type toolbar. Thanks.
|
|
|
|
|
Hello,
I am making one network application which controls computers on LAN, it is for internet cafes,
i have problem how to get computers ip address on LAN?
anyone has some ideas?
thanks
|
|
|
|
|
You probably need a boadcast message which all the computers will respond to with some identifiable information. Fortunately someone already thought of that and invented both the ICMP protocol and Ping. I have no idea how they work but I reckon you should start with these to find out how to do it.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Matthew Faithfull wrote: Fortunately someone already thought of that and invented both the ICMP protocol and Ping.
Which can be easily ignored by machines, resulting in false negatives.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Gofur Halmuratov wrote: anyone has some ideas?
NetServerEnum() .
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I have Memory DC on which image is present. Using StretchBlt() i used to display the image.
While Zooming out the image i used to minus some value(X) the source recangle Left and Top and plus the same value(X) from right and Bottom of source rectangle.
Now, Is there any problem if i access the -ve coordinate from memory DC??
Please give u'r comments.
Hi this is SHivraj
|
|
|
|
|
shivrajbhosale wrote: Now, Is there any problem if i access the -ve coordinate from memory DC??
I don't know what that means but the image in your memory DC did not change by bliting it to the screen in different ways.
|
|
|
|
|
Do you have any problem about coordinate ?
|
|
|
|
|
The sin of the Y-Coordinate depends on which MAP_MODE you use.
Take a look to
CDC::SetMapMode
virtual int SetMapMode( int nMapMode );
in the help.
There is a explanation about coordinates and how are they used.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Hello everybody,
having a DlgItem, for example a a CEdit oder or a CStatic, on a CDialog the CDialog periodically receives WM_MOUSEMOVE messages when the mouse is over the DlgItem without any movement. The coordinates, as expected, don't change.
Does anybody have an explanation for this behaviour?
Thanks in advance
MS
|
|
|
|