|
Ok, the problem is that your while loop consumes all the computation time, thus blocking your whole application. One solution could be to place a Sleep(500) call inside your loop, choosing an appropriate sleeping time. This gives your application the possibility to go on in processing during your sleep time.
You could also place your call to RemoveSlider inside a worker thread, passing a pointer to your htmlview as parameter. And then you could work with an event, which could be set when your page is loaded, and your thread waits for this event by WaitForSingleObject.
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
|
|
|
|
|
Schlaubi wrote:
One solution could be to place a Sleep(500)
I have trying this but during the Sleep(1000) the page is not loaded it's freezing.
Schlaubi wrote:
You could also place your call to RemoveSlider inside a worker thread, passing a pointer to your htmlview as parameter. And then you could work with an event, which could be set when your page is loaded, and your thread waits for this event by WaitForSingleObject.
I hoped there is a solution without thread but if there isn't i'm trying this.
Thx !
|
|
|
|
|
now I have another problem.
so, I created main dialog window and have another window which serves like "send message" dialog in ICQ(it show's me messages received from another users), so how can I activate it dynamicaly after message receive, and don't activate if it was active, mean how to check in this situation whether my dialog is active. thanks.
|
|
|
|
|
One solution is a pointer. Check for NULL.
Kuphryn
|
|
|
|
|
Hi,
It maybe a simple problem. I download a MSVC6.0 project from the internet. Some problems ocurred when i try to compile and
debug it.
First, the project can only compiled with release version, (i cannot change the compiling mode due to=> from the settings menu, the debug and release combobox is grey). If i want to compile it with debug mode how should i do?
In addtion, when compiling the project, I got the following error:
HC5011: Error: mlva.hpj :
Cannot open the file "C:\Program Files\Microsoft Visual Studio\VC98\MFC\include\afxhelp.hm."
I have cheched the file, there is afxhelp.hm indeed. Why cannot open? Hope get your helps!
Thanks a lot!
chen
|
|
|
|
|
Could you create your own workspace, then copy/port the application from internet to your workspace and compile. This way you have more control of the project settings.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
Hi,
The successful by re-creating the project. Thanks a lot!
|
|
|
|
|
Hello all. I have a little issue that I'm unsure of how to do. I have a bunch of dlls that are used by various applications. I have 1 application though which needs to call some functions located in ALL the dlls. My problem is how do I dynamically Load and Unload the Dlls from this application so that my app will still run if there are NO dlls present?
What do I have to do to allow this? Any help on the matter is grealy appreciated.
Thank you.
Dan Willis
|
|
|
|
|
|
Check out the LoadLibrary API. To retrieve the address of the function you need to call, use the GetProcAddress API with the handle returned by LoadLibrary .
Have fun.
|
|
|
|
|
Doh!
I knew it was simple one. 1 more question. I thought there was some linking option that I needed to turn on or off to force a dynamic load of the dlls. Is this true, or does the adding of the Load Library take care of that issue?
Once again, Thanks alot!
Dan Willis
|
|
|
|
|
You should prototype your export functions with extern "C" in order to avoid name mangling. Anyway, take a look at the DLL's link map or export list to make sure the functions do get exported with human-readable names (the ones you will have to use in GetProcAddress ).
Have more fun!
|
|
|
|
|
Even Better! Woo Hoo!
Another question to have even more fun!
How do I look at the dll link map and/or export list?
Dan Willis
|
|
|
|
|
Try this: go to the Project Settings dialog (Alt+F7), select the Link tab, in the Category combo choose "Debug". A checkbox named "Generate mapfile" should be there. Use it when compiling your DLL, and look for any generated .MAP files on your output directory. These are text files.
|
|
|
|
|
Ok,
Great! Thank you soo much! I really appreciate this! It helps me alot in there becuase sometimes the MSDN just gives a little bit too much information and/or it can be difficult to find exactly what you are looking for.
I greatly appreciate your time Joao (I can't make the squiggly).
Thanks!
Dan Willis
|
|
|
|
|
Anytime! This is the spirit of the CodeProject. You cannot imagine how much I learn here everyday, so I feel as my obligation to return some back.
João Paulo
|
|
|
|
|
Use the Dependency Walker tool (Depends.exe). It should be part of your VC++ studio installation.
Art
|
|
|
|
|
Well, I'm having fun, more fun, wahoo! now I'm stuck again. Here's my exported function declaration:
EXPORT char *get_compile_date();
And here's what I'm doing to get it:
typedef LPSTR (CALLBACK* LPFNDLLFUNC1)();
LPSTR strResult;
HINSTANCE hToDLL;
LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer
hToDLL = LoadLibrary(app);
// If the app doesn't exist, then forgettaboutit
if (app == NULL) return NULL;
sprintf(dllVersionString,"%s compiled on ",app);
lpfnDllFunc1 = (LPFNDLLFUNC1)GetProcAddress(hToDLL,"get_compile_date");
if (lpfnDllFunc1 != NULL)
{
// call the function
strResult = lpfnDllFunc1();
if (strResult == NULL) return NULL;
}
I get the dll handle back fine, but the GetProcAddress always returns NULL. Here's the line in the mapping file from the dll containing that function:
0001:000110a0 _get_compile_time 100120a0 f timestamp.obj
What am I doing wrong here that is causing the GetProcAddress to fail?
Dan Willis
|
|
|
|
|
At a glance you need to change:
if (app == NULL) return NULL;
to:
if (hToDLL == NULL) return NULL;
-------------------------------------
Art
|
|
|
|
|
how to check if a a handle - file handle, pipe handle, thread handle etc - is available?
thx
includeh10
|
|
|
|
|
|
How can i change my window into arabic style ?
which means by default the window is left to right change it to right to left
Manikandan Balachandran
|
|
|
|
|
I have installed .NET but it seems to be running alot slower than 6.0 did. Is there a way of speeding it up??
Also, how do I get the class view, resource view and solution explorer as one view. They are all separate at the moment..
Thanks,
grahamoj.
|
|
|
|
|
grahamoj wrote:
Also, how do I get the class view, resource view and solution explorer as one view. They are all separate at the moment..
Drag the windows which are separately (docked?) to the place where you want them to be, f.i. drag the resource view over the place where the tab of class view is situated.
We are men. We are different. We have only one word for soap. We do not own candles. We have never seen anything of any value in a craft shop. We do not own magazines full of photographs of celebrities with their clothes on. - Steve
|
|
|
|
|
grahamoj wrote:
I have installed .NET but it seems to be running alot slower than 6.0 did. Is there a way of speeding it up??
VS.NET consumes much more memory than VS6, that is something you need to get used to, but don't say you were not warned, review the system requirements and recommondations for VS.NET, they are high.
I turn-off Dynamic Help, I think that might help a little.
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|