|
one more thing, that for loop is inside my OnInitDialog function.
|
|
|
|
|
One thing that might cause problems is that you are defining a single CButton object - and then trying to call it's Create() member over and over again.
You might want to create an array of buttons as a member variable for that dialog box (if you know the maximum number you might possibly have - say 117 if you were doing chemical elements) and then make visible the ones you need visible and use MoveWindow() to position them.
|
|
|
|
|
Once the for loop goes out of scope, the CButton object ceases to exist. Try this:
CButton *pButton;
for (...)
{
pButton = new CButton;
pButton->Create(...);
}
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
hi all,
i want to do some action when user selects some text in my text box which is an AutoRichEditCtrl. i dont want any button clicks after selection to perform that action. Instead on selecting the text,automatically the corresponding action has to take place.how do i do that???
can anyone please help me.......
Thanks!
ramya.
|
|
|
|
|
I would think you'd want to respond to the WM_LBUTTONUP message.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
If a AutoRichEditCtrl is derived from CRichEditCtrl , you can handle the EN_SELCHANGE notification:
MSDN says:An application can detect when the current selection changes by processing the EN_SELCHANGE notification message. The notification message specifies a SELCHANGE structure containing information about the new selection.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
I doubt this would work as the text is not being changed. It is being selected.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Maybe you are confusing EN_CHANGE and EN_SELCHANGE?
MSDN is very clear about EN_SELCHANGE:
The EN_SELCHANGE message notifies a rich edit control's parent window that the current selection has changed. A rich edit control sends this notification message in the form of a WM_NOTIFY message.
I think he could very well use this notification.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
Fair enough. Indeed I confused the two. Good catch.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
hi,
Thanks a lot!! This works the way i want to.
ramya.
|
|
|
|
|
Does anyone know if there's a plug-in of sorts that will do smart disk mirroring....
In the process of doing client/server programming, I do a lot of multi-machine debuggin... I am looking for a good way to replicate files across a few machines....
The worst part of this process, is moving files between machines.
or is there another suggestion for doing this kinda stuff?
Can you setup the IDE (C++) debugger to allow everything on a shared drive? My experience is that this doesn't really work...
Help?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
Hi,
I wants to create RitchEdit control in my form view dynamically and wants to set font and alignment according to user choice. Here I have a problem. CFontDialog return CHOOSEFONT structure while font setting is done in RitchEdit control using CHARFORMAT structure. Is there any translation mechanism between two structures or I have to do it manually. If there is any better mechanism, Please let me know.
Thanks
I am looking to design a application which will help to design a form run time. Any suggestion are welcomed. Is there is open source code on any side?
|
|
|
|
|
hi,
there is something called AutoRichEditCtrl a derivative of RichEditCtrl. with this u can easily set font. for this u need to include a .cpp and a .h file.
the source code and demo is available in this site itself.
try to get it. it might b useful for u.
ramya.
|
|
|
|
|
Thanks Ramya, I searched on MSDN and could not find any AutoRichEditCtrl refrence. Can U help me to locate this.
I am looking to design a application which will help to design a form run time. Any suggestion are welcomed. Is there is open source code on any side?
|
|
|
|
|
Thanks Ramya, I searched on MSDN and could not find any AutoRichEditCtrl refrence. Can U help me to locate this.
AutoRichEditCtrl
|
|
|
|
|
plz check out this link
http://www.codeproject.com/richedit/autoricheditctrl.asp
this has a demo and also gives instructions on how to use this control.
ramya.
|
|
|
|
|
How to load C# form in MFC project?
|
|
|
|
|
hello ppl
well need some start on socket programming i wrote the following code in Visual C++ 6.0
CSocket mysocket;
mysocket.Create();
now the problem is here the Create function returns FALSE i tried to find the last error by using the function getLastError and the error no is 109 and i cant get a description of what it means i have used the second version of Create function as well
i tried a loop on all the 65535 ports
mysocket.Create(i,SOCK_STREAM,"172.16.64.97")
but that didnt work either
please help me out i have even tried the CAsyncSocket class but that also fails to create a socket please help me out
|
|
|
|
|
Go through MFC Sample CHATSRVR code.
The chosen One
|
|
|
|
|
Hi all
Once again I am writing to all.
how I make my own Agent Character storage(.acs file) in VC++. can u tell me the format of (.acs file).
Thanks
|
|
|
|
|
see this URL:
http://msdn.microsoft.com/library/en-us/msagent/chareditor_4px0.asp
and the associated links!!!
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Thanks. It is really helpful.
|
|
|
|
|
Are there any differences between pointers in C and C++?
Are they any new additions to the C++ pointers?
Thanks.
|
|
|
|
|
nope. a pointer is a pointer in any language, btw
nothing more than an int telling you where to find something in memory
please let me know if I helped you or not
|
|
|
|
|
Thanks, your help is definitely a welcome. However, I do
have a related question: What is the difference between
reference and pointer? Do pointers need references? For
example:
<br />
int main()<br />
{<br />
int i = 7;<br />
int* ip = &i;<br />
<br />
}<br />
In the above code, the pointer ip points to the address of
i, therefore, &i. Because pointers are the variable that holds
another object's memory address, in order to points to an address,
we need to reference that variable. Is my concept right?
Any input would be welcome.
|
|
|
|