|
Thanks.
Oh oh. MFC and Winsock is only beginning to get interesting. If I have pointer to doc, that would break the OOP encapsulatiion standard, would it not???
Kuphryn
|
|
|
|
|
Okay. I believe I have a solution. However, I am debugging another problem, so I am not completely sure that the solution works.
The solution I implemented compiled, but I have not fully tested it. The solution is to pass the a reference of wParam to doc.
I like this solution because I do not have to use a pointer to doc just to access its private data. This solution keeps the OOP encapsulation standard intact.
Kuphryn
|
|
|
|
|
I'm making a MFC dialog based program and I would like to change between two different bitmaps in a picture box. I assigned a static control to it and found a function called SetBitmap(HBITMAP hBitmap). Is this the right one? And if I want to change it to a resource bitmap how should i do? It's called IDB_BITMAP.
|
|
|
|
|
tordyvel wrote:
Is this the right one?
Yup.
tordyvel wrote:
And if I want to change it to a resource bitmap how should i do? It's called IDB_BITMAP.
HBITMAP hNewBmp = static_cast<HBITMAP>(::LoadImage(AfxGetResourceHandle(),
MAKEINTRESOURCE(IDB_BITMAP), IMAGE_BITMAP, 0,0,
LR_DEFAULTCOLOR|LR_SHARED));
--------
Higher education helps your earning capacity. Ask any college professor. --Shog9 --
|
|
|
|
|
It didn't work... i get this error:
error C2059: syntax error : '('
...don't really know what to do
|
|
|
|
|
It looks like the formatting on Shog9's response was mangled, here is what you need.
HBITMAP hNewBmp = static_cast<HBITMAP>(::LoadImage(AfxGetResourceHandle(),
MAKEINTRESOURCE(IDB_BITMAP), IMAGE_BITMAP, 0,0,
LR_DEFAULTCOLOR|LR_SHARED));
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
<shog slaps self>
Sorry, forgot to escape the angle brackets (again). Thankfully kilowatt came to the rescue
--------
Higher education helps your earning capacity. Ask any college professor. --Shog9 --
|
|
|
|
|
How do you put a new line in a CString? "\n" doesn't seem to work
|
|
|
|
|
CString s("Hello");
s += "\nhummmm.";
Maxwell Chen
People say "No news is good news". Then, no code is good code!?
|
|
|
|
|
But if I display the string in an edit box it doesn't work
|
|
|
|
|
You need to check the multiline property of the edit box.
Maxwell Chen
People say "No news is good news". Then, no code is good code!?
|
|
|
|
|
Well it's checked and it still doesn't work. Instead it shows a character that looks like "|" where it should jump to a new line. this is my code:
UpdateData();
if( m_iSelect==0 )
m_strInfo = "Test\nTest";
UpdateData(FALSE);
|
|
|
|
|
I tried to use a static text box instead of an edit box and it worked
|
|
|
|
|
Use "\r\n".
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ravi is right, use "Test\r\nTest" for EditBox.
Maxwell Chen
People say "No news is good news". Then, no code is good code!?
|
|
|
|
|
Use \r\n instead of just \n
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
|
Alternatively you can use The following commands
CString temp;
{
temp +=13;
temp +=10;
}
For new line in edit box
Samir Sood
|
|
|
|
|
Use \r\n
"Isn't that the "write once, debug everwhere" language?" Tom Archer on Java...
|
|
|
|
|
Hi! I’m currently a junior in H.S. and during this summer, I was hoping to find an internship in the field of computer programming (C++). Yet, I’ve just started to learn C++ so I’m not very experience or have a lot of knowledge on C++ and the real reason I would like to be an intern in the field of computer programming (C++) is mainly to gain hands-on experience and to see what goes on in the field. I’m very focused on my future in the computer business and thought that I could start learning now before I get to college and start building my resume at a young age. Anyways, I was wondering how I can go about looking around for an internship in the field of computer programming (C++) near my area (NY, Queens or Manhattan/NYC) whether I search online or at the library or however I can find so. I was just wondering if anyone could help me out with my search for an internship or anything that I would need to know. If you need to reach me, you can instant message me at “ iZ Spyder Zi” (That’s my Screen Name) or email me @ iiispyderxiii@aol.com
Thanks in advance for all the help.
-Albert
|
|
|
|
|
Many large corporations (particularly those with government contracts) hire student for summer internships. Make a list of all the major employers in your area (the phone book is probably a good start) then search the web for their websites. Send emails to the HR departments explaining what you're seeking, and you might land several replies!
|
|
|
|
|
Hi! I’m currently a junior in H.S. and during this summer, I was hoping to find an internship in the field of computer programming (C++). Yet, I’ve just started to learn C++ so I’m not very experience or have a lot of knowledge on C++ and the real reason I would like to be an intern in the field of computer programming (C++) is mainly to gain hands-on experience and to see what goes on in the field. I’m very focused on my future in the computer business and thought that I could start learning now before I get to college and start building my resume at a young age. Anyways, I was wondering how I can go about looking around for an internship in the field of computer programming (C++) near my area (NY, Queens or Manhattan/NYC) whether I search online or at the library or however I can find so. I was just wondering if anyone could help me out with my search for an internship or anything that I would need to know. If you need to reach me, you can instant message me at “ iZ Spyder Zi” (That’s my Screen Name) or email me @ iiispyderxiii@aol.com
Thanks in advance for all the help.
-Albert
|
|
|
|
|
Hi,
How can I get the license number of Windows? I want it to run on 95,98,ME,NT,2000, XP.
thanks
Neil
|
|
|
|
|
|
Mike if you look at his other question, I think he wants to programatically get the licence number for the installed copy of Windows. Why, I cannot imagine.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|