|
whats value for point try this
<br />
CPoint point;<br />
GetCursorPos(&point);<br />
whitesky
|
|
|
|
|
Wow great its working fine.....
thans for ur help whitSky
once again thank u very much...
With regards
Raja Bose
-- modified at 2:57 Friday 9th June, 2006
|
|
|
|
|
you're welcome but
Raja Bose C Leo wrote: whitney
whitesky
|
|
|
|
|
Don't you think that GetMessagePos is better?
- NS -
|
|
|
|
|
|
I mean GetCursorPos will return the current position of the cursor, while GetMessagePos will return cursor position for the last message retrieved by the GetMessage function. So for processing a mouse click, it is better to get the position of the cursor at the time of that message was processed, rather than getting the current position, right?
- NS -
|
|
|
|
|
--------------------------------------------------------------------------------
Hello everyone,
I am discussing with my friends about an interesting question about find the maximum element in a set, which is the sum of two other elements.
For example, in set {1, 2, 3, 5, 8, 10}, the answer is 10 (10 = 8 + 2),
which is the maximum element we can find, and it is the sum of two
other elements (8 and 2) in the set.
Currently, I only have brute-force solution. Sorting the set, which takes O(nlgn) time, then enumerate them one by one to find whether two elements can sum up to the maximum element (if the most maximum element does not meet the condition, move to the second largest one), which takes O(n^2) time, so the total time complexity is O(n^2).
I am wondering whether any one have better ideas?
thanks in advance,
George
|
|
|
|
|
Hi to all,
In my project, I am using Combo-Box with following properties in ‘style’ tab,
Type : Drop List
Owner Draw : No
Sort : check mark
Vertical Scroll : check mark
Auto HSCroll : check mark
But when I run the code, for nay long string in the combo-box I can’t scroll horizontally.
Plz, help me to set the combo-box to view string in it’s list Horizontally also.
Thanks in advance,
Best Regards,
Aniket
|
|
|
|
|
|
I think, the horizontal scrolling is available only when type is "Dropdown" (i.e. the combo-box is editable) and Auto is true.
If no other solutions, you can switch to "Dropdown" type and try to obtain the handle of the combo-box’s child editor (using GetComboBoxInfo member in Window XP) and make it read-only.
|
|
|
|
|
Hi,
My dialog having CListCtrl and CComboxBox both are ownerdraw control. I place combobox on the listctrl cell. parent of the combo is listctrl. my problem is, the comboctrl is not placed with in the listrctrl cell. measureitem member function is raised when the parent of the combo is dialog or any frame work. how can i adjust the combox height. while creating the combo i give the rect of the listctrl cell. any one help me out.
Thanks In Advance.
Have A Nice Day!
Murali.M
|
|
|
|
|
i think you have one code for your work but see here maybe it is some helpful to you for combo in listctrlHere[^]
whitesky
|
|
|
|
|
Thanks for your reply. i already go through the code. here clistctrl is custom draw. but the combo is not. the sample u mension is combox is fully owner draw. i thnk u can understand my problem.
Have A Nice Day!
Murali.M
|
|
|
|
|
u got two ways
either increase the the height of row in listctrl to the height of combobox( This can be done by handling the measure item message )
or Decrease the height of the combobox by changing the font size
nave
|
|
|
|
|
How to get saved as the bitmap(DIB) the whole html document with the scrollbars that is with the part which is not visible on the screen but visible when the the document is scrolled.
As i m able to save the page which is displayed on the screen as the bitmap(DIB)in webbrowser application but i want to save the whole page and i m getting the whole page height and width through the get_scrollheight() and get_scrollwidth() but the page is not saved as while creating the DIB the window pointer is passed so what to do so that whole page get saved???
Regards
Shikha
Pune
|
|
|
|
|
Well not sure if this will work but since no one answered try this
Get the HWND to the main IE window and get its DC then try saving that DC to a bitmap the whole window along with the scroll bars should be saved.
You know you're obsessed with computer graphics when you're outside and you look up at the trees and think, "Wow! That's spectacular resolution!"
|
|
|
|
|
Thanks for reply
i have yet not tried what u said i will try that and let u know
Thanks
Regards
Shikha
|
|
|
|
|
Do you use IHTMLElementRender::DrawToDC to obtain the bitmap? Does it clip the exceeded areas?
|
|
|
|
|
i write a code to call the popup dialog to fix in the main dialog.
pop1= new CPopupDlg();
pop1->Create(IDD_DIALOG1,this);*/
pop1->ShowWindow(SW_SHOW);
but i want to disable that dialog under some condition.
how can i do this
|
|
|
|
|
Can you be more specific
whitesky
|
|
|
|
|
sree_as wrote: but i want to disable
pop1->EnableWindow( FALSE );
nave
|
|
|
|
|
pop1->ShowWindow(SW_HIDE);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: pop1->ShowWindow(SW_HIDE);
How could this function disables a dialog? it hides the dialog. isn't it?
nave
|
|
|
|
|
i tried
pop1->showWindow(SW_HIDE);
pop1->EnableWindow(false);
not working
some more please
sree
|
|
|
|
|
try
pop1->ModifyStyle( 0, WS_DISABLED );
nave
|
|
|
|