|
Anybody with experiences in deploying CR9 with an application developed in VC 6.0 please help!
I'm pulling my hair out one by one! App should be installed on win98 machines!
I'm using CR9 Crystal Report Viewer Control implemented in my app, with printing, exporting functions as well.
I build my setup package with Inno. I used all the crystal docs could find in the topic of figuring dependencies.
I already have a bunch of files installed. I know the issue with unicows.dll, atl.dll, registering, not registering, etc. When I'm about to show the report in the app, it dies without errormessage.
I already have all the files installed that Dependency Walker shows, same mdac, but still doesn't work.
I developed the app under XP, but since than I installed the VC 6.0 to a win98 machine as well to check dependencies. Is anybody out there who has something similar working on win98? Might be possible to check file versions...
thanks
|
|
|
|
|
Hi, I got through the same problem some time ago and there is the solution. Inno script with Crystal Report Installation.
Crystal Report 9 and 11 Installation - Inno Script
I like Inno since it's fast, easy and you have full control over the whole process. Crystal Report msi package is just pain.
Hope It helps.
|
|
|
|
|
Hi, I am trying to create a simple control which is a subclass of COMBOBOX. So using MSDE 2003, new C++ MFC project, create control based on COMBOBOX.
How do I expose the combobox's existing functions like AddItem in my subclassed control? Do I have to add same method to both ctrl and interface?
Many thanks for any helpful pointers...
Patrick
|
|
|
|
|
What do you mean exactly ? You want that the user of the control will be able to call AddItem (for example) as it was possible to do with the combobox ? If yes, then you don't need to do anything: the class 'inherits' also all functions from the base class.
|
|
|
|
|
Yes, that's exactly what I mean. But currently they do not have any methods/properties/events. I can do things like add the OnClick event though, by adding a "stock" event.
If they should be there already then it means I am doing something wrong - I will see if there is anything obvious I am missing.
Thanks.
|
|
|
|
|
I have a Datatype misalignment issue with one of my dll's.
The thing is that all the code inside the dll used to be in a normal .exe application, but since multiple apps will use the functionality inside it we decided to make it a .dll. When the code was completely in the .exe applications everything went very smooth, now however that I made a dll I got this Datatype misalignment issue.
If I do a step by step debug the crash occurs on a line:
m_zsRow = new char[nLen+1];<br />
with m_zsRow being a normal char* declared in the class header.
Does anybody know how this could happen? And how I can fix this?
Thanks for any help you might provide,
Greetings,
Davy
|
|
|
|
|
GDavy wrote: If I do a step by step debug the crash occurs on a line:
m_zsRow = new char[nLen+1];
Can you show complete function code, having this line?
|
|
|
|
|
Hello,
Well apparantly all that was needed to find the answer myself was to post the question here .
The error apparantly was not located in that function, it was a few steps up in the call-stack. There was memory being allocated like:
char* aString = new char(A_Certain_Length);
so with parenthesis in stead of square brackets. How nobody found that out earlier is a wonder to me... Anyways, fixing this fixed the problem. I don't know why this caused the Datatype misalignment error though.
Thanks anyway,
Davy
|
|
|
|
|
OUCH!
char* aString = new char(A_Certain_Length);
What is aString after executing that??
|
|
|
|
|
I am developing a NTService program. And I want to know when any user logs into the system. Is there any kind of message sent to the application program when a user logs in.
|
|
|
|
|
Check out ISensLogon::Logon() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have to put some graphical functions to an dialog-based application using MFC/GDI/GDI+.
One of them is to give the user the abbility to write text-comments on a image.
Like you can do in MSPaint (and Photshop, GIMP ... ).
I found thats relatively easy to parse the mouse - and keyboard input and simply write it to screen (using Graphics DrawString - Method), but it seems to be not trivial to enable editing of the written text (blinking cursor when double-clicking on the text ie).
Or setting up a correct-sized (and blinking ) cursor to signalize, that the app is ready to parse keyboard input.
So, does someone got a idea how to implement MSPaint-like text input on CWnd?
Searched for 2 days for demo-projects or smth like that, no success at all.
Thanks in advance and sorry for my ******* english.
|
|
|
|
|
Hope I understood your question
You draw a image on screen and now you want to write on the image and also you need to modify image.
Maybe this way isnt good but its possible.
You draw your image when you want to write a text on image use of a editbox for gets text and transfer your text when it finish to a external image if you need to modify this text again use of editbox for it.
But maybe you ask I need to write this text on image and also location of text is important,not problem when you click mouse on screen create editbox on it location and set external image on this location when you want to close app or close image write these texts to Main Image.
(You need to arrays for save these text or texts and also location of these texts)
|
|
|
|
|
Hi,
In order to get movable and resizable edit control for placing texts on an image, just search CodeProject website for articles explaining "double subclassing".
Regards
|
|
|
|
|
Hi all,
I read a double (2.567656e-010) from file,
then I convert it into CString and finally i
put it in an edit control, but the value is too small
so in the edit control i find 0.000000.
Here you have the code i use, toremove is
the variable linked to the edit control:
double var=0;
std::fstream f_load;
f_load.open("C:\\best_pop.txt",std::ios::in);
f_load>>var;
CString tmp;
tmp.Format("%lf",var);
toremove.SetWindowText(tmp);
What should i do to see 2.567656e-010 in the edit control ?
|
|
|
|
|
Use
tmp.Format("%g", var);
It should work.
|
|
|
|
|
|
And also you can use of wsprintf
|
|
|
|
|
Hi all!
Look.
typedef (WINAPI *TextOutAType)(HDC,int,int,LPCSTR,int);
TextOutAType oldTextOutAaddr=0;
//here is ourself function
BOOL WINAPI MyTextOutA(HDC hdc, int nXStart, int nYStart, LPCSTR string, int cbString)
{
MessageBox(0,string,"aha",0);
return oldTextOutAaddr(hdc,nXStart,nYStart,string,cbString);
}
BOOL HookApiTextOutA(const HMODULE hModule)
{
IMAGE_DOS_HEADER *pdos;
IMAGE_NT_HEADERS *pnt;
IMAGE_DATA_DIRECTORY *pSymbolTable;
IMAGE_IMPORT_DESCRIPTOR *pimport;
pdos=(IMAGE_DOS_HEADER*)hModule;
pnt=(IMAGE_NT_HEADERS*)((DWORD)pdos + pdos->e_lfanew);
pSymbolTable=&pnt->OptionalHeader.DataDirectory[1];
pimport=(IMAGE_IMPORT_DESCRIPTOR*)((DWORD)pdos + pSymbolTable->VirtualAddress);
while(pimport->FirstThunk){
IMAGE_THUNK_DATA *pold,*pnew;
pold = (IMAGE_THUNK_DATA*)((DWORD)pdos + pimport->OriginalFirstThunk);
pnew = (IMAGE_THUNK_DATA*)((DWORD)pdos + pimport->FirstThunk);
while(pold->u1.Function){
if(IMAGE_ORDINAL_FLAG != (pold->u1.Ordinal & IMAGE_ORDINAL_FLAG))
{
IMAGE_IMPORT_BY_NAME *pname;
pname = (IMAGE_IMPORT_BY_NAME*)((DWORD)pdos + *((DWORD*)pold));
PROC *ppfn=(PROC*)(pnew->u1.Function);
if(strcmp("TextOutA",(char*)pname->Name)==0)
{
oldTextOutAaddr=(TextOutAType)(ppfn); //here is system API "TextOutA" address
DWORD addr=(DWORD)MyTextOutA;
DWORD written=0;
DWORD oldProtect=NULL;
VirtualProtect(&pnew->u1.Function,sizeof(DWORD),PAGE_WRITECOPY,&oldProtect);
WriteProcessMemory(GetCurrentProcess(),&pnew->u1.Function, &addr,sizeof(DWORD), &written);
}
}
pold++;
pnew++;
}
pimport++;
}
return TRUE;
}
Now,when we use TextOutA,it's using "MyTextOutA" first in fact.
TO: Mark Salsbery,this isn't a joke.
IcyGaze, hope make friend with you~
|
|
|
|
|
It seems you could solve your problem
|
|
|
|
|
Haha! Cool
So that works for other processes?
Great to know there's no inter-process protection.
Geez no wonder UNIX guys make fun of Windows!
Nice one!
Mark
|
|
|
|
|
I would like to highlight the state of the button when pressed; i.e. show its 'ON' then reset its state when pressed again - 'OFF'. The following code does not quiet do what I require and I have looked at the methods and not found anything that would do.
void CTabOne::OnBnClickedRelayButton()<br />
{<br />
if(m_bRelayState)<br />
{<br />
m_cRelayButton.SetState(FALSE);<br />
m_cRelayButton.SetWindowTextA("OFF");<br />
m_bRelayState = false;<br />
}<br />
else<br />
{<br />
m_cRelayButton.SetState(TRUE);<br />
m_cRelayButton.SetWindowTextA("ON");<br />
m_bRelayState = true;<br />
}<br />
}
Any suggestions please.
Andy.
|
|
|
|
|
you should use either a Radio button or a checkbox button with the pushbutton style.
|
|
|
|
|
you can write this in your void CTabOne::OnBnClickedRelayButton() function
<br />
CString text;<br />
m_cRelayButton.GetWindowText(text);<br />
if(text == "OFF")<br />
{<br />
m_cRelayButton.SetState(TRUE);<br />
m_cRelayButton.SetWindowText(_T("ON"));<br />
} <br />
if(text == "ON")<br />
{<br />
mm_cRelayButton.SetState(FALSE);<br />
m_cRelayButton.SetWindowText(_T("OFF"));<br />
}<br />
i think this should do
hope that it would help
a.hemdan
|
|
|
|
|
If you have a button I sugget use of a checkbox.
|
|
|
|