I have a window created with CreateWindowEx, with a caption. When I load the text using EM_STREAMIN the opening line of the text goes into the caption, replacing the intended title. How do I prevent this, so as to retain the intended caption ?
RaymondM
Posts
-
Rich edit control and caption -
GSL & "error LNK2019: unresolved external symbol _finite"Although this is a very old question it may still be of interest. I have just been running GSL (1.8) in Visual Studio 2005, and had much the same problem with unrecognised symbols, even though I could see they were in the Libs, libgsl_dll_d.lib, libgslcblas_dll_d.lib. In my case I was using the Hybrid and Newton root finding algorithms. The symbol that was missing was gsl_multiroot_fdfsolver_gnewton. Eventually I found that I had to add GSL_DLL to the Property Page: Configuration Properties: C/C++: Preprocessor, Preprocessor Definitions. That surprised me, but clearly it is the way to link up with the GSL code. Raymond Mercier
-
for loop pause resumeIn the end it was easy enough to run the function with its loop in a thread. "ThreadProcTCP" is a rather involved module, with a loop, but it all works fine.
if (hChild)
GetExitCodeThread( hChild, &dwExitCodeThread );
if (dwExitCodeThread!=STILL_ACTIVE)
hChild = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadProcTCP, hWnd, 0, &dwChild );RaymondM
-
for loop pause resumeThanks, but I don't see how that can be made to deal with a loop. Raymond
-
for loop pause resumeThanks, but I have so little experience with threads, I will have to bone up on it. Raymond
-
for loop pause resumeI have in a C++ module a for loop that can take some minutes to complete. I would like to add a pause/resume feature, and would also like to be able to stop it. However while the loop is running the program is totally unresponsive. Is there anything to be done ? Raymond Mercier
-
AddFontResourceEx>>"I can't believe that you went this many years without it" (PlatformSDK). I don't know why you think that I do not already have the headers, since they come with the full installation of Microsoft Visual Studio .NET 2003, including its PlatformSDK. In wingdi.h I find the condition _WIN32_WINNT >= 0x0500, which is obviously satisfied in the XP that I am using. From I see that for XP _WIN32_WINNT = 501 So I only need to add #define _WIN32_WINNT 501 before windows.h, and then I can call the function I need. That is of course the only point that I had overlooked. Raymond Mercier
-
AddFontResourceExThanks for the tip, but I should have mentioned that I have been compiling with VS 6 with Net Framework 1.1. Meanwhile I have managed (sort of) with these lines, which do allow me to get the function. I still fail to see why I have to go through all this, but not for AddFontResource, and I still have to put 0x10, since FR_PRIVATE is not recognized. static FARPROC fpAddFontRes,fpRemoveFontRes; HMODULE hLibrary; hLibrary=LoadLibraryW(L"gdi32.dll"); fpAddFontRes=GetProcAddress(hLibrary,(LPCSTR)"AddFontResourceExW"); fpRemoveFontRes=GetProcAddress(hLibrary,(LPCSTR)"RemoveFontResourceExW"); ..... nFontLoad=(*fpAddFontRes)(Bact,0x10,0); At least this works fine ! Raymond Mercier
-
AddFontResourceExSorry, this failed to appear ! #define UNICODE // Save as Unicode -Codepage 1200 #include <windows.h> #include <Winbase.h> #include <WinGDI.h>
-
AddFontResourceExI am trying to include AddFontResourceEx(Fontname,FR_PRIVATE,0); but get the error message that the function and FR_PRIVATE are undefined. Of course I have wingdi.h in the opening lines : #define UNICODE // Save as Unicode -Codepage 1200 #include ; #include ; The error is produced when I try to compile. I have added gdi32.lib to the command line. What am I supposed to do about gdi32.dll ? Thanks for any help Raymond Mercier
-
Createfile in VistaThanks again. It does as you say. Great game, this Vista ! Raymond
-
Createfile in VistaThanks, that has cured it. Now I have to see how to run the program in debug mode within VisualStudio, but as administrator. Raymond
-
Createfile in VistaI want to install the file data.bmp in system32: hFile = CreateFile((L"c:\\windows\\system32\\data.bmp"), GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, 0, NULL); When I run this hFile is given a value, so I write to the file, and close it. Why doesn't it appear in system 32 ? I have no trouble writing to other folders, but not to Windows, or even to C:. The problem seems to be pecular to Vista, and certainly doesn't arise on XP. Raymond Mercier
-
Notification of file downloaded from serverThanks, but I have had a look at the site you mention, and can't see how it helps. I am looking for some kind of log file in the server which would record the fact that the file has actually been downloaded from the server to the client. I feel that if I knew something about asp I would know the answer. Raymond
-
Notification of file downloaded from serverUnfortunately the code that I wrote in the question
Download Demo href="prog/Demo.zip" here
got treated as an active line. So I repeat the question, is there some way that a notification of this copying can be recorded in the server ? For some people there must be an obvious solution, but not to me ! Thanks, Raymond Mercier -
Notification of file downloaded from serverI have a website that allows the file Demo.zip to be copied from the server in the usual line:
Download Demo here Is there some way that a notification of this copying can be recorded in the server ? For some people there must be an obvious solution, but not to me ! Thanks, Raymond Mercier
-
Time limited DemoThanks, but I have already gone through that page on the way to Crypto. Raymond
-
Time limited DemoThat is what I did, and was able to compile some of the various crypto programmes, but each one has a different cryptolib.h, and none of them seem to be right for the aestest programmes. Raymond
-
Time limited DemoGraham, Going back to the aestest samples I see that I need various headers. #include "cryptlib.h" #include "aes.h" // AES #include "modes.h" // CBC_Mode< > #include "filters.h" // StringSource These are not given in that CodeProject page, but when I look around I find something under these names in http://www.koders.com/cpp/... but the headers I find there sre not right for aestest. So where or the correct headers ? I had more luck in compiling crypto50 etc, but the versions of cryptlib.h in those versions of crypto are clearly not right either for the aestest examples. Raymond
-
Time limited DemoThanks to all who have taken the trouble to reply, especially for the link to the AES code. I think now that the 'phone home' method is a bad idea. I had put out a limited feature demo, but did feel that it would be better to make it time limited. My experience is that either scheme can lead to a sale. Raymond