|
I'm looking for a good method of including Adware ( !Not Spyware )
In a publicly distributed App
Any suggestions on a good method for doing so.
Regardz
Colin Davies
|
|
|
|
|
Hi
I'm wondering since quite some time how do do a really good and fast anti-alias for a very common CView. When I look at Macromedia Flash or Freehand, it looks amazing but how do they do that? Anybody has some code snippets or such?
Daniel
|
|
|
|
|
anti-aliasing is simple in theory:
your drawing algorithm tells you to draw a white (RGB(255,255,255)) pixel at (5.2, 10.4). but because you can't draw pixel at fractional locations, you have to distribute the "white" to the pixels closest to the ideal location.
here's an easy way to do this:
1. pick the four pixels closest to your ideal pixel. if (5.2, 10.4) is your target, choose : (5, 10), (6, 10), (5, 11) , (6, 11)
2. for each of those, find the distance to the ideal pixel (use the simple 2D distance formula d^2 = deltaX^2 + deltaY^2. for the first pixel, the distance is sqrt(0.2^2 + 0.4^2).
3. based on the distance, blend a percentage of the "white" with the color of the current pixel.
4. repeat for every pixel you need to draw.
yes, this will be incredibly slow if you do this with GetPixel and SetPixel.
-c
|
|
|
|
|
Hi
I'm new to ATL Com programming. Recently I found a source code which I need to use, but on compilation there was error C2872: 'ATL' : ambiguous symbol. In the source it refer to the line :-
if (ATL::InlineIsEqualGUID(*arr[i], riid))
Could anyone advise me what really is the problem?
Thank for your time!!!
Cheefarr
|
|
|
|
|
I have a "hello world" situation with a VB COM DLL and an MFC client.
When I switch the VB COM DLL to debug with "wait for component to be created", QI of LPUNKOWN for the default interface returns 0x80004002 (No such interface supported). If I don't run the COM dll in the debugger, everything is fine.
If I use a compiled VB .exe as the client, VB component debugging is supported.
I was told that this is a security related issue, so I went into dcomcnfg and added myself and the interactive user to "Access Permissions" and "Launch Permission" under the Default Security tab. No luck.
Here is the relavent code in the client (hopefully I don't have to start learning about CoInitializeSecurity or get saddled with debugging VB in the VC++ IDE )
CoInitialize(0);
IUnknown* lpUnk;
// this succeeds each time, and hits on Class_Initialize in the debugger
HRESULT hr = CoCreateInstance(__uuidof(WhyDebug::TheObject), NULL, CLSCTX_ALL, IID_IUnknown, (LPVOID *)&lpUnk);
// this fails when the VB component is in "wait for component to be created" state
// and succeeds with the VB debugger switched off.
WhyDebug::_TheObject* pTheObject;
hr = lpUnk->QueryInterface( __uuidof(WhyDebug::_TheObject), (void**)&pTheObject);
|
|
|
|
|
The problem here was I wasn't setting Project Compatibility to Binary. Hence, each time I ran the VB component, a new UUID was being generated for each interface. Duh!
|
|
|
|
|
Help....
How do you force mouse click messages in W95.
MouseEventEx only works under NT is there another way ?
I am creating a small very customized version of a the old W3.1 mouse recorder and this is the point at which I
get stuck...
Thanks in advance
|
|
|
|
|
|
Thanks..
Actually I did look in the help at mouse_event and saw "Windows NT" only then read no further - it refered to MouseEventEx only...
Just goes to show you - read everything carefully...
|
|
|
|
|
Hi,
I'm currently writing an application: the user creates a (one or more) layout, and he/she can place one or more 'text-objects' on this layout. These text-objects are (at this moment) CRichEditCtrl's. I derived my own class from CRichEditCtrl, in which I do some neat stuff (like transparency etc). So far so good.
A (very) nice feature to have in this application would be the ability to rotate these textobjects. Which means, in fact, I have to rotate the CRichEditCtrl itself, since CRichEditCtrl doesn't work with CFont/HFONT (Otherwise, I probably could do something with escapement). Does anyone knows a way to do this?
There are probably some library's that'll do it for me, but I want to stick with CRichEditCtrl. (Unless you know a _very_ good library that does all other cool stuff like word-wrapping as well).
Thanks for reading, I hope you can help me!
--
Alex Marbus
|
|
|
|
|
DWORD WINAPI ThreadProc(LPVOID lpParameter)
{
CDatabase m_db;
try{
m_db.OpenEx("DSN=TestBase;uid=UserName",CDatabase::noOdbcDialog);
}
catch ( CDBException *e )
{
e->Delete();
return 0;
}
m_db.Close();
return 0;
}
void Test(void)
{
for(unsigned u=0;u<100;++u)
{
DWORD ThreadId;
HANDLE hThread = CreateThread (
NULL, 0, ThreadProc, 0, 0, &ThreadId);
CloseHandle (hThread);
}
}
|
|
|
|
|
um, i assume you mean grows in mem size? possibly try declaring hThread before the for loop?
|
|
|
|
|
Hi
My application is a MDI application with multiple form views. I recently have this problem. When I click on Window/New Window menu, it pops up message such as "command failed". Does anyone know why?
Thanks
Sandra
|
|
|
|
|
We have a large project with DLL's that have mutual dependencies. (DLL#1 calls functions in DLL#2, while DLL#2 call functions in DLL#1). When we attempt to build the project we get errors because the each DLL requires the other DLL's lib file before it can link. The MS suggested workaround for this is to run the LIB utility on each project to generate lib files and then link everything together at the end. Unfortunately, VC++ does not appear to support this and to make it work we had to generate and modify make files. This is very error prone and we would prefer to do it some other way.
Has anyone run into this problem before? Do you have a better solution?
Thanks,
Al (acarnali@speedline.com)
|
|
|
|
|
Hi
My application is a MDI application with multiple form views. I recently have this problem. When I click on Window/New Window menu, it pops up message such as "command failed". Does anyone know why?
Thanks
Sandra
|
|
|
|
|
How can I change the row's height of the CListCtrl control ?
|
|
|
|
|
|
please explain me callback specifier.
Advanced thakns.
|
|
|
|
|
Hi,
I need to capture data that sends one old DOS-application to LPT1. I'm intermediate programmer in Visual C++ and I've never write a VXD or SYS driver. Is there other way how to do it?
|
|
|
|
|
The MS docu says that no system-function should be called from within a multimedia-timer callback.
I have the following command in my callback
[...]
system.pBitmap->Redraw_Map();
[...]
pBitmap is a pointer to my own bitmap class and from within Redraw_Map() I have to call BitBlt().
Is this also a system-function call ??? And what is different by using PostMessage() and call my member-function from the event-handler ???
My code works fine ... what can happen after a system-function call from a callback ?
Hope somebody makes this a little clearer to me
Greatings Mario///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
HI ALL
My question about HIWORD and LOWORD ?
I'm always see
LOWORD (wParam) // in WndProc function
some Data Types like
WPARAM , LPARAM ,DWORD
have LOWORD and HIWORD value
I found in MSDN about HIWORD and LOWORD
it tell me it's macros like
#define HIWORD(l) ((WORD) (((DWORD) (l) >> 16) & 0xFFFF))
#define LOWORD(l) ((WORD) (l))
but I can't understand what this mean and what this does
can you tell me please ...
|
|
|
|
|
Thats simple:
usually u use a command like (HIWORD)(lParam) !
That means you want to have the upper 16 Bit from 32.
To get them you have to shift right 16 (>>16) times and mask out the upper 16 Bit ( & 0x0000ffff ).
To get (LOWORD)(lParam) you have to clear the upper 16 Bit. Converting to a new type WORD from DWORD takes only the lower 16 Bit. The effect is the same.
Hope it helps
Greatings Mario///
--------------------
www.klangwerker.de
rocknix@lycos.de
--------------------
|
|
|
|
|
Hi guys,
How to use pop3 protocols in our application.Do u have any code
for that.Do there any win32 api for pop3 protocols.
|
|
|
|
|
POP3 is actually quite easy. You just connect a socket and send some text commands, then retrieve the returned text.
Check out www.rfc.net for the actual specifications.
|
|
|
|
|
I have an array of numbers say array[0]=-10, and array[1]=23. Furthermore, lets say that they represent a most significant bit, and a least significant bit, so in reality the number is
-1023. How do I combine both elements of the array into a signed integer that I can store??
Regards
Mike Zolna
|
|
|
|