|
Dato(Baga) wrote: How I can do it?
Perhaps by asking a coherent question.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi everyone.
i want use dll in mfc project,without using lib and header file.
please help me.
|
|
|
|
|
If you know the names of the functions in the DLL, then you can just use LoadLibrary() and GetProcAddress().
Darka [ Xanya]
"I am not a slave to a god that doesn't exist."
|
|
|
|
|
aftr than useing GetProcessAddress ,i dont khnow how call function and pass parameters.
|
|
|
|
|
you need to take a pointer to a function that has been exported from DLL ,GetProcAddress in client will be returning that function's address which you need to assign to that pointer.
using this pointer you can call the functionality present in the DLL.
For Ex:
typedef void (* pFn)(int);
pFn fn;
fn=(pFn)GetProcAddress( );
fn();
mpk1979
|
|
|
|
|
tank you very much.
i used dll in my project successfully.
|
|
|
|
|
Hi all .
I have handle of a window . How I can change background color of it .
Thanks .
|
|
|
|
|
I had problems with this long ago when trying to use a HWND. I'm sure its possible though.
The way I know of is to overide this;
Enjoy Colin
BOOL CSampleView::OnEraseBkgnd(CDC* pDC)
{
// Set brush to desired background color.
CBrush backBrush(RGB(255, 128, 128));
// Save old brush.
CBrush* pOldBrush = pDC->SelectObject(&backBrush);
CRect rect;
pDC->GetClipBox(&rect); // Erase the area needed.
pDC->PatBlt(rect.left, rect.top, rect.Width(),
rect.Height(), PATCOPY);
pDC->SelectObject(pOldBrush);
return TRUE;
}
|
|
|
|
|
Thanks for your notice . My problem is that I have only a handle of that window and no it's class . I find its handle with FindWindow API then I can't use OnEraseBkgnd method .
|
|
|
|
|
Follow the sequence
Startup->programs->NortonAntivirus
How to delete Norton antivirus item from Program list?
|
|
|
|
|
Arul Joseph wrote: How to delete Norton antivirus item from Program list?
Right click on "NortonAntivirus" and select Delete from the context menu.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
How to delete the icon from TaskBar Permenantly? for example Mcafee virus is opened? The Virus Icon is displayed in the Tray of the Task bar.
|
|
|
|
|
Go to the program's settings and uncheck the box that says "show tray icon in taskbar" or whatever.
Another way is to uninstall Mcafee
Mark
|
|
|
|
|
hi,
I have created a active x control using MFC.
i want to know how to set or create a property page for a activex control created using MFC.
zari
|
|
|
|
|
My GUI looks not good, what can i do for looking some flashy or classical looks?
|
|
|
|
|
Use picture in background of your wins.
|
|
|
|
|
Hi
In my program, i use read/write mode for file operation. But it not working properly. Code as follows
fstream f("temp.txt",ios::app | ios::in )
kindly help
thanks
KK
|
|
|
|
|
kk.in wrote: But it not working properly
Fine, and we are supposed to guess what is going wrong ? And what you are expecting ?
kk.in wrote: ios::app | ios::in
You know that you will only be able to read the file (and I don't know why you used ios::app here, this is only usefull when writing to the file).
|
|
|
|
|
Hi
The real problem is
I have a text file with some data, I want to edit data from a particular position,it without using temperory file. I try to edit the data and it will added to end of the file ?
thanx
KK
|
|
|
|
|
You need to use the ios::out flag if you want to write something to the file (otherwise it is read-only)
kk.in wrote: I have a text file with some data, I want to edit data from a particular position,it without using temperory file.
You can't do that, you cannot insert data at a certain position (only write on it but you won't be able to insert extra characters).
|
|
|
|
|
kk.in wrote: I have a text file with some data, I want to edit data from a particular position,it without using temperory file.
While you can certainly change text (e.g., replace dog with cat)without using a temporary file, you cannot make the file any smaller/larger without using a temporary file (there are a few exceptions to this).
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i think you need to use fstream f("temp.txt",ios::out | ios::in ), then it will work i think
mpk1979
|
|
|
|
|
I started a thread to perform some decoding function. This is to circumvent the problem of the windows not being able to be updated while the decoding is in progress. The code runs perfect for the first run i.e. it went through the file selection process to the completion of the decoding process.
However, when I want to decode a second file, an assetion failure occurred during or start of the decoding process. I narrowed down the bug to the 'decode' function in the thread function. Everything runs well second or third time with it commented.
Now I know that it is this function causing the problem. This piece of function was running fine when separately called and I went through it many times.
Appreciate if you could give advise on this issue. Any comment will be good.
Snippets of my code:
completed=false;
AfxBeginThread(DecodeThreadProc,pfilename,THREAD_PRIORITY_NORMAL,0,0,NULL);
while(!completed)
{
// Perform the windows update.
}
UINT DecodeThreadProc(LPVOID Paramfilename)
{
decode((char *)Paramfilename);
completed=true;
return 0;
}
searcher08
|
|
|
|
|
pFileName passed in to AfxBeinThreadProc must remain constant the entire time the thread is using the variable.
I suspect it might have been local to some other function calling AfxBeginthread, so you got into trouble there - it was invalid by the time the thread executed and tried to read it.
Any sufficiently gross incompetence is nearly indistinguishable from malice.
|
|
|
|