|
fantasy1215 wrote: ATM XSF
XFS... Not here
fantasy1215 wrote: Wanna know a place to discuss or learn.
see here[^]
This is a VC++/MFC forum dude...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi!
The following code shows error.
protected:
virtual int_type uflow()
{
int_type v = base_type::uflow();
count_ += egptr() - gptr();
int p = count_ * 40 / size_;
if (p > prev_perc_)
{
std::cout << "*";
prev_perc_ = p;
}
return v;
}
The errors are:
error C2146: syntax error : missing ';' before identifier 'uflow'
error C2433: 'TestGUIApp::int_type' : 'virtual' not permitted on data declarations
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
warning C4183: 'uflow': missing return type; assumed to be a member function returning 'int'
error C2065: 'int_type' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'v'
error C2065: 'v' : undeclared identifier
error C2653: 'base_type' : is not a class or namespace name
error C3861: 'egptr': identifier not found
error C3861: 'gptr': identifier not found
How do I resolve these errors?
|
|
|
|
|
isn't this code comeing from the STL ?
what are you trying to do ?
if the STL is not compiling, it more likely because YOU made an error in YOUR code, and the error is propagating...
didn't you forget a header to include ?
|
|
|
|
|
include header file where the int_type is defined.
-@SuDhIrKuMaR@-
|
|
|
|
|
are you trying to migrate the project from Older VS to New ?
I strongly think you are missing some thing in the " Include Files "
section of the Options-> vc++ directories
check if the path (header) are included in the include path.
Vikas Amin
UNITED STATES STEEL CORPORATION
My First Article on CP" Virtual Serial Port "[^]
modified on Thursday, July 24, 2008 5:33 PM
|
|
|
|
|
I think you need to substitute "int" for "int_type".
|
|
|
|
|
I have a bitmap of height 242 and width 242
I need to place this bitmap in Rectangle having an area of height 50 and width 50.
But before placing in the rectangle I need to draw a circle on the bitmap dynamically. and want to know the region so that i can fill color on it.
|
|
|
|
|
The only way to do it in MFC that I can think of would involve:
CDC::CreateCompatibleDC to get a CDC to an in-memory display surface, and CBitmap::CreateCompatibleBitmap () to create a bitmap.
Then use CDC::Ellipse to draw a circle.
This is just a suggestion; I don't have time to test it.
|
|
|
|
|
Using MFC?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi all,
I would like to know whether a function exists that can do the same as sprintf but will not stop when it finds a null terminated character, and result is a binary copy of the data.
I want to use SQLExecDirect(hstmt, "set ansi_nulls off", SQL_NTS) to turn off the ansi nulls attribute for db when i am inserting data that contain null strings. How do i accomplish this task?
Many thanks in advance
regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
modified on Monday, August 4, 2008 7:38 AM
|
|
|
|
|
Programm3r wrote: that can do the same as sprintf but will not stop when it finds a null terminated character, and result is a binary copy of the data.
memcpy , and if possible use the safe version memcpy_s .
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
I think I would use the std::string and std::stringstream classes for that. As far as I remember, std::string can contain null characters. So, if you need to also format values in your string, you can use a stringstream for that (you can check this article[^] if you want to see how to format things into your stringsream).
|
|
|
|
|
The reason I'm asking is because of the following:
I have a file with an sql statement in it. The sql contains null terminated characters because of a minutia buffer that is part of the data. So I read the file to get the complete sql statement. Now the problem is that I cannot execute the statement because of the null terminated characters in the sql statement.
Any solution for the problem ?
Many thanks again
Kind regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Just a thought...
Is it possible to run a SQL file. If so how can one be able to do so?
Many thanks again...
Regards,
The only programmers that are better that C programmers are those who code in 1's and 0's
Programm3r
My Blog: ^_^
|
|
|
|
|
Hello,
is it possible to make a CTreeCtrl with virtual list because i have a many data to list in them?
And now is my problem that the standard CTreeCtrl takes a to long time to list all items??
Does any one have an sample for me??
Thanks for any help and informations!
termal
|
|
|
|
|
AFAIK, there is no such option. A method by which you can improve your insertion speed is using the SetRedarw() function.
m_TreeCtrl.SetRedraw( FALSE );
m_TreeCtrl.SetRedraw( TRUE );
|
|
|
|
|
Hello,
thanks for info, i try it now!!
regards
termal
|
|
|
|
|
Hi All,
I am creating an application in which I created a front page in Dialog based application. There in the front page I placed some buttons of different applications.
When I chick any button which is inside the front page the partitcular application starts running.
I set that application window on top using SetWindowPos() function.
now the problem is While running any application from the front page, the front page doesnt get disabled. I can close, minimize or maximize the front page.
That is what I dont want. I want that whenever any application runs from my front page the front page get COMPLETELY disabled.
please help....
Thanks.
|
|
|
|
|
use api EnableWindow(FALSE)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
You can use WaitForSingleObject API to wait the new process to terminate. You can use the process handle from the PROCESS_INFORMATION structure populated by the CreateProcess API.
|
|
|
|
|
Thanks It worked.
But as soon as I close this new process which I am creating from "CreateProcess()" my main page is also gets closed.
It terminates both the processes.
How to avoid this, any ideas?
modified on Tuesday, August 5, 2008 3:27 AM
|
|
|
|
|
Could you please provide the code block ?
|
|
|
|
|
|
i want to change background color of Message box
is that possible
if possible then how
MessageBox("alert Message");
it shows message box but will gray (default) background i want to change background
|
|
|
|
|
Hi Ani,
Since MessageBox is a Win32 API, I do not think you can change its background color. If you change it, it will affect that particular window class and will be reflected in all the programs running in that machine. You would have to create your own implementation of MessageBox by using a dialog template where you can change the background color of the dialog you used.
|
|
|
|