As subject, no worries. Glad your problem was resolved.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[^]
the last link, I think, will not work on a WinCE powered PNA, cause the article says that the newest Win32 Api from Win2000 and above is requiered. Also there is no stdafx.h for wince
It looks very interesting but I didnot found something thar could help me.
The first thing, will work on WinCe (btw. I didnot get an Error while compiling) but I do not understand all...
With the first suggestion, I tried this...
hwnd = CreateWindow(L"testerClass",L"tester Program", WS_POPUP, -25,-25, 65, 65, NULL, NULL, ghInstance, NULL);
bf.BlendOp = AC_SRC_OVER; //as described in the article
bf.BlendFlags = 0; //as described in the article
bf.SourceConstantAlpha = 120; //as described in the article
bf.AlphaFormat = AC_SRC_ALPHA; //as described in the article
hwnd is "my" window and stays ontop of the other window , lets say hwnd2.
How should I use dstHDC and scrHDC?
It is enough to call it like
HDC dstHDC = GetDC(hwnd);
HDC srcHDC = GetDC(hwnd2);
This do not change anything... The window (hwnd) is still visible, full visible.
I need to use WinInet.dll for HTTP in Asynchronous mode.
Right now, I have it working fine but using InternetOpenURL().
As eventually I would need to use POST commands, I would like to work using HttpOpenRequest() and HttpSendRequestEx().
When I use HttpSendRequest() (or HttpSendRequestEx()), I get False as a response, but GetLastError() gives 997 which means 'I/O Pending', what I interpret is Ok as I'm using the function asynchronously. After this, the callback function received the Code 100 which means 'INTERNET_STATUS_REQUEST_COMPLETE', which would mean the request was sent succefully.
However, reading the data, the buffer is empty. Also, I use a sniffer and I can see that there is no HTTP request sent out to the server, so I don't know why the callback receive the 'INTERNET_STATUS_REQUEST_COMPLETE' message but the function apparently failed.
Using the sniffer with the InternetOpenURL() function, I an see the request and the response from the server..
Any idea? What else can I check in order to detect why is not working?
All project settings of a project are stored in its .vcproj or .vcxproj file which is nothing but an xml file. So all you need to do is to replace the relevant sections by copying from one file to another by opening the file in some text editor like notepad.
«_Superman_» I love work. It gives me something to do between weekends.
I am trying to follow some intructions on how to create Property sheet based application.
When I compile and run in degug mode I get:
I am getting First-chance exception at 0x5d0c373e in LastTry.exe: 0xC0000005: Access violation writing location 0x00416e8c.
In debug mode however when i exit I get a The program ' LastTry.exe: Native' has exited with code 0 (0x0).
I was able to get the original source code from the demo site. When I compiled that and ran it.
There was no exception.
There is one line in my stdafx.h which is not in the original source code.
It is to do with :
#include <afxcontrolbars.h> // MFC support for ribbons and control bars
How do I resolve this issue?
I have tried to comment the above line obviously gives me more compile errors.
What could I have done wrong? Or is it something that was not right in my install of VStudio 2008?
I am sorry I am not trying to be a pain. This is frustratung me...
Here is what I did...Any suggetions...
On a different machine i went down in versions..from 2008-2005-and finally to VStudio 6.
I used the same steps in all ..I got the same exception error except in Vstudio 6..Where I got no exception error...Imported the same project into my Visual Studio 2008 and it works fine...No First-chance error.
I am not sure what to do? ...Well for now I can work with this imported project...but is this really a solution?...I have come to the end of the rope on this one...If I did something wrong, would VStudio 6 not complain as well?
Do you think you can advice me as what to do? I don't like to give up, at the sametime I don't want to be hitting my head if it is a bug in VStudio 2008?
I can't see me to be the only one trying or using the property sheet based application?
Thanks, I will really appreciate some sort of feed back, I am new at this and it's frustrating me..Please advice.
je suis en train de codé une dll C++, cette derniere doit appelé une methode dans une autre dll .NET, afin de récuperer le resultat renvoyé par la methode .NET, j'utilise Visual c++ 6.0.
Csharp c'est du code managé or c++ c'est que du natif.
je vous demande est ce que c'est possible ou non??
j'arrive bien a chargé la dll .net, mais le probleme que j'ai mnt c'est l'appel de la methode .net.
If Google translator worked right, yes, it's possible. I do exactly that on a project I'm on right now. You'll want to export your entry points in the C++ DLL using a .def file so they are undecorated and _cdecl. You then create an interop class in C# (I prefer placing the interops in a dedicated internal static class with the [SuppressUnmanagedCodeSecurityAttribute] and then exposing a public C# interface with full error checking and so forth.
There are several articles on the web and here in code project which use this technique.
i wold like to invoke a function created by C# from a c++ code, if i understand your response, i must add a static my function class with SuppressUnmanagedCodeSecurityAttribute!!
But for what this line : SuppressUnmanagedCodeSecurityAttribute
i dont understand.
I have a reader that reads an int
and I have a writer that modifies that int.
In other words I have an int called iVal :
And I have a thread A that constantly reads iVal and another different thread B that, sometimes modifies the value of iVal.
My concern is with problems that may arise when A is reading iVal at the same time B is modifying it.
I used to rely on InterlockedIncrement,etc whenever I have the scenario of two writers for the same variable.
But what if my writer (B) could do more than a simple incrementation and that my readers must read the value as it is just before the writer could modify it or as it is just after it would be modified ?
I'm not sure already that the depicted scenario is unsafe. It data incorrectness could happen and cause the reader to behave in unplanned way. Moreover I seek a simple way without introducing a critical section for iVal variable :
Ie I want to avoid having to wrap the simple iVal into a class and do things like the following :
Which messages should I process to ensure my window cannot be reduced below a certain size?
I'm currently processing the WM_SIZING message which works fine when the user is dragging the edge of the window but it's possible to use explorer to highlight multiple windows on the taskbar and then select the 'Show Windows Stacked' option from the context menu. This currently results in the window size being reduced below it's minium.