|
Use WideCharToMultiByte API.
|
|
|
|
|
Use WideCharToMultiByte .
«_Superman_»
|
|
|
|
|
Nope. You need instead a better understanding, see, for instance [^], [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello friends
I got these errors when i compile my project.. i need ur suggestions..
include\winsock2.h(112) : error C2011: 'fd_set' : 'struct' type redefinition
include\winsock.h(54) : see declaration of 'fd_set'
include\winsock2.h(156) : error C2011: 'timeval' : 'struct' type redefinition
include\winsock.h(97) : see declaration of 'timeval'
include\winsock2.h(212) : error C2011: 'hostent' : 'struct' type redefinition
Thankx
|
|
|
|
|
Are you including both winsock.h and winsock2.h?
Or what files are you including and in which files?
«_Superman_»
|
|
|
|
|
Hi,
I am getting problem in joining 2 ITEMIDLIST that is ITEMIDLIST of Desktop and My Computer,
The size of Dektop ITEMIDLIST is zero so when I join them in a single IDIDLIST it comes the size of My Computer and having a null string. That create a big problem for me.....
How to solve it?
|
|
|
|
|
hi
#pragma error stops compiling further lines of the source code to be compiled and skips it to the next source file.
i need a pragma to stop compiling ever.
|
|
|
|
|
Try the #error directive.
«_Superman_»
|
|
|
|
|
I think he need #pragma take_my_compiler_away_please
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
yeah, something like this
my nephew! listen to me! i remember that when i was a child!, something which called Borland C++ v3.1, when there was no Windows and we had to work in an OS called DOS provided by Microsoft, had an option to stop errors and/or warning at a specified number of them. we could tell the compiler not to proceed compiling after m warnings and n errors. after a couple of years, Microsoft has not provided such an option for it's newest compiler, Visual Studio 2050!!!
i don't know why MS treats like this!!!
anyway, again, what i need is a way to command the compiler not to proceed compiling of ANY source and stop compilation like when it has compiled all of them!!!
this is eg. when i know the same error will occur when the other sources being compiled because they've included the same header file.
|
|
|
|
|
oh! sorry! i meant #error by #pragma error! :P that's exactly what which does not act as i like...
|
|
|
|
|
|
See here[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Thank for reply.Now i use new which is given by you.But still i have error.Error is like that
error C2065: 'm_wndOwner' : undeclared identifier
error C2228: left of '.m_hWnd' must have class/struct/union
error C2228: left of '.CreateEx' must have class/struct/union
error C2228: left of '.m_hWnd' must have class/struct/union
error C2228: left of '.DestroyWindow' must have class/struct/union
Plz help me
|
|
|
|
|
You need to declared 'm_wndOwner' and other errors depends to it.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
As mentioned,
(m_wndOwner is a CWnd member variable added to the application class)
you didn't declare the member variable in your code. The other errors would be due to this factor only.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Hi,
How to change the color of CStatic control text?
|
|
|
|
|
|
You can use of this event WM_CTLCOLORSTATIC .
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi,
i am new to OpenGL and therefore need your help. When i draw a simple line using MFC it works fine... my pixels are ret correctly..
when i am trying to redraw that automatically using OpenGL they are being drawn in reverse...so instead of let say up to bottom... it is drawing it bottom to top.
please let me know what changes need to be done withing Vertex...i tried it all.. i don't see how to fix this.
<br />
int dx = (x2 - x1);<br />
int dy = (y2 - y1);<br />
int temp;<br />
float k;<br />
<br />
glBegin(GL_LINES);<br />
::SetPixel(m_hDC, x1, y1, color);<br />
glVertex2f(x1,y1);<br />
if (abs(dx) > abs(dy))<br />
{<br />
if (dx < 0)<br />
{<br />
temp = x1;<br />
x1 = x2;<br />
x2 = temp;<br />
<br />
temp = y1;<br />
y1 = y2;<br />
y2 = temp;<br />
}<br />
k = (float)dy / (float)dx;<br />
<br />
int xs;<br />
float yt = (float)y1 + k;<br />
float distance;<br />
for (xs=x1+1; xs<x2; xs++)<br />
{<br />
distance = (float)(yt - (int)(yt));<br />
<br />
::SetPixel(m_hDC, xs, (int)yt, color);<br />
glVertex2f(xs,(int)yt);<br />
::SetPixel(m_hDC, xs, (int)yt+1, color);<br />
glVertex2f(xs,(int)yt+1);<br />
<br />
yt += k;<br />
}<br />
}<br />
else<br />
{<br />
if (dy < 0)<br />
{<br />
temp = x1;<br />
x1 = x2;<br />
x2 = temp;<br />
<br />
temp = y1;<br />
y1 = y2;<br />
y2 = temp;<br />
}<br />
k = (float)dx / (float)dy;<br />
<br />
int ys;<br />
float xt = (float)x1 + k;<br />
float distance;<br />
for (ys=y1+1; ys<y2; ys++)<br />
{<br />
distance = (float)(xt - (int)(xt));<br />
<br />
::SetPixel(m_hDC, (int)xt, ys, color);<br />
glVertex2f((int)xt,ys);<br />
::SetPixel(m_hDC, (int)xt+1, ys, color);<br />
glVertex2f((int)xt+1,ys);<br />
xt += k;<br />
}<br />
}<br />
<br />
::SetPixel(m_hDC, x2, y2, color);<br />
glVertex2f(x2,y2);<br />
glEnd();<br />
|
|
|
|
|
It depends on the settings your using for your OpenGL renderer.
Don't try it, just do it!
|
|
|
|
|
|
Member 3375334 wrote: gluOrtho2D(0.0, width, 10.0, height);
The gluOrtho2D function has the following arguments:
void gluOrtho2D ( GLdouble left , GLdouble right , GLdouble bottom , GLdouble top );
So, first question, why do you pass 10 for the bottom instead of 0 ?
Anyway, if you want to use the same coordinate system as with the MFC (top=0 and y value increase when you go down), then you have to invert the top and bottom:
gluOrtho2D(0.0, width, height, 0.0);
Another point: why are you using SetPixel in an OpenGL environment ? If you want to draw things with OpenGL, then it is best to use only OpenGL primitives to do so.
|
|
|
|
|
the reason why i am using SetPixel is because i need to draw line in MFC and at the same time make it draw in OpenGL... i am sorry i didn't mention that earlier.
that 10 was a mistake i meant for it to be 0 yes.
another question i wanted to ask actually was that when i add OpenGL to MFC and roll my mouse over the screen i get entirely black screen and do not see on the left side my MFC line anymore. So what i am trying to do is to draw MFC line on the left and project that line the same exact way on the right.
what am i doing wrong for that? because if i am trying to change a window color wihich by default is black to white my window flickers. when i close the window i see briefly my MFC line....but it's like behind the OpenGL layer...
what's wrong?
|
|
|
|
|