|
Hello,
I solved the problem now . I don't know why it didn't work before, but it's solved now..
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Hello,
I solved the problem. When I don't typecast the m_pdlg to CMyDialog* everything works fine...
I don't know why I can't typecast m_pdlg to CMyDialog*, but it works fine now
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
When building CodeProject examples (and other source code), I have noticed that the file size of the Release executables that I create, are larger than the Release executables created by the authors of the examples. I couldn't figure out why, but after re-installing XP and VC++6, I forgot to install SP5, and noticed that the Release executables produced were a different size to the ones created when SP 5 had been installed. Sometimes they were larger, sometimes smaller.
For example, if I install VC++6, without the service pack, I end up with a Release executable size of 528KB. With Service Pack 5 installed, this reduces to 444KB.
I've noticed this peculiarity before when compiling the QCD (Great media
player) Monkey's Audio input plugin - My plugin is 202KB, compared to the
official plugin which is 153KB. Everybody else I've spoken to can compile it
and produce a plugin of 153KB. It seems I'm the only one with the problem (
Also, when compiling a viewer plugin for the Directory Opus file manager, the dll produced is 32KB without SP5, and 44KB with SP5.
What's going on ?
|
|
|
|
|
Hmmm! It is a service pack! This implies that some bugs where probably fixed and or some of the code was changed to be more efficient. A bug fix might increase the code size generated by the compliler, why an improvement in efficiency might result in a smaller or larger code size.
In either case the amount of code generated has changed, and is hopefully better than is was without the service pack.
INTP
|
|
|
|
|
Thanks for the reply.
I don't understand why other people can compile the QCD plugin with VC++6 SP5 and produce a dll of size 153KB, and mine is 202KB, using exactly the same settings.
The same is true with the ToDoList project on CodeProject, where the official Release executable is 340KB, but mine is 444KB, again using the supplied project settings.
Any ideas ?
|
|
|
|
|
Maybe your settings are not exactly the same, or maybe the code version is different.
Version 1.9.0: 160KB (ToDoList.exe downloaded from CP)
Version 3.5.1: 324KB (ToDoList.exe downloaded from CP)
When I open the project for version 3.5.1 and compile as release the size is 324KB. (VC++ 6.0 SP5)
I have no idea why it would not produce the same program size on you machine.
If you find out, please post the answer.
INTP
|
|
|
|
|
I finished the 3d editor and I have released
the full C++ code for the 3d scene viewer.
Is a good start for learning 3D using C++.
http://getic.njoydeco.com
|
|
|
|
|
wow thanx for the releasing the code.
great job
|
|
|
|
|
So, when do we see the article?
Iain.
|
|
|
|
|
It is considered good form to include links in a clickable form : http://getic.njoydeco.com[^]
__________________________________________
a two cent stamp short of going postal.
|
|
|
|
|
I have err : error spawning cl.exe What that's means? How should i do? That's in VS7, when i want to compile VS6 project.
|
|
|
|
|
Cl.exe is the actual compiler. It's a console application. Msdev.exe is the IDE that spawns cl.exe when it needs to. It sounds like the environment variables are not quite right. How long has this been happening (i.e., have you ever compiled successfully)?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
that's first time this message appears. I ryed to compile glut-3.7.6.
|
|
|
|
|
I am trying to print what looks like a ruler in mirror image. Using SetWorldTransform, everything works out fine on the display, but when performing print or print-preview, the mirror image text is simply rendered as upside-down rather than mirrored.
Simple testcode follows that simply creates a triangle with the word test.
I've tried different fonts as well. The only way it appears to work correctly outputting to the printer is if you use MM_TEXT mapping.
Any ideas out there?
TIA
Eric
<br />
void CTransformView::OnDraw(CDC* pDC)<br />
{<br />
pDC->SetMapMode(MM_LOENGLISH);<br />
SetGraphicsMode(pDC->m_hDC, GM_ADVANCED);<br />
XFORM XForm;<br />
::ZeroMemory(&XForm, sizeof(XFORM));<br />
XForm.eM21 = 0;
XForm.eM12 = 0;
<br />
XForm.eM11 = -1;<br />
XForm.eM22 = 1;<br />
XForm.eDx = 200;<br />
XForm.eDy = 0;<br />
SetWorldTransform(pDC->m_hDC, &XForm);<br />
<br />
pDC->MoveTo(50, -30);<br />
pDC->LineTo(160, -10);<br />
pDC->LineTo(160, -120);<br />
pDC->LineTo(50, -30);<br />
pDC->SetTextColor(RGB(0,0,0));<br />
<br />
CFont num_font_upper;<br />
num_font_upper.CreatePointFont(4, "Arial"); <br />
CFont *pFont = pDC->SelectObject(&num_font_upper);<br />
pDC->TextOut(50,-30, CString("test"));<br />
pDC->SelectObject(pFont);<br />
}<br />
|
|
|
|
|
It appears that simply calling
SetGraphicsMode(pDC->GetSafeHdc(), GM_ADVANCED) Will cause this bug to appear, even without any tranformations. This renders theword 'test' upright on screen and upside-down on print-preview or printout.
Am I missing something here?
TIA
ERic
<br />
void CTransformView::OnDraw(CDC* pDC)<br />
{<br />
pDC->SetMapMode(MM_LOMETRIC);<br />
SetGraphicsMode(pDC->GetSafeHdc(), GM_ADVANCED);<br />
<br />
CFont num_font_upper;<br />
num_font_upper.CreateFont(.4 , 0, 0,0, FW_NORMAL, FALSE, FALSE, 0,<br />
ANSI_CHARSET, OUT_TT_PRECIS, CLIP_DEFAULT_PRECIS | CLIP_LH_ANGLES,<br />
PROOF_QUALITY, VARIABLE_PITCH |TMPF_TRUETYPE|FF_DONTCARE, "Ariel"); <br />
<br />
CFont *pFont = pDC->SelectObject(&num_font_upper);<br />
pDC->TextOut(100,-400, "Test");<br />
pDC->SelectObject(pFont);<br />
<br />
return;<br />
}
|
|
|
|
|
please show me the way to change the text color in the button.
thanks...
|
|
|
|
|
It might not be possible. MSDN states that it must have the BS_OWNERDRAW style. At that point, the button's owner can handle the WM_CTLCOLORBTN message. However, the text color of a push button applies only to its focus rectangle; it does not affect the color of the text. Make sense?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I've got this program that has a box that lists all the available serial ports on a computer. Right now, it is listing COM1, COM2, COM3, and COM4. The computer actually only has COM1 and COM2. I looked at the code a little and noticed that it is getting the available serial ports from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" in the registry.
I can easily get the program to build a list from "HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM" instead.
My question is... why are COM3 and COM4 listed in "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports"? WHat is the purpose of this key?
Also, is there another way you guys would construct a list of available serial ports?
Freiheit ist von Gott, Freiheiten vom Teufel.
|
|
|
|
|
waffleman wrote:
Also, is there another way you guys would construct a list of available serial ports?
I would be inclined to use the Win32_SerialPort class.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
COM ports in windows are very much a name given for serial communication by which application can communicate with the hardware using createfile(...) api.
for example when you connect a mobile phone to the computer using bluetooth on the USB, the bluetooth driver "exposes" the devices as a com port to the application. Similartly you must have been connecting some device to the pc. and that devices driver has created additional com port, in win2k i can assign my physical comport1 to COM25 or any other no but not greater than COM25.
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
Weird aint it! I am not sure about modern Windows, but in the DOS/Win31 days; COM1 & COM3 mapped to the same address space (range), the same was true about COM2 & COM4. This may have something to do with you results.
INTP
|
|
|
|
|
kkkkfkkjlk
alert("hello");
|
|
|
|
|
Oh no, a script kiddy!
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
alert("not working here, try on some VB forum");
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I am trying to learn C and c++.I am okay at both.I am 13 and want to be a programmer for games but I do not know how to get started plus I am not that great of a programmer
(There are some things about programming you can't get from a book).I would like to know where to go to get started and where to get tutorials for programming.So if anybody knows any good sites I'd be hap[py to know.
K.G.
|
|
|
|