|
((CYourDialogClass*)GetParent())->GetDlgItem(IDC_TEXT1)->SetWindowText("NEW NAME");
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thanks
I have already tried that, but Child dialog box file not getting patent Text ID
Is it possible to use Notification message from child to parent to change the parent Text property caption.
If it is possible, Please let me know.
|
|
|
|
|
Is the child dialog a model dialog or modeless dialog ?
If its a modeless, did you pass the the parent window to the modeless dialog ?
-Prakash
|
|
|
|
|
It is Modal dialog box.
ya, I have passed the parent window to the modeless dialog
Thanks
-Ramesh
|
|
|
|
|
I want to read value of address 0000:0408 to check port LPT1. But there is error when I run this program.
How to read value of that address ?
|
|
|
|
|
Since noone else answers, I feel I have to.
The answer is very simple: You don't!
That's because all NT-versions of Windows (including i.e. Win2k, XP) doesn't allow processes (like programs) to access hardware directly.
In the old DOS-based Windows-versions (up to Me), it was all right.
There is a utlitity (available in several versions) called inpout32. Maybe you could use one of them? Search with Google for inpout32.
Kakan
|
|
|
|
|
kakan wrote: There is a utlitity (available in several versions) called inpout32. Maybe you could use one of them? Search with Google for inpout32.
I think they worked with win16 only and does not work with WinNT onwards.
-Prakash
|
|
|
|
|
|
even if you are able to access the memory address, probably you wont get what you are looking for.
What is that you want to do with LPT1, check CreateFile(...) windows api. You can create a handle to that port and do what you want to do with it.
-Prakash
|
|
|
|
|
Whats the major difference between CToolbar and CDialogBar ? .. Any fast help ???
|
|
|
|
|
Dialog bar can have controls that can otherwise only be placed on a Dialog box.
But toolbar can have buttons only. Ofcourse you can have combos and others too. But it's tedious.
Dialog bar is real cool.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Hi,
Does anyone know any c++ database layer generator from a ODBC source?
Best regards,
Jose.
|
|
|
|
|
maybe not exactly what you need, but there is one here[^] on CodeProject.
there are also these:
http://dtemplatelib.sourceforge.net/index.htm
http://otl.sourceforge.net/otl3.htm
http://www.codeproject.com/database/TemplateDB.asp
http://www.infobjects.com/pages/index.php?rubriqueid=2&srubriqueid=36&numpage=0&langue=2
(as far as i understood, it can use ODBC sources, but i am not completely sure)
|
|
|
|
|
Hi,
Thank you very much, but I'm looking for a database CRecordset derived classes code generator (like MSVC does) which includes bulk operations (SELECT and INSERT).
Kind regards,
Jose.
|
|
|
|
|
Hi All,
How to determine the change of icon of cursor at runtime and get that icon ?
Thanks,
|
|
|
|
|
WM_SETCURSOR
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
kendao wrote: How to determine the change of icon of cursor at runtime and get that icon ?
look for WM_SETCURSOR message and GetCursorInfo Function, also GetSystemMetrics
"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
|
|
|
|
|
void fun(CArray<CString,CString>)
{
}
void fun(CArray<CString,CString>& )
{
}
why dose the argument in the first function produce a error(like this: error C2664: 'fun' : cannot convert parameter 1 from 'class CArray<enum myenum,enum myenum>' to 'class CArray<enum myenum,enum myenum>'No copy constructor available for class 'CArray<enum myenum,enum myenum>')
while the second funtion is right?
Thank you very much!!!
|
|
|
|
|
See the constructor CString in MSDN
never say die
-- modified at 4:52 Monday 2nd January, 2006
|
|
|
|
|
I've got you these from MSDN i think you will understand why? let me know in case not
SYMPTOMS
When a user-defined class contains a CArray and the same user-defined class is nested in another class, you may get the following errors if no copy constructor and assignment operator are provided for the class:
main.cpp(52): error C2664: 'Add' : cannot convert parameter 1 from 'class B' to 'class B' No copy constructor available for class 'B'
After adding a copy constructor, you get the following error message:
afxtempl.h(443): error C2582:'B' : 'operator =' function is unavailable afxtempl.h(1566):while compiling class-template member function 'void __thiscall CArray<class b,class="" b="">::SetAtGrow(int,class B)'
CAUSE
If the class that contains a CArray is nested in another class, then its objects must be copied.
The compiler does not construct an implicit copy constructor and copy assignment operator because the class in question has CArray as a member, which does not have a copy constructor and copy assignment operator, and CArray inherits from CObject, which has a protected copy construtor and a copy assignment operator. The compiler tries to generate the implicit ones, but that generates a call to CObject's version of them. Because they are protected, the above errors are generated.
RESOLUTION
You need to provide a copy constructor and an assignment operator for the class.
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
This problem was corrected in Microsoft Visual C++ .NET.
MORE INFORMATION
The following example shows the correct use of the CArray class:
// No compiler option needed.
#include <afxtempl.h>
struct A
{
int i;
int j;
};
class B
{
public:
B();
~B();
// Need to define copy ctor and assignment operator.
B(const B& b){
// Your copy ctor body goes here.
}
/* const B& */ void operator= (const B& b) {
// Your assignment operator body goes here.
}
protected:
CArray<a, a=""> arrayA;
};
B::B(){}
B::~B(){}
class C
{
public:
C();
~C();
void addElement();
protected:
CArray<b, b=""> arrayB;
};
C::C(){}
C::~C(){}
void C::addElement()
{
B temp;
arrayB.Add(temp);
}
void main()
{
}
I've been programming since year 1999, graduated from Univeristy Paris 2 France, fluent in C,C++,VC++,Web programming (XML,HTML,php etc..),.NET frameworks,C# and ASP.NET,SQL server, Mastering VC++ .NET and SQL server,data structure and database design
|
|
|
|
|
I got it,thank you very much.
I am a beginner of programming, I found that a lot of people like you can always find answers to questions quickly and correctly from on the Internet especially microsoft's web site.
could you please tell me how you do that ? is there relatively any way to follow? or is any books or articles teaching these things you can recommend to me?
Thank you again!!
-------------------
I am learning C++ and English
|
|
|
|
|
Dear, you can visit microsft.msdn.com, that is full of help, or simply use MSDN help that comes with Visual studio 6.0 ,2003 or 2005, just search for the error number and the whole help will be yours serving your needs, I was using C++ for 7 years, trust me go for C# and never for J#.
C# is easier, has the same libraries and more rich GUI wise.
I've been programming since year 1999, graduated from Univeristy Paris 2 France, fluent in C,C++,VC++,Web programming (XML,HTML,php etc..),.NET frameworks,C# and ASP.NET,SQL server, Mastering VC++ .NET and SQL server,data structure and database design
|
|
|
|
|
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|
|
The first one you are passing by value. So a copy constructor is required.
The second one you are passing by reference so no copy constructor is required. Only the reference is passed.
Jesus Loves You and Me <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Thank you very much!!!
-------------------
I am learning C++ and English
|
|
|
|