How to find the width of a String (in pixels) in WIN32
Can you measure the width of a string more exactly in WIN32 than using the GetTextMetrics function and using tmAveCharWidth*strSize? ...
Can you measure the width of a string more exactly in WIN32 than using the GetTextMetrics function and using tmAveCharWidth*strSize? ...
I've read the documentation for ReadDirectoryChangesW() and also seen the CDirectoryChangeWatcher project, but neither say why one would want to call it asynchronously. I understand that the current thread will not block, but, at least for the CDirectoryChangeWatcher code that uses a completion port, when it calls GetQueuedCompletionSt...
I'm trying to create a Windows hook, specifically to catch HSHELL_WINDOWCREATED messages. However, my hook proc never gets called. My dll has a function to install the hook: hHook = SetWindowsHookEx(WH_SHELL, (HOOKPROC)CreateWindowHook, hinst, 0); hinst was filled in by DllMain(), at the DLL_PROCESS_ATTACH message. CreateWindowHook i...
Is .NET better than Win32 or the othe way around? Which would be the pros \ cons of both, in what situations one would be better than the other. Has Microsoft released .Net as a replacement for Win32? I am not asking about the amount of projects needed to be maintained, but about new projects being developed, and which would be better f...
I would like to verify a signed executable. The requirement is to validate that the executable itself is valid and where it came from (probably from the subject of the cert). The cert type is PKCS. I found a similar posting here, http://stackoverflow.com/questions/301024/validate-authenticode-signature-on-exe-c-without-capicom The Mi...
I found similar questions but no answer to what I am looking for. So here goes: For a native Win32 dll, is there a Win32 API to enumerate its export function names? ...
Environment: Win32 for Windows Mobile using C/C++ (VS2008) I need a clean and reliable method of updating some GPS coordinates (or other data) to a web server using http. Currently I've been using the following piece of code: wsprintf (threadParam.wszLocInfo, L"%s/LOGGPS/?U=%s&LAT=%.07f&LNG=%.07f&V=%s", ...); HANDLE hHTTPthread = Cr...
hey everyone, I have a subkey in my registry with an unknown numbers of values. I want to get all the data from those values in th specified subkey. how can I do that ? I don't know the names of the values and the number of values. I'm programming in C. thanks! ...
I am new to Windows programming and I'm trying to discover the best way to check for the existence of Windows Shell API functions. I want to use some of the new taskbar features in Windows7. http://msdn.microsoft.com/en-us/library/dd378460%28VS.85%29.aspx#custom_jump_lists But I still want my program to be usable by previous versions o...
I have a video decrypter library that can decode an obsolete video format, and returns video frames in BMP and audio in WAV through callback functions. Now I need to encode a new video in any standard format under windows. What might be the standard way to do this? I am using Win32/C. I guess Windows has its own encoding library and dr...
One of our applications fails on computers that are controlled via pcAnywhere because the ImageList_Add() WinAPI function fails to add the image/mask after some time. The function returns -1 and the number of icons in the imagelist doesn't change. On all other computers this is no problem. What is interesting is that we can add 99 bitmap...
Code Snippet: LPRASCONN lpRasConn = NULL; RAS_STATS *lpStatistics; lpRasConn = (LPRASCONN ) calloc (sizeof(RASCONN),1); lpRasConn->dwSize = 0x53c; lpStatistics = (RAS_STATS *)calloc(sizeof(RAS_STATS), 1); // Call RasEnumConnections with lpRasConn = NULL. dwCb is returned with the required buffer size and // a return code ...
I have the exe for the project im working on signed by a digital signature which means when it asks for admin rights it shows the company name. This works very well but if you modify the exe it will still work and show unknown there instead. Is there a way to check the digital signature to see if it is valid when you run the exe to avo...
When I press F5 and source was modified, my Visual Studio doesn't rebuild the source and runs the existing (out-of-date) executable. I need to press F7 then F5. How do I tell msvc to auto-rebuild when I press F5? This is MSVC 2005, C++. ...
Hello there! I have two screens. one created in vb and the second is in WPF. I must embed the vb inside the wpf. Therefore i had an idea to firstly create a new Windows Form's form, and to use win32 API function "SetParent" in order to embed the vb screen inside the windows form. Secondly, host the winform inside the wpf form using ...
I've been tasked with going through a database and checking all of the links, on a weekly schedule. I normally work in PHP, but doing this in PHP would be very slow (it actually would timeout the page after about 100 URLs), so I decided to make a quick C++ app. Admitidly, I haven't used C++ since college, so I'm a bit rusty. I found th...
I have a mobile application with versions run on TabletPCs (Win32) and Rugged PDAs (Windows CE, Windows Mobile 4 & 5). Are there any SDKs out there that I can use that will work with a range of cameras across these operating systems? On Windows CE I can use SHCameraCapture which will work with built in cameras, but typically not with e...
Our application is using mshtml. That dll is causing our application to exit ungracefully due to well known problems in mshtml since we don't install newer browsers on users' machines. We just use what they have already. The SetUnhandledExceptionFilter() does not handle this, nor does a try/catch block around the calls into mshtml. The...
I have a windows form application which needs to be the TopMost. I've set my form to be the TopMost and my application works as I'd like it to except for in one case. There is a 3rd party application (referred to as player.exe) that displays SWF movie files on a portion of the screen that popup on top of my application. Using Process ...
We have a dedicated Windows XP system running our VC++ application, full screen. We want to protect general user from access system resource via our application. We plan to add authorization to our VC++ application. Whenever user try to access system resource, he/she needs to pass the authorization check first. If we can use existing Win...