|
It uses memory from the global heap. It's no problem to alloc 50MB with malloc()
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Yo.
How can I paint on a CDialog wnd a *.gif picture, without using CHtmlView.
I want *.gif cause' I can use pics with transparent bkgrnd.
(I know howTo with *.bmp, that's not the case)
10x in advance,
\/*** Bar-Cochva ***\/
|
|
|
|
|
You'll need GDI+ or a third party library to use gif, and if you do, beware the evil Unisys license. Otherwise, the MSDN explains how to do transparency masking on the fly, I have an article up at the WDJ site on how to do it as well, or if you're not targetting W95 you can use TransparentBlt ( you'll need do download the SDK if you don't have it ).
If you use GDI+, you don't need GIF, it also has transparent drawing built in.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
What's the proper way of assigning a STL string value to an MFC CString or vice versa? Can you do that?
|
|
|
|
|
CString str;
std::string x;
str = x .c_str ();
x = (LPCTSTR) str;
That should work.
|
|
|
|
|
CString mfcStr;
string stlStr;
mfcStr = stlStr.c_str;
stlStr = /*(LPCTSTR)*/mfcStr;
*** Alphose from OZ ***
|
|
|
|
|
Hi,
I am newbie writing a small SHAREWARE program.
I want to control my software with time limts.(Ex: 30 days, or 2 weeks or Turn off some features after 30 days)
How to accomplish that?
I appreaciate any information regarding this.
thanks
Ravi
|
|
|
|
|
You can get the current time at setup and save it to file or reg and to check if in time limited range get the current time at program runtime substracted by the time in the file. The result should be less than the time limited range. All time will be in the format of the number of millseconds since 1/1/70(i think it 1970) and the results is just in millseconds.
Real World Coding:
POP& BuyAPop(Money ADollar){...};
|
|
|
|
|
Looks like good idea.
I have one more question, as I am exploring other options too..
How some shareware programs work with checking serial numbers logic. Ex: If you enter the code, it will go and check at their website, is that number legit or not.
thanks
Kant
|
|
|
|
|
Most shareware progs that ask you to enter a regcode have some kind of algorithm to check if its a valid serial number. Actually ther's not much pointing in writing a complicated function because for a cracker it just adds to the fun.
Nish
|
|
|
|
|
Actually ther's not much pointing in writing a complicated function because for a cracker it just adds to the fun.
Why not, I have made some pretty complicated algoritms for my serial numbers. Why make it easy for the crackers?
If they wanna crack one of my applications, they have to be good and work for it.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
They'll just crack out your serial-number algorithm.
If I had to write a demo-version I would write one WITHOUT the limited code so that nobody could crack it but order
|
|
|
|
|
I'm having difficulty getting my VC6.0++ ATL->ActiveX Server Object EVENTS to show up in Intellisense (all other methods show up).
*I made sure ConnectionPoints were checked when i made the object, so I have an _IFunkyEvents Implementation thingy
*I right clicked on my "CFunky" and clicked "Implement Connection Points", which made a CProxy_IFunkyEvents<class t="">
*I added events to _IFunkyEvents, I compiled before I tried to "Implement Connection points", and then I did it, and I would recieve an error about:
;;CONNECTION_POINT_ENTRY(IID__IFunkyEvents)
*I changed IID__IFunkyEvents to DIID__IFunkyEvents and that stopped that error... <shrug>
Is this a "common stupidity thing"? Any clues as to what I'm doing wrong when I'm going through those wizards?
SHABBA!!
|
|
|
|
|
Microsoft has documented that as a bug in the wizard.
Thanks for the help,
Bill
|
|
|
|
|
Hey Guys
Does anyone know why i would get these errors all i have done is create a dialog with a tree view.given the treeview a variable and added an image list.
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.h(22) : error C2146: syntax error : missing ';' before identifier 'm_tSignersView'
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.h(22) : error C2501: 'CTreeCtrl' : missing storage-class or type specifiers
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.h(22) : error C2501: 'm_tSignersView' : missing storage-class or type specifiers
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.h(36) : error C2146: syntax error : missing ';' before identifier 'm_imageList'
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.h(36) : error C2501: 'CImageList' : missing storage-class or type specifiers
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.h(36) : error C2501: 'm_imageList' : missing storage-class or type specifiers
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.cpp(31) : error C2065: 'm_tSignersView' : undeclared identifier
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.cpp(50) : error C2065: 'm_imageList' : undeclared identifier
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.cpp(50) : error C2228: left of '.Create' must have class/struct/union type
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.cpp(51) : error C2228: left of '.SetImageList' must have class/struct/union type
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.cpp(53) : error C2228: left of '.InsertItem' must have class/struct/union type
F:\Development\C++\Programs for Companys\Trustis\Software to Sign and Verify Files\ViewSigners.cpp(53) : error C2059: syntax error : ')'
Error executing cl.exe.
cheers
Peter
|
|
|
|
|
You havent included afxcmn.h . Pop in in stdafx.h
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Cheers i suspected it wouldbe something simple like that.
|
|
|
|
|
How to redirect IExplorer when the page that the user wanted to see is not found and the page of MSN search engane is shown instead, not to be shown the page of MSN but to redirect to some other page.
Thanks.
|
|
|
|
|
You need to handle the "Navigation Error" from DWebBrowserEvents2.
You should write a BHO for this purpose
|
|
|
|
|
Can anyone tell me how to hide or show a toolbar on the MainFrame window from another thread. When I do something like:
frmMain->m_canvasToolBar.ShowWindow(SW_SHOW);
the function returns FALSE. And when I try to use:
frmMain->ShowControlBar(&frmMain->m_canvasToolBar, TRUE, FALSE);
the application crashes deep down inside the MFC core.
|
|
|
|
|
I would post a user defined message from the thread to the main frame.
In the main frame, have a message handler that calls ShowControlBar();
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
Hi all,
What is wrong in this code, for exception handling ?
try
{
m_Database.Open(........);
}
catch(CDaoException *e)
{
e->ReportError();
e->Delete();
exit(0);
}
Does i must define m_Database as pointer ?
Please help me !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
help? how?
what's the problem?
-c
#define O 0.05
#define I(c) putchar(c)
main(){int I(int);double l[6];char lO[5];for(*(lO+1)=0;*(lO+1)<'2';I(0x0A),(*(l+5))=-25*O+((*(lO+1)
)++)*O)for((*(lO+2))=0;(*(lO+2))<'2';(*(l+4))=-40.*O+((*(lO+2))++)*O){for((*(l))=(*(l+1))=0,
*(lO)=1;++*(lO)&&(((*(l+2))=((*(l))*(*(l))))+((*(l+3))=((*(l+1))*(*(l+1))))<4.);(*(l+1))=(*(
l))*(*(l+1))+(*(l+5))+(*(l+1))*(*(l)),(*(l))=((*(l+2))-(*(l+3)))+(*(l+4)));I((*(lO)?42:0x20));}}
|
|
|
|
|
Hi again, thanks for your reply ...
Problem is: when my Exception Handling found error show error message to me ... (That is correct).
But when i hit OK button, it crashes !
Why ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Take a look at the call stack and try and figure out what line is causing the crash.
Nish
|
|
|
|