|
Hi,
I need to create a modeless dialog with minimise and maximize button in win32 application .( so what have to set in sytle attribute in the dialog template ....
Manjunath S
|
|
|
|
|
|
Dears Sir,
Every time when I change Pc or when Réinstall pc i have a difficult with my program source.
Before changing pc I have copied all the directory of my program, after changing I reload it on my pc, but when I compile I have news messages that i don't have before. What to do ? These are messages:
--------------------Configuration: STOCK - Win32 Debug--------------------
Compiling...
Property.cpp
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\new(36) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program files\microsoft visual studio\vc98\include\new(37) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(37) : error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,const struct std::nothrow_t &)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl op
erator new(void))(unsigned int)'
c:\program files\microsoft visual studio\vc98\include\new(35) : see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\new(41) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program files\microsoft visual studio\vc98\include\new(42) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(42) : error C2556: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,void *)' : overloaded function differs only by return type from 'void *(__cdecl *__cdecl operator new(void))(unsig
ned int)'
c:\program files\microsoft visual studio\vc98\include\new(35) : see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\new(42) : error C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\new(42) : error C2065: '_P' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\memory(16) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program files\microsoft visual studio\vc98\include\memory(17) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\memory(17) : error C2784: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,class std::allocator<`template-parameter257'> &)' : could not deduce template argument for 'void *(__cdecl *)(u
nsigned int,class std::allocator<_Ty> &)' from 'void *(__cdecl *)(unsigned int)'
c:\program files\microsoft visual studio\vc98\include\memory(17) : error C2785: 'void *(__cdecl *__cdecl operator new(void))(unsigned int,class std::allocator<`template-parameter257'> &)' and 'void *(__cdecl *__cdecl operator new(void))(unsigned int
)' have different return types
c:\program files\microsoft visual studio\vc98\include\memory(16) : see declaration of 'new'
c:\program files\microsoft visual studio\vc98\include\memory(17) : error C2809: 'operator new' has no formal parameters
c:\program files\microsoft visual studio\vc98\include\memory(20) : error C2954: template definitions cannot nest
C:\progms\STOCK\Property.cpp(1219) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
Error executing cl.exe.
STOCK.exe - 17 error(s), 1 warning(s)
I learn my self
|
|
|
|
|
My guess is you copied some code from a MFC project to a non-MFC project, and the MFC code redefines new to DEBUG_NEW to get some MFC memory-tracking features. Remove the redefinition.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
|
please explain your problem more clearly.
we don't call a function from a file ("call funcation named start_Login() which is is source file "Call_Main.cc" from the "Form1.h"") but from a function (main() or any else...).
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Hi..
I want to call function named start_Login() which is is source file
"Call_Main.cc" from the "Form1.h" on button click event.
Simple is that i want to call a function which is in source file "call_Main.cc"
not in class. from the clicked event of a button.
Rahul Kulkarni
|
|
|
|
|
i suppose the function definition is in .cc file, but the declaration of the function should be in a header file (.h file).
then, include your header everywhere the functions declared inside are needed.
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
Have u added header file of Call_Main.cc in "Form1.h"
never say die
|
|
|
|
|
Can you be more specific whats Form1.h(whats type,class) also you need to inclide file form1
whitesky
|
|
|
|
|
Hi..
actually what the thing is i have a project in console application working properly.
Now i want to make it windows application. I have copied all the file of the console
application to new Window application. now main is in call_main.cc file. I want to call the main
and replace the console.writeline() by messagebox::show. Can i do this.
Else give me suggetion to make console application to windows application simply.
Thanks in Advanced
Rahul Kulkarni
|
|
|
|
|
|
how to move bitmap using mouse cursor. when the bitmap is larger than a dialog box i create a scrollbars.but i now we should move the bitmap by using mouse cursor when we click the mouse and move bitmap also should move.when we release it should stay at waht position we release.
thank u in advance.
sree
|
|
|
|
|
A possible scenario. First you need to process the WM_LBUTTONDOWN notification message, sent to your butmap’s window. Within the handler, store a true value in a boolean variable, and save the position of the cursor and the scroll position (GetScrollPos ). In addition, take the possession of the mouse using SetCapture function.
Then, in WM_MOUSEMOVE handler, if the boolean variable is true , scroll the bitmap window according to the current cursor position and stored values.
In WM_LBUTTONUP handler, set the boolean flag to false , and release the mouse possession using ::ReleaseCapture . The same actions must be done in WM_CAPTURECHANGED handler.
In addition, you can handle the WM_SETCURSOR message in order to change the mouse cursor shape while the bitmap is scrolled.
|
|
|
|
|
thank u.
do u ahve any sample code.
|
|
|
|
|
|
i didnot get what code should written in the function MouseMove().
shall u give that coding
thank u.
sree.
|
|
|
|
|
Is there a difference naming a static member variable of a class private??
how is a static public member variable different from a static public member variable??
|
|
|
|
|
|
I could guess your question. Static and private has totally different meanings. when you declare a variable private but not static, it means that it can be used within the same class. It cannot be accessed by other members(may be another class). and more importantly, every time an Object is instantiated, a new instance of the variable is created. But when you declare a varible private and also static. It's all the same but the last point, which when new objects are created, it's not instantiated anew, rather all objects share the variable. and when you want to access it, you cannot use the . or the -> operator, you should use the :: operator with the class name preceeding it. now you get it? note, you cannot put "static" in the private,protected,public list. it can coexist with all the three
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
I think i havent asked the question clearly
what i actually ment to ask is :
if a member is declared private then it implies, it cannot be accessed by any objects directly.
But in the case of static member varaibles, they can be accessed by using 'class name' followed by '::' operator.
So wouldnt a private menber varaible declared static loose its significance as private if it can be accessed by by the :: operator????
|
|
|
|
|
If it is private , it means it. No matter it is static or not. You cannot access even with a :: operator.
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
thank u!
|
|
|
|
|
don't confuse !!!
static don't alter the visibility accessors (public , protected , private ).
it only tells the compiler that the member declared as static will exist once and will be shared between all the instances of the class...
do you get the difference then ?
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
I think i havent asked the question clearly
what i actually ment to ask is :
if a member is declared private then it implies, it cannot be accessed by any objects directly.
But in the case of static member varaibles, they can be accessed by using 'class name' followed by '::' operator.
So wouldnt a private menber varaible declared static loose its significance as private if it can be accessed by by the :: operator????
|
|
|
|