|
_8086 wrote: Also why it init, max counts should be ignored in this case?
Because the documentation says so[^]
And because it makes a lot of sense for the count parameters to be immutable
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi There,
I am using the following example to make Win32 tab control without using MFC.
Win32 SDK C Tab Control made easy[^]
There are some business reasons that I can only use Win32 API for this.
I am able to create the tab pages. But finding weird behaviour with the messageloop.
I am making an XLL, so my dialog is opened from a selection from Excel menu item.I get a dialog box with tabs on clicking this certain menu item. Each tab has some edit boxes and buttons. which all work fine except the TAB key doesnt work to move from one item to another.
I have implemented it the same way as in above program. The problem i face are:
1. When i click on the tabs, it shows me the correct child dialog. when i change the selection of tab, it goes to the correct next dialog. so everything works fine here. But when i click on any area in the child dialog (i.e to activate the message loop), The tab key starts working on that particular selected tab, BUT after this i am not able to select any other tab. On clickin on any other tab takes me to the first tab (iSel=0)
2. When I close the dialog box from the X button in top right corner; It closes the dialog box BUT it also closes my Excel window which i dont want.
This application I am developing to configure and test some connections. so I need the excel window open after i am done with the configurations.
Please reply if you read this message. I will appreciate any help.
Regards
Ajay
ajaymat@gmail.com
|
|
|
|
|
Hello!
Have anyone tried to draw a Gif on a OpenGL Window?
I´m stuck here...
Thaks!
|
|
|
|
|
Anybody know how to convert the following code?
__asm<br />
{<br />
push eax<br />
push edi<br />
<br />
push es<br />
push ecx<br />
<br />
mov edi, [this]<br />
add edi, [m_StartExceptionContext]<br />
push ds<br />
pop es<br />
mov ecx, size m_StartExceptionContext<br />
xor eax, eax<br />
push edi<br />
cld<br />
rep stosb<br />
pop edi<br />
<br />
pop ecx<br />
pop es<br />
<br />
mov dword ptr [edi] CONTEXT.ContextFlags, CONTEXT_FULL<br />
mov dword ptr [edi] CONTEXT.Eax, eax<br />
mov dword ptr [edi] CONTEXT.Ecx, ecx<br />
mov dword ptr [edi] CONTEXT.Edx, edx<br />
mov dword ptr [edi] CONTEXT.Ebx, ebx<br />
mov dword ptr [edi] CONTEXT.Esi, esi<br />
mov dword ptr [edi] CONTEXT.Edi, edi<br />
mov word ptr [edi] CONTEXT.SegSs, ss<br />
mov word ptr [edi] CONTEXT.SegCs, cs<br />
mov word ptr [edi] CONTEXT.SegDs, ds<br />
mov word ptr [edi] CONTEXT.SegEs, es<br />
mov word ptr [edi] CONTEXT.SegFs, fs<br />
mov word ptr [edi] CONTEXT.SegGs, gs<br />
pushfd<br />
pop [edi] CONTEXT.EFlags<br />
mov eax, [ebp]<br />
mov dword ptr [edi] CONTEXT.Ebp, eax<br />
mov eax, [ebp + 4]<br />
mov dword ptr [edi] CONTEXT.Eip, eax<br />
lea eax, [ebp + 8]<br />
mov dword ptr [edi] CONTEXT.Esp, eax<br />
<br />
pop edi<br />
pop eax<br />
}<br />
}
|
|
|
|
|
If that code works, why bother? The assembly code is x86 specific, the necessary intrinsics would be x86 specific as well as being Visual C++ specific - you won't get any cross-platform benefit.
For what that code's doing (looks like it's throwing an exception, whilst storing the full processor context, possibly so it can resume?), I suspect you need assembly language, 'cos the compiler would add in too much unwanted rubbish.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I need it to compile to an x64 Architecture!! As far as i know VS2005 does not support any inline code (Assembler)..
|
|
|
|
|
Not when compiling 64bit code no.. but AFAIK not all the instructions you used are available as intrinsic functions - actually, most aren't.
The only solution I know is using an other compiler..
|
|
|
|
|
You probably need to do more than just literally translate that code, then - the processor context for the x64 will be different (for example, the 64-bit register set is different) than the x86 context. Have a look at this page on x64 calling conventions[^] - that's very different to x86.
Your best bet might be to rewrite the code as a standalone assembly language file that you can assemble with MASM and then link into your application (that's the easiest way to make sure it works, as you have no compiler bits getting in the way) then use that as a working model to attempt to convert into intrinsics.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
I'm using VS2008 Team System. How do I add a web reference to my C++ project?
|
|
|
|
|
Google[^] -> here[^]
You can only add a web reference for a C++/CLR project, not an unmanaged C++ project.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
In VS2005, I used to right click and choose "Add Web Reference". In VS2008, that menu is disabled. Any way to enable it?
|
|
|
|
|
That menu is enabled for me in VS2008 when I have a C++/CLR project. If it's not enabled for you in VS2008 for a C++/CLR project, that says to me that your Visual Studio installation is broken.
The reason Add Web Reference no longer works for unmanaged C++ projects in VS2008 is that ATL Server isn't in VS2008[^]. A simple Google[^] would have shown you that.
You can download ATL Server from CodePlex[^] - it's been open sourced. This includes sproxy.exe, which will generate the C++ wrapper code for the web-service.
The other Microsoft alternative is the Windows Web Services[^], which will be released with Windows 7 and available as an update for Windows XP SP2 and later.
An open-source alternative is gSOAP[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
i think the MFC or unmanaged is means .
how can we add in this kind of project
|
|
|
|
|
In MSDN:
Notifies a service that its startup parameters have changed. The hService handle must have the SERVICE_PAUSE_CONTINUE access right.
Does this mean that I don't need to care about the sync problem between the ControlHandler and ServiceMain function?
|
|
|
|
|
maishuiking wrote: Does this mean that I don't need to care about the sync problem between the ControlHandler and ServiceMain function?
I haven't got a fricking clue and, I suspect, neither will most people on this forum without a little more context describing what you're talking about when you maention "the sync problem".
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I want to change the cursor of my mouse when ever i point it on a button or on a static text. Please let me know can that be done???
Thanks in Advance
|
|
|
|
|
subclass the button or the static window and use SetCursor to change the shape of the cursor when the mouse is over the control see WM_MOUSEMOVE message for the same.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Rather than handling WM_MOUSEMOVE , as suggested by _AnsHUMAN_ 's answer, you probably want to handle WM_SETCURSOR [^]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi all,
How to change the environment variable(esp. PATH) setting using
C++ code.
|
|
|
|
|
|
#include "stdafx.h"
#include <cstdlib>
int _tmain(int argc, _TCHAR* argv[])
{
std::system("set pathTEST=d:");
std::system("set p");
return 0;
}
|
|
|
|
|
For just the current process, you already have answers.
If you want to change the system environment variable values, see this answer[^].
User environment variables are similar, except that their values live in HKEY_CURRENT_USER\Environment
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I have a console application with no MFC support (I cannot add MFC support due to several reasons). This console executes another process and the new process does a very lengthy operation (I cannot use a thread within the console to do the lengthy operation, as is performed by a third party library that the app links to, which cannot work in console mode). The console app must be notified of the progress of this lengthy operation periodically. Now, when I thought of how to notify the console, I cannot do a PostMessage (there's no window handle), I cannot do a PostThreadMessage (the primary thread does not have a message queue). Therefore, I am considering the following options:
1. Use a named pipe. The console creates the pipe and uses CreateProcess to spawn the other executable, passing the pipe handle while spawning it. The executable write into the pipe and the console reads.
2. Use Overlapped IO
3. Any other suggestions (No, code injection or CreateRemoteThread is not an option that I will consider).
I have the source code of both the applications, but I don't want to do a lot of changes in the console app (thousands of lines, OLD stuff, no docs). However, I'm open to be convinced to do that as well. Thank you!
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Socket communication may become good option for you
Parag Patel
Sr. Software Eng, Varaha Systems
|
|
|
|