|
This has to be because of memory allocation/deallocation problem. In debug mode, it is taken care of automatically, but in release mode, we may need to be careful about initializing variables, allocating space, deallocating space, etc. Can you do a debug session and post the code which fails?
|
|
|
|
|
|
Seems that it is the problem withe library u r using!!
Make sure with u r linked with apropriate build of that DLL u r using!!!
means
Debug ver appllication link Debug or Release Version
Release ver appllication should link with Release Version
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
I want to derive a class from CColorDialog in which I need to set the dialog color to black and the Title bar should be removed.
Can anybody give me an example
|
|
|
|
|
like this
<br />
class CMyDialog: public CColorDialog<br />
{<br />
public: <br />
DECLARE_DYNCREATE(CMyDialog)<br />
CMyDialog();<br />
~CMyDialog();<br />
DECLARE_MESSAGE_MAP()<br />
<br />
};<br />
<br />
<br />
---------------------<br />
IMPLEMENT_DYNCREATE(CMyDialog, CColorDialog)<br />
<br />
BEGIN_MESSAGE_MAP(CMyDialog, CColorDialog)<br />
END_MESSAGE_MAP()<br />
<br />
CMyDialog::CMyDialog()<br />
{<br />
}<br />
CMyDialog::~CMyDialog()<br />
{<br />
}<br />
whitesky
|
|
|
|
|
I think u dont need to derive a class from CColorDlg to give a back color
Check Here[^]
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
but i think its better if derived CColorDialog
whitesky
|
|
|
|
|
if he only want to do set color he can do it by defining a simple brush at OnCtlColor function. Why should we take unwanted services for our application.
I think he want to set back color for his dialog. actually the CColorDialog is used fo rcolor choosing purpose naaa? I think we can use it services to get teh color selected. no need to derive a new class.
im not sure whether me and he is talking about same problem
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
he said (I want to derive a class from CColorDialog) and then change text
whitesky
|
|
|
|
|
Hi all
I am working on an app that creates a wizard via the CPropertySheet.
I need to change the displayed pages depending on the answers to questions along the way.
I thought if i called OnWizardNext, and return the dailog identifier
it would work
LRESULT CMyPage2::OnWizardNext()
{
return IDD_PPAGE5;
}
but it doesnt, anyone any ideas ?
si
|
|
|
|
|
You are right and I don't find any problem in your code
Just check if you had add the page corresponding to IDD_PPAGE5 before the property sheet is created.
Regards
Anil
|
|
|
|
|
when im trying to register a OCX im getting following error
"The specified module could not be found".
what may be the reason?
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
SaRath C wrote:
when im trying to register a OCX im getting following error
"The specified module could not be found".
The Module used by OCX is not found at the time of registering, mainly it is libaray file!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
thanks for the reply. here net has some problems so I could not see ur answer. it could have save my time
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
The Issue has resolved. the OCX was using another DLL and was in not in the current path or system32.
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
This occurs when an ActiveX control is
not registered, or a dependent dll cannot be found.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
Hi all,
I need to copy a string which may contain NULL characters in between. I may run a loop but I just wanted to know if there is any other way to do this. Normal function like strcpy and all will stop reading after it encounters a NULL since it assumes end of string when it reads NULL.
NOTE: I am using plain C.
|
|
|
|
|
Aljechin wrote: NOTE: I am using plain C.
strncpy or memcpy should help.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
strncpy will not work:
The strncpy function copies the initial count characters of strSource to strDest and returns strDest. If count is less than or equal to the length of strSource, a null character is not appended automatically to the copied string. If count is greater than the length of strSource, the destination string is padded with null characters up to length count.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Cedric Moonen wrote: strncpy will not work:
Yeah it won't. Was just a blind hit. Was not sure about it. Read the docs now. Sorry for that.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
<br />
char szSource[23] = {"Before\0After"};<br />
char szDest[23];<br />
<br />
ptr = memcpy(szDest,szSource,22);<br />
printf("%s %d",szDest,strlen(szDest));<br />
Hi, may i please request you to just try this code and comment on why memcpy is failing? Is it the way it goes or am I wrong somewhere? Can you suggest some workaround? Thanks for your time.
|
|
|
|
|
Aljechin wrote: Hi, may i please request you to just try this code and comment on why memcpy is failing? Is it the way it goes or am I wrong somewhere? Can you suggest some workaround? Thanks for your time.
Sure! Please look up memcpy in MSDN. There is a working demo there.
See you were saying that szSource contains NULL characters right? So strlen won't work because it will return when it finds the first null character. Same with printf and other functions. They all return when the first NULL character is found. So if your string is...
"Nibu\0is a\0\0\0good\0boy\0". strlen will return 4 . printf will print only Nibu
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Thank you so much. I will surely check that example and get back to you with the problem status.
peace homie
|
|
|
|
|
Aljechin wrote: ptr = memcpy(szDest,szSource,22);
Use 12 instead.
Aljechin wrote: printf("%s %d",szDest,strlen(szDest));
This is highly dependent on szDest being nul-terminated. Using memcpy() implies that you are not treating it as a nul-terminated string.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Thank you so much.
|
|
|
|