|
vikas amin wrote: By default, DrawDragRect draws the rectangle by using a halftone brush to eliminate flicker and to create the appearance of a smoothly moving rectangle.
Calm down buddy!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
Binary Search Algorithm
Bernie (Boom Boom) Geoffrion worked Atlanta Flames games in the 1970s with the splendid Jiggs McDonald. One night, Geoffrion said, "Jiggs, there are only three things to hockey: shooting and skating." McDonald said, "Right, Boomer. And what's the third?" The exasperated Geoffrion replied," Jiggs, that's the three. Shooting. And. Skating."
|
|
|
|
|
Hi Jack what are you talking about
|
|
|
|
|
Hello everyone!
OK, I've seen how to do this on some website, but I'm creating my listbox with DDX_Control() instead of by creating a CListBox object... Anyone know how to do it with DDX_Control? Thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
View LBS_SORT descr in MSDN
|
|
|
|
|
A Windows list box with the LBS_STANDARD style will sort the list of items into alphabetical order before displaying them in the control.
To create a list box that will not sort, you must remove the LBS_SORT bit from the window style. The following style specification removes this bit:
(LBS_STANDARD | LBS_HASSTRINGS) & ~LBS_SORT
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
|
|
Try this where m_pList is the pointer to your list, m_curSel is the index of the currently selected item, curStr is a CString where you store the value of the currently selected item and iDirection is either 1 or -1 depending of if you want to move the originally selected item up or down (1 to go down).
CString curStr;
long curID;
// get current data
m_pList->GetText(m_curSel,curStr);
// then delete the string.
m_pList->DeleteString(m_curSel);
// adjust the current selection to the new spot
m_curSel = m_curSel + iDirection;
// then update the list, by inserting the string. and updating.
m_pList->InsertString(m_curSel, curStr);
m_pList->SetCurSel(m_curSel);
Chris
|
|
|
|
|
|
Using C++ .NET 2003.
I've got this problem:
I want to show MessageBox with some text in two forms.
So, i need to declare a variable (System::String*strMsgBoxText) for MessageBoxes somewhere outside these two forms.
If I declare strMsgBoxText in main file of the project just above int main(){} this doesn't help. Where must i declare a variable, which can be used in two forms?
-- modified at 14:40 Monday 26th December, 2005
|
|
|
|
|
also i donot know how to post message
|
|
|
|
|
In my application I have a scroll view that I would like to insert other views. It all works wonderfully until the number of "other view" requires that the horizontal limit of the scroll view is exceeded (32768). At that point all any addtional other views are not placed in the scroll view correctly.
I can resize the scroll view to a long int, but CWnd is limited to CRect which only handles int's.
If anyone has any information it would be great.
I'm using MM_TEXT as the map mode.
Chris
|
|
|
|
|
In your WM_HSCROLL handler, call GetScrollInfo instead of using the values passed directly to the handler. This lets you circumvent the 16-bit limitation in the WM_HSCROLL message.
ChrisLang wrote: CWnd is limited to CRect which only handles int's
CRect is based on RECT , which supports 32 bit position values.
Software Zen: delete this; // <a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" rel="nofollow">Fold With Us!</a>[<a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" target="_blank" rel="nofollow" title="New Window">^</a>]
|
|
|
|
|
Gary,
Thank you for your response.
The problems stems from actually creating the view. I call new CmyView and then call CREATE for the CmyView object which is subclassed from CWnd. In one of the overridden methods of CWnd::Create you can specify the x and y position of the view. Initially I just use, 0, 0 for x and y. Then after reading more information from the file (CmyView is reading the file to create the window from the values in the file) I call the essentially call CWnd::MoveWindow (CmyView does not override this method of CWnd). Although the compiler allows me to actually pass in a number larger than 32768, the new view is placed at a value less than 32768.
The scroll bar and displaying the correct portion of the scroll window is working fine. The problem is all CmyView objects which occur after 32768, are being drawn on top of each other.
I had a work around by adding all CMyView into another layer and then placing that layer in the CScrollView. Basically what I was doing was creating 2 CWnd objects call them CMiddleView objects and making the height of the intial CMiddleView object as near 32768 as possible (if adding another CmyView made the bottom of the initial CMiddleView over 32768 then I add it to the second CMiddleView object). Next I'd position top the second CMiddleView at bottom of the initial view. Like I said the scroll view worked wonderfully and I could scroll basically 2*32768.
But then the customer had MORE data, and now I need to postion CmyViews from 0 to somewhere up around 85000.
Again, I'm not getting a compiler errors, but the CWnd derived objects are not being positioned correctly if the MoveWindow method is called with anything over 32768.
Chris
|
|
|
|
|
Chris - You might try a different mapping mode. It could get your scaling down to positions in the 0-32767 range.
Unfortunately, I have a feeling you may need to re-architect how you're handling your views.
Sorry I couldn't be more help; good luck.
Software Zen: delete this; // <a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" rel="nofollow">Fold With Us!</a>[<a href="http://www.codeproject.com/script/profile/whos_who.asp?msg=1307432&id=10338#xx1307432xx" target="_blank" rel="nofollow" title="New Window">^</a>]
|
|
|
|
|
Gary,
I thought about using a different mapping mode intitially but because the other mapping modes are "smaller" the actual placement on the screen is "larger" (i.e. 1 pixel in MM_TEXT is at least the larger than 1 in any of the other 4 modes).
I'll continue to plug away at the problem and when I figure it out I'll post something because I'm certain that I'm not the first person that has had to deal with this.
Chris
|
|
|
|
|
The answer seems to be that with my current versions (I down load updates regularly so I don't think the problem has been address just yet) that a CWnd object CANNOT handle MoveWindow and a value larger than 32768 (in a rect or specified as just integers). The code compiles but the window is not moved or resized as specified in the MSDN documentation.
For me the solution was to create a new view of type CWnd (call it CHolderView) and place it in the CScrollView and then place the CmyView objects into the CHolderView. The key is to make the CHolderView initially large enough to hold all my CmyView objects. If you try to resize the CHolderView you can't make it bigger than 32768 after it is created.
I'm also going to post this solution as its own message so others might be able to see it without having to follow this thread.
Thanks again Gary for your attempts at solving this dilemma.
Chris
|
|
|
|
|
Hi,
i want to code a custom mp3player (already coded it) to run from my webpage.
How do i create a component with or (*favor) without mfc?
so users visiting my http:/test.htm will
- install -ocx (or whatsoever)
- hear a mp3 played from my (component.mp3)
how do i do this? i have no idea at all.
|
|
|
|
|
Hi,I want to ask how I can get the EOF using CFile and CArchive classes.
Please, help me. Thank you.
|
|
|
|
|
If you read the MSDN documentation for either class's read method you will find: the return value may be less than nCount if the end of file was reached
--
Pictures[^] from my Japan trip.
|
|
|
|
|
SeekToEnd
will make the file pointer at the end of file data
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
CFile::Seek( 0L, CFile::end ) same SeekToEnd
|
|
|
|
|
Hello,
I am trying to play video inside a panel.
The problem is that i can't get a window handle for the planel and here is the code that i am wriiting:
pWindow->put_Owner (this->panel1->Handle);
[Error C2664]: 'IVideoWindow::put_Owner' : cannot convert parameter 1 from 'System::IntPtr' to 'OAHWND'
How can i fix this problem. My end goal is just to play the file in the panel not in a pop up window!!
Thanks
|
|
|
|