|
I've only used VC++.NET once so i'm not sure if this is the right way to fix it, but when I got the same error... adding msvcrt.lib to the project settings solved the problem.
|
|
|
|
|
i have a progress bar in the modal dialog.
i want show status progress copying file concurrent with copying whit thisdialog.
please help me.
whit special thanks.
|
|
|
|
|
The basic idea is to move copying to another thread. If you don't want to do it, you can still display progress by regulary processing paint messages. Check sources section of this site (CP, I mean), there are plenty of ready-to use progress dialogs, you will get the idea.
Igor Green
http://www.grigsoft.com/
Compare It! + Synchronize It! - files and folders comparison never was easier!
|
|
|
|
|
If you'd rather not use a separate thread, this[^] article may help.
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
The following OnPaint code works very well with single buffering. With it I can zoom in and out, and pan the view. The drawing code doesn't have to be aware of the zoom factor or any other coordinate. But how do I turn this into double buffering ? what mapping mode whould I use on the memory dc ?
CPaintDC outputdc( this );
// Client rect (size of window on screen)
CRect clientRect;
GetClientRect( &clientRect );
// Virtual rect (page coordinates)
CRect virtualRect;
virtualRect.left = m_CenterPos.x - (clientRect.Width()*m_fZoomFactor)/2;
virtualRect.right = m_CenterPos.x + (clientRect.Width()*m_fZoomFactor)/2;
virtualRect.top = m_CenterPos.y - (clientRect.Height()*m_fZoomFactor)/2;
virtualRect.bottom = m_CenterPos.y + (clientRect.Height()*m_fZoomFactor)/2;
// Sets the mapping mode for the specified center position and zoom factor
SetMapMode(outputdc, MM_ISOTROPIC);
SetWindowExtEx(outputdc, virtualRect.Width(), virtualRect.Height(), NULL);
SetViewportExtEx(outputdc, clientRect.Width(), clientRect.Height(), NULL);
SetWindowOrgEx(outputdc, virtualRect.left, virtualRect.top, NULL);
// Draw
EraseBackground( &outputdc, virtualRect );
m_GraphData.DrawData(&outputdc);
|
|
|
|
|
You should create a memory DC compatible with your output DC,
draw whatever you need in the memory DC, then blit iits content on the output DC.
SkyWalker
|
|
|
|
|
Try applying the exact same transformations and drawing to the memory DC only. When done, call bitblt like this:
outputdc.BitBlt(0, 0, clientRect.Width(), clientRect.Height(), &memdc, 0, 0, SRCCOPY);
|
|
|
|
|
Hello,
I got code from a book to create/store preferences. The user's variables are stored in the CMainFrame class. How can I retrieve this data from another class, such a dialog box that uses user's preferences??
Please advise!!!
thanks in advance.
Roberto.
|
|
|
|
|
<br />
#include "mainfrm.h"<br />
<br />
...<br />
<br />
CMainFrame* pMain = (CMainFrame*)AfxGetMainWnd();<br />
ASSERT_VALID(pMain);<br />
int nVariable = pMain->GetMyIntVariable();<br />
<br />
"When you know you're going to eat crow, it's best to eat it while it's still warm." - Reader's Digest
|
|
|
|
|
Jack,
THANK YOU!!!!! It worked fine
Roberto.
|
|
|
|
|
hi,everyone
i have some .dbf files, and i want to unite them to a single .dbf file.
how?
|
|
|
|
|
You can use ODBC\OLEDB providers to work with files on database level. Alternatively just parse dbf files manually - the structure is quite simple, so if structure is identical (!) it is no problems to join files.
|
|
|
|
|
Is there any essential diffrence? Which is more effecient?
|
|
|
|
|
No offence
Seeing all your questions around, I think you
should start by reading some ... books.... first. Mmmhh?
Again, I didn't want to be unfriendly
SkyWalker
-- modified at 12:13 Sunday 25th September, 2005
|
|
|
|
|
If you use GetDC you should then remember to call ReleaseDC when you are done with it. CClientDC encapsulates just that: it calls GetDC in the constructor and ReleaseDC in the destructor, so that you don't forget the release. You can trust the compiler optimizations to make using CClientDC as efficient as directly using GetDC
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hi, does anyone know how to make your c++ application minized on startup?
|
|
|
|
|
ShowWindow(SW_MINIMIZE)
Good music: In my rosary[^]
-- modified at 18:28 Saturday 24th September, 2005
|
|
|
|
|
Hi all,
I need to print html data from memory from a console application. Additionally, there should be ability to do that using different printers (not only default). There are many commercial components that can do that, but have anyone seen some thing free?
The most popular decision for such problem is to change default printer using regisry, save HTML to a temporary file and than print it using shell, but I would like to use something else
Thanks
|
|
|
|
|
For example, I use ScrollWindow to scroll the client area down with one line, all is ok except one problem, the old postion of the 1st line is still there, how can I make it blank?
Does ScrollWindow use some tech like bitblt, then invalidate the rect which is (lpRect of CScrollWindow)- (the scrolled rect)
|
|
|
|
|
I am not getting your problem are u using
the class CScrollView ?
what was ur problem exactly ?
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
I derived from CWnd, and want to make it scrollable, and find ScrollWindow is not enough.
|
|
|
|
|
If u r using the CWnd class then u
need to do lots of coding (as far asi know )
I have used the CScrollView in MDI
applications only , this class handles
all the scrolling code overhead
[thats benifit of inheritance]Use this class
to derive your view class .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
According to the MSDN documentation for ScrollWindow you have to call UpdateWindow immediately after calling ScrollWindow .
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I want to create a new view that is able to scroll
in my MDI application whose base view class is CView.
I tired to create a new class from the Scroll view
and by using the create function i created the view
on a DialogBox .
After making some changes everthing is fine .
but when i click the scroll bars then i get error,on debugging
the viewcore.cpp is opend and in
int CView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{.....}
probable the problem is due to the New view is a child to main ?
How do i avoid that ? or is there any other solution
for this.
Thanks
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote:
i created the view
on a DialogBox .
That might be you problem right there. Views (any window derived from CView ) is meant to be used in a CFrameWnd window.
vikas amin wrote:
when i click the scroll bars then i get error,on debugging
the viewcore.cpp is opend and in
int CView::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{.....}
What error? What line? What does the debug output window tell you? What are the values of the various variables on the line that gave you the error?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|