|
Babelfish translated you compile message as: Unexpected file end during the search for the directive for the before-compiled header file.
Not bad )
It means that the file being compiled does not include 'stdafx.h' which is the pre-compiled header needed. You can either #include 'stdafx.h' at the top of the file, or change you compiling options for this file so that it does not use pre-compiled header.
Hope this helps,
Louis.
|
|
|
|
|
My app (if you play Freelancer, you've probably used it) has a function that takes up to 60 seconds to complete, and updates the current status using a CProgressCtrl. The problem is, sometimes after a little while (usually around half way) the progress control stops updating (even though I'm calling ProgressCtrl.RedrawWindow() every time), thus making the user think my app has stopped responding. Is there any way to get around that problem, without having to go through all the work and trouble of making a separate worker thread?
|
|
|
|
|
Yes, don't send as many messages to the control. I once had an app that read in a big database (like 50K records) and sent a msg after every record. It did exactly what you describe. Once I changed it to send a message every few hundred records, it worked perfectly.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Actual sign at the laundromat I go to: "No tinting or dying."
|
|
|
|
|
Thanks, that worked perfectly!
|
|
|
|
|
Hi! I have a list control that I only show when it has the focus. I have done this by having a button that displays the list, and then catch KillFocus on the list to hide it.
If I click on the button again (more of a switch) I want to hide the control. The problem is that the KillFocus event is handled first, so the button thinks the window is hidden so displays it again.
How can I tell which control is getting the focus when I am in my KillFocus event?
Cheers in advance,
Dom
|
|
|
|
|
blindcop wrote:
How can I tell which control is getting the focus when I am in my KillFocus event?
GetFocus() .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
how can i program a software application for a usb - printer.
i mean how can i connect to the printer?
please can you send me an answer to my e-mail adress (daniel.mitmasser@sz-ybbs.ac.at)
thank you very much.
Daniel
|
|
|
|
|
I've created an application with a splitter window and
two views. I want both views to have a height of 480 and
widths of 640 and 150 respectively
in the OnSize function of the main frame I have:
void CMainFrame::OnSize(UINT nType, int cx, int cy)
{
CFrameWnd::OnSize(nType, cx, cy);
// Don't adjust the splitters if the application
// is minimized or the splitters have not been
// initialized.
if (m_initSplitters && nType != SIZE_MINIMIZED)
{
// Adjust the row/column info to compensate for
// the new size
m_splitter.SetRowInfo( 0, m_mainViewHeight, 0 );
m_splitter.SetColumnInfo(0, m_mainViewWidth, 0 );
m_splitter.SetColumnInfo(1, m_tileViewWidth, 0 );
// Apply our changes to the splitter
m_splitter.RecalcLayout();
}
}
in the PreCreate function of the main frame I have:
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
CRect rect(0, 0, 640 + 150, 480);
AdjustWindowRectEx(&rect, cs.style, true, cs.dwExStyle);
cs.cx = rect.right - rect.left;
cs.cy = rect.bottom - rect.top;
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
return TRUE;
}
The height of the splitter is 480. (Used CSplitterWnd::GetClientRect())
However, the heights of the views is 476.
The splitter width is 790.
But the widths of the views are 640(correct) and 139 respectively.
How can I correct the sizes of the view windows?
|
|
|
|
|
|
Then please enlighten anyone witrh the same problem as you. How did you solve it? What was wrong?
"Never mind. I just solved it." will never get you as far as a response the next time you ask a question.
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
O.K., here's what I did:
I derived a class from CSplitterWnd so I could access the protected members relating to it's border size and the size of the splitter itself. Then in the precreatewindow() of my main frame I used this info to calculate the correct size of my main frame. I also added in the scrollbars sizes.
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// Set the size and style of the window
cs.style &= ~WS_MAXIMIZEBOX;
// cs.style &= ~WS_MINIMIZEBOX;
cs.style &= ~WS_THICKFRAME;
cs.style &= ~FWS_ADDTOTITLE;
int totalWidth = m_mapViewWidth +
m_tileViewWidth +
m_splitter.GetSplitterSize().cx +
(m_splitter.GetBorderSize().cx * 2) + (SCROLLBAR_WIDTH*2);
int totalHeight = m_mapViewHeight +
(m_splitter.GetBorderSize().cx * 2) + SCROLLBAR_HEIGHT;
CRect rect(0, 0, totalWidth, totalHeight);
AdjustWindowRectEx(&rect, cs.style, true, cs.dwExStyle);
cs.cx = rect.right - rect.left;
cs.cy = rect.bottom - rect.top;
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
return TRUE;
}
|
|
|
|
|
Great!
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
I Want to Write Program That Return All The Relations
Between The Tables In The Database And The Type of The Relation (one to Many.....etc) specifically to
Access ,SQl Server Oracle
Thanks n Advance
-- modified at 20:17 Monday 29th August, 2005
|
|
|
|
|
Hi, I am 18 yrs old and am just a beginner. I use Microsoft Visual C++. So can anyone paste the required code for changing the text and background color in a console application? And how can I create registration entries? Thanx
Check out my site: www.geocities.com/aseshshrestha
Asesh shrestha
|
|
|
|
|
|
why i get an assertion when i am trying to add to outlook a msoControlSplitButtonPopup (same as the button 'New' on the tool-bar) i try to add it using both VBA script and via COM-Addin as well....both time i fail...
can any1 help? or show me code on how to do that??
thanks
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
HI,
I wrote a following code to retrive RGBX bits from a bitmap, but does anyone know how to retive RGBTRIPLE bits using GETDIBits?
THanks
BITMAPINFO bi;
int height = Get_Bitmap_Info(bi);
if (!height)
return FALSE;
BYTE* p_bits = (BYTE*)new BYTE[bi.bmiHeader.biSizeImage];
HDC hdc = GetDC(NULL);
if (!GetDIBits(hdc, (HBITMAP)GetSafeHandle(), 0, height, p_bits, &bi, DIB_RGB_COLORS))
{
delete p_bits;
p_bits = NULL;
}
::ReleaseDC(NULL, hdc);
return (RGBX*)p_bits;
|
|
|
|
|
Dear All,
I am developing an application using MFC VC++ Version 6.0 for Windows 2000 OS in which I am running an inf file using ShellExecute api to install my driver.
Following is the small piece of code used to install the driver:
////////////////////////////////////////////////
void InstallSys()
{
char EZinf[1048];
strcpy(EZinf,"c:\\mydriver.inf"); //path of my driver
char EZlpParameters[uSize]= "setupapi,InstallHinfSection DefaultInstall 132 ";
strcat(EZlpParameters,EZinf);
ShellExecute(NULL, "open", "rundll32.exe",EZlpParameters, NULL, SW_HIDE);
}
////////////////////////////////////////////////
The code is working fine and installing the driver.
When I run the application, the application ,it calls Installsys() to install the driver and this displays a progress bar window titled "copying file" window and installs the driver.
I donot want this popup window to be displayed during my installation due to some reason. I have used SW_HIDE option in ShellExecute function but still the popup window is still being displayed.
Do I need to make some changes in the inf file?? Or I need to use the Inf SetUp File APIs (ie. SetupInstallFile or InstallHinfSection API) Please suggest some way to hide the dialog box and at same time installing the driver.
The installation part of mydirverinf is as:
/////////////////////////////////
;;
;; Default install sections
;;
[DefaultInstall]
OptionDesc = %FileSpyServiceDesc%
CopyFiles = FileSpy.DriverFiles, FileSpy.UserFiles
[SourceDisksNames]
1 = %Disk1%
[SourceDisksFiles]
filespy.exe = 1
EZOn.sys = 1
[DefaultInstall.Services]
AddService = %FileSpyServiceName%,,FileSpy.Service
////////////////////////////////
Please do let me know if you need further information in this regard.
Thanks a lot!
Regards,
Rohit Dhamija
|
|
|
|
|
Hello all,
i am sarching for old c++ compliers like torbu c++ 3 or 4.5 and also i am searching for similar one for linux can any body help me?
Thanks
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
try this link
Click Me[^]
and this link for borland turbo c
Click for borland[^]
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Thanks but do you know any others for windows
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
|
Thanks
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
I'am working on MFC,MDI App with Document/View Support
How cam I print on Paper Form with Dimmension 210x110mm
if in Print Setup Dialog for printer EPSON LX-400 I have only
next dimmensions:A4,A5,B5,Fanfold 8.5x12 in,Legal,Letter.
Printer is Tractor Feed
|
|
|
|
|
Is there any sample that demonstrates MDI application, without doc/view arch, with form view.
Thank you.
|
|
|
|