|
1. are you explicitly linking to mfcs42*.lib ? that seems unusual, since the MFC libs are pulled-in via MFC/AFX headers - so if you're building an MFC project, you don't need to tell the linker anything about MFC libs. so, just compiling with a new version of MFC will get you the new .LIBs.
2. why do you say your app won't compile in VC8. what errors are you getting?
|
|
|
|
|
hi chris!!
I was explicitly linking to mfcs42d.lib. That was my orginal setting for VC6. There was no problem compiling the code using this setting.
When I tried compiling the code in VC8.It first gave me error stating mfcs42d.lib not found. I removed explicit reference for mfcs42d.lib from Linker>input>Additional dependencies. But now I am getting error as
mfcs80.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in MSVCRT.lib(dllmain.obj)
Again I think it is conflictiong with new MFC8.
Thx
|
|
|
|
|
hi!
I am linking explicitly to mfc80.lib instead of mfc42.lib.
That solved my problem!
Hope that's rignt thing I am doing.
Thx!!
|
|
|
|
|
Hi,
I want to dynamicaly load text from an generic data container into a TextBox (Windows Form). How do I put the text/data into the TextBox?
Cheers
/Christoffer
|
|
|
|
|
Are you able to read the data? if Yes
Use SetWindowText() to set the data in the text box.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hi,
Thanx for replying.
I do not understand what you mean. Which namespace holds this method? I do understand that the method takes an id to the form it´s suppose to set text to and the text parameter. But I do not no how to implement it. I would be grateful if you could give me a clearer explanation.
cheers
/Christoffer
|
|
|
|
|
like this
m_edit.SetWinodText(values);
|
|
|
|
|
Thanx for your reply.
Kind of embarrassed right now...
m_edit is the name of the TextBox? What am I missing here?
If the id of the TextBox is idTextBox how do I apply the SetWindowText method on it?
cheers
/Christoffer
|
|
|
|
|
hey, are you using MFC ?
it seems that you are using Managed C++ (for the .NET framework).
it seems also that you should teach yourself to the basics of C++
|
|
|
|
|
I think TextBox is CLI/C++ and m_edit is CEdit m_edit in MFC you can use m_edit.SetWindowText(values);
|
|
|
|
|
Rip Kirby wrote: ...(Windows Form).
Is this Visual C++?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I really apologize to all of you that have put time and effort replying my question, I posted this question i the wrong thread. Sorry once again.
Cheers
/Christoffer
|
|
|
|
|
No problem. Larger crimes have been committed! It just helps to fully qualify your question so that you/we are not off chasing rabbits.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
How can I add a circle on top of the bitmap image?
I added the following code to draw a rectangle on top of bitmap image. But rectangle is underneath of the BMP image.
CCLientDC pDC(this);
pDC.MoveTo(100,100);
pDC.Rectangle(20,20,30,30);
Please help me.
thanks in advance
Ravi
|
|
|
|
|
is it just for drawing purpose? or do you want to save it to the file?
it is easy to place a rectangle over bitmap. first draw teh bitmap using BitBlt or StretchBlt, then draw the rectangle over it. it will work
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
Where do you use these codes?
|
|
|
|
|
Hi Sarath,
Following is the code ... I'm new to VC++/MFC.
m_hBmpNew = (HBITMAP) LoadImage(AfxGetInstanceHandle(),
"bng4.bmp",IMAGE_BITMAP,
0, // desired width
0, // desired height
LR_LOADFROMFILE);
if( m_hBmpNew == NULL ){
AfxMessageBox("Load Image Failed");}
// put the HBITMAP info into the CBitmap (but not the bitmap itself)
else{
m_st1.GetClientRect( &rectStaticClient );
rectStaticClient.NormalizeRect();
m_size.cx=rectStaticClient.Size().cx;
m_size.cy=rectStaticClient.Size().cy;
m_size.cx = rectStaticClient.Width(); // zero based
m_size.cy = rectStaticClient.Height(); // zero based
// Convert to screen coordinates using static as base,
// then to DIALOG (instead of static) client coords
// using dialog as base
m_st1.ClientToScreen( &rectStaticClient );
ScreenToClient( &rectStaticClient);
InvalidateRect(&rectStaticClient);
// Added to draw a rectangle
CCLientDC pDC(this);
pDC.MoveTo(100,100);
pDC.Rectangle(100,100,110,110);
i'm loading bitmap image using LoadImage(). Rectangle image is coming underneath of the bitmap image.
Thanks & regards
Ravi
|
|
|
|
|
well first i'm not sarath
Is this good or no
<br />
#include AtlImage.h<br />
CImage m_Image;<br />
m_Image.Load("c:\\1.jpg");<br />
<pre><br />
void CAnswerDlg::OnPaint() <br />
{<br />
CPaintDC pDC(this);
CRect Rect;<br />
GetWindowRect(Rect);<br />
ScreenToClient(Rect);<br />
m_Image.BitBlt(pDC.m_hDC,Rect.left,Rect.top,Rect.right,Rect.bottom,0,0);<br />
pDC.MoveTo(100,100);<br />
pDC.Rectangle(100,100,210,210); <br />
}<br />
|
|
|
|
|
Hi Whitesky,
First of all thanks for your reply.
Actually i want to load BMP image of size 4096x4096.So for that i need scroll bar properties to see the entire image.
Same image, i want draw a rectangle which will move according to the scroll bar.
How can i do this?
Thanks for ur help.
Regards
Ravi
|
|
|
|
|
|
Sorry for the delay.
hope you got the answer from WhiteSky
SaRath.
"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
My Blog | Understanding State Pattern
|
|
|
|
|
Thankyou very much WhiteSky and Sarath.
Ravi
|
|
|
|
|
Hi to all,
I am Developing a Dialog based application, to which i have applied a skin.
after applying the skin i could not able to Activate the Main Menu through keyboard, But i can with mouse. i have Created the Menu filed as
&File->
&Connect
&Disconnect
E&xit (Alt+x)Accelerator
i am able to handle the accelerators and also the Menu(through Mouse)
But unable to Access the Menu items by keyboard like Alt F to activate File Menu etc,....
plz solve this as i need it urgently.
Thanks in Advance
-- modified at 8:34 Friday 4th August, 2006
Gopinath MV
|
|
|
|
|
Did you ever find a solution to this? I have the same problem!
|
|
|
|
|
Hi to all,
I need to establish a connection to a server through https protocol,
can any one give some idea, how to do it in VC++ MFC.
i need to establish a connection to the server and retrive a file.
Very urgent, Plz help me.
Thanks in advance.
Gopinath MV
|
|
|
|