|
Did you set SS_ICON for button?
|
|
|
|
|
Hi. I use the follwing thing in addition to my previos code But still it doesn't work.
<br />
case WM_INITDIALOG:<br />
SetWindowLong( GetDlgItem(hWndDlg, IDC_BUTTON1 ), <br />
GWL_EXSTYLE,<br />
GetWindowLong( GetDlgItem(hWndDlg, IDC_BUTTON1 ), GWL_EXSTYLE ) |SS_ICON );<br />
break;
|
|
|
|
|
Hey. Thnx After a long try its done. n by the way New Style to set for button is BS_ICON.
But I am able to see Only Icon on the Button. Caption just gone. Is there any way So that I can have both on the Button.
|
|
|
|
|
if you can use of owner draw for your button I think its better.
|
|
|
|
|
I am printing one bitmap but the bottom most portion of the bitmap is not getting printed,
wt might be the reason.
i am using default setting of printer.
if somebody know pls let me know abt it.
ThankXXXXX
|
|
|
|
|
The most obvious thing to say is... is the bitmap's ratio of width to height much taller than the printer page? {:v)
It might help if you show us the code that actually 'prints' the bitmap, so we can see if you're doing anything unusual. If you could specify the size of the test bitmap in pixels and the resolution of your printer page in pixels (using the CDC's GetDeviceCaps() method), that would be useful too.
|
|
|
|
|
Can you show how did you try to it?
|
|
|
|
|
I am going to create a window that mimics behavior of a menu.
It needs to hide when user clicks anywhere on the dialog, screen, other windows, etc. How can I do this?
I thought about hooking to mouse LBDown and doing a PtInRect check to see if it is in my window, but I'm not familiar with hooking. Is there any other way or I shall learn that?
p.s. OnActivateApp was good if there was a similar message for a window to indicate if it is active now. I can't use KillFocus because the window might never gain focus.
-- modified at 4:43 Tuesday 4th September, 2007
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
use SetCapture() API. if you call this function you will get mouse move and other mouse messages even if the mouse is not on your window.
|
|
|
|
|
I thought about it and used it already. But there is a problem:
Some times another window cause this window to loose capture, while mouse is still in the rectangle, like TaskManager.
It'll cause to ambiguity about current state, however I can remember a message from a window showing loosing focus.
Thanks for reminding me. I'll check that out.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Hamed Mosavi wrote: Some times another window cause this window to loose capture,
In this case you will get the WM_CAPTURECHANGED message.
|
|
|
|
|
That's the message I was talking about.
Got my 5, thanks.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Hamed Mosavi wrote: I thought about hooking to mouse LBDown and doing a PtInRect check to see if it is in my window, but I'm not familiar with hooking. Is there any other way or I shall learn that?
You are right about the LBDown. To know if it is inside your window why don't you get the handler for your dialog and use .GetWindowRect() to obtain the left, right, top and bottom variables.
Then inside the LBDown use those 4 variables and compare it with the CPoint parameter of LBDown.
|
|
|
|
|
and I have to write an OnLButtonDown for all childs, windows, etc!
No, there are better ways. Any way thanks for your effort.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
In addition to Naveen.R's comments...
Since you are going to create a menu similar to standard menu, you shuold have to manage the keys also. Am I right? If so I shall tell you some tricks
- NS -
|
|
|
|
|
NS17 wrote: a menu similar to standard menu,
It's in fact an addition to an EditBox to simulate autocomplete. The real data will be fetched using a query and the list should be filled with the result of the query. Unfortunately all auto complete controls here have a predefined list of texts and find a text that start with exact same prefixes. But I can't add all say 200,000 records in an OnInit() . Further than that it's not an interesting search.
I'm designing a live search box(like the one in Vista). A menu-like control that pops, shows a list of items, does not interfere with user typing text, and shows a different set of items on each change event in the edit control, it also has the ability to have a number (PK of the record in my project) assigned to each normal text.
I am not yet managing keyboard, but you are right. However if I need anything more than the following, I would be very happy to hear?
Something like:
BOOL CHToolMenu::PreTranslateMessage(MSG* pMsg)
{
if(pMsg->message == WM_KEYDOWN)
{
}
return CWnd::PreTranslateMessage(pMsg);
}
Thank you so much. Your help is appreciated.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Ok.. I thought it is replacement the standard menu.
But if you need to handle the keyboard, your code sample might not work, since the focus is in the edit box.
- NS -
|
|
|
|
|
Thanks.
NS17 wrote: your code sample might not work, since the focus is in the edit box
Doh! Your right. I had to add this to edit box and pass the control to my menu first, then give back the control or continue processing key. I have to think more about the whole process.
Thank you anyway. If I need any help, I'll consider asking you first, if you don't mind.;P
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Hamed Mosavi wrote: If I need any help, I'll consider asking you first, if you don't mind.
That is not needed...
- NS -
|
|
|
|
|
Of course it is. Everyone might need help one day.;) specially a beginner programmer like me.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
Done! but no need to shout like that actually
By the way, is this a new rule? I never did this already.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
does upper case alphabets means shout?
if it is like that, please tell me, i shall modify the content to lower case or delete it.
by the way,
it is not a new rule,
it is only a new standard (convention), just to show gratitude towards the guru who has solved it, and also to differentiate between solved and the not.
gud luck and thanks.
|
|
|
|
|
chandu004 wrote: does upper case alphabets means shout?
I think so. I read somewhere that in internet communities or chat rooms, uppercase = shouting! so a little bit impolite.
I didn't give that message a 1, but I think the reason for that uni-vote is exactly this.
chandu004 wrote: it is only a new standard...
Nice idea, and would be better to suggest it in the suggestion forum to add an icon for that type of message, for example. I also give a 5 to the true answers both to express my thanks and also the red text describes a true answer to other members.
// "Life is very short and is very fragile also." Yanni while (I'm_alive) { cout<<"I love programming."; }
|
|
|
|
|
thanks for information about the uppercase letters.
actually,
i was not aware of hte caps lock on.
and however,
i have posted it in suggestions forum 3 days ago and i got good reply.
i request you also to suggest those who get their problems solved.
thank u.
|
|
|
|
|
Hi Freinds,
I have third party dll and header file. Can I do static linking of this dll? Can I generate entire library file out of this third party dll?
|
|
|
|