|
Sorry to say, I think you misunderstood the OP request: he wants to cover the double with a char . This is usually possible, provided the char is by repeated as needed. For instance consider the double 0.75 :
if you repeat the char '*' four times over it, then you obtain a very good coverage.
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]
|
|
|
|
|
No problem, Microsoft invented a class[^] for that very purpose.
|
|
|
|
|
Nah, (Heretic!) that's for managed development.
Furthermore, as usual, they didn't invent it, just stolen it from Java...
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]
|
|
|
|
|
I guess you probably mean convert; take a look at sprintf[^] and its variants.
|
|
|
|
|
i have an double array u[100].
this code print "Hello 123" to openGL window, can i print u like this?
static char sbuff[20];
wsprintf(sbuff,"Hello %d",123);
OutText(0,yMax - 10,sbuff,GLUT_BITMAP_8_BY_13);
void OutText(float x,float y,char *text,void *font)
{
glRasterPos2f(x,y);
for(int i=0;text[i]!=0;i++)
{
glutBitmapCharacter(font,text[i]);
}
glutPostRedisplay();
}
|
|
|
|
|
This looks good, did you have a question about it?
|
|
|
|
|
Hi folks!
Can anyone kindly tell me how to convert _variant_t to char*?
Thanks!
char Buf[100];
_variant_t var;
?
|
|
|
|
|
|
Dear Snakefoot,
Thank you very much!
I will do like this:
<br />
if (V_VT(&var) == VT_BSTR)<br />
{<br />
strcpy(Buf, (const char*)(_bstr_t)var);<br />
}<br />
I don't like to use mfc and atl(USES_CONVERSION included in afxconv.h or atlconv.h), but thank you all the same for your kindness!
|
|
|
|
|
I have an MFC dialog which is made transparent usingSetLayeredWindowAttributes().
When i start this transparent window in my machine, i can't click.
When i connect this machine remotely from any other machine and when i try to click the background of that window, i can click.
I tried with different values for alpha in SetLayeredWindowAttributes() and i found that if alpha value is equals or above 5, behavior in both cases are same.
I want to disable the clicking of background of transparent window with alpha value as 1 in remote desktop also. Or any other way for displaying the background clicking in remote desktop
Please help me.
modified on Friday, December 11, 2009 7:24 AM
|
|
|
|
|
You can check if you are in remote:
Retrieves the Remote Desktop Services session associated with a specified process.
http://msdn.microsoft.com/en-us/library/aa382990(VS.85).aspx[^]
// 0 - Not Remote Session
// 1 - Remote Session
// -1 - Internal Error
//
int isRemoteSession()
{
DWORD sessId = 0;
if(ProcessIdToSessionId(GetCurrentProcessId(), &sessId) != 0)
{
return (sessId == 0) ? 0 : 1;
}
return -1; // Internal Error
}
For the rest, eliminate the alpha when needed
|
|
|
|
|
I have 2 queries, Kindly clarify it.
1. What is the difference between EndDialog() and EndWindow()?
2. Is it possible to use EndDialog for closing the modeless dialog?
Help me out!
|
|
|
|
|
1. I never heard or used EndWindow.
2. For a modeless dialog, why you need EndDialog, i think it wont be needed usually, rather you have to use ShowWindow(SW_HIDE) mostly.Well if you use EndDialog, then you have initialize and dialog once again since it get destroyed on EndDialog.
Величие не Бога может быть недооценена.
|
|
|
|
|
See the descriptions here[^] about how to use Dialog boxes correctly.
|
|
|
|
|
Prabhu092009 wrote: 1. What is the difference between EndDialog() and EndWindow()?
EndDialog() is a standard Windows function, and there's no such thing as EndWindow.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hi all
While building my application the compiler shows
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __splitpath already defined in libcmtd.lib(splitpat.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __getcwd already defined in libcmtd.lib(getcwd.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: _free already defined in libcmtd.lib(dbgheap.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: _calloc already defined in libcmtd.lib(dbgheap.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: _atoi already defined in libcmtd.lib(atox.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: _atol already defined in libcmtd.lib(atox.obj)
msvcrtd.lib(MSVCRTD.dll) : error LNK2005: __CrtDbgReport already defined in libcmtd.lib(dbgrpt.obj)
How to resolve this .
|
|
|
|
|
Hi,
Here are the possible causes[^] why the linker might report this error.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
|
use /VERBOSE:LIB in the project settings.
You are using some single thread libs with multi thread libs.
Last rescue is /FORCE
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hi still I am not able to resolve this.
|
|
|
|
|
I am sorry for you.
Take out all user libraries dependencies of your project. Or start a new one. You need one that can be build. And than step for step include the libs until it doesnt work.
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Hello,
I have a main dialog in which I have embedded an activex control.
This dialog also has a child dialog.
When the main dialog comes up the child dialog is always partially hidden behind the activex control.
Only on mouse click it comes to the fore front.
CLIP CHILDREN didn't work.
Any help on this problem?
THX
modified on Friday, December 11, 2009 5:40 AM
|
|
|
|
|
You should not use Dialogs within Dialogs, it is bad design. Your main window should be a normal window that shows the child dialog as and when it is needed.
|
|
|
|
|
well, that may be the case, but i am stuck with this approach for now.
any way to resolve the issue i reported?
|
|
|
|
|
Well I had the same situation few years back, If I remember correctly I handled the OnInitialUpdate() and OnSize() call of Parent class,
The first problem as I see is an repainting problem,
Hope this help.
Abhi
|
|
|
|