|
I don'tknow - I've never used that linker switch. You'll have to give it a try and see if it works. My concern is if you use other functions in the DLL, will it try to link every function in that DLL that you may use. In other words, what will it do when it loads that DLL but doesn't find a member of the list of required functions in the DLL? The unsupported function is still going to be in the list, even with this linker option.
As I said, I've never used delayed loading and don't know the internals of how it handles the list of functions required. You're going to have to try it to see if it works.
Good luck. Let me know if it works - it would make life simpler. If it does work, check and see if you call other functions (at runtime) that are contained in the DLL, and post that info also.
Judy
|
|
|
|
|
I need to add a dialog to a project that only has available the Standard Windows Library.
I am at the point where the dialog displays and the progress bar updates. I need to add changing the text in a Label.
I don't know what command to send, and how to specify the text.
The dialog is created with:
<br />
HWND hwndProgressDialog = CreateDialog(hinstance,<br />
MAKEINTRESOURCE(IDD_DIALOG_EM),<br />
GetDesktopWindow(),<br />
EMProgressRoutine);<br />
Here is the code that updates the progress bar:
<br />
hwndProgressBar = GetDlgItem(hwndProgressDialog, IDC_PROGRESS_EM);<br />
SendMessage(hwndProgressBar, PBM_SETPOS, (WPARAM)ProgressCount, 0);<br />
To update the lable text, I assume I get a handle to the Label ID in similar fashion and do another SendMessage. But, what is the comparable command to PBM_SETPOS for setting text and how to specify the text itself?
Thanks for any help.
|
|
|
|
|
You can use the SetWindowText() API (or use a WM_SETTEXT message directly) to set a control's text.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
Thank you, Mark. SetWindowText works. Can you tell me, if I used the WM_SETTEXT in a SendMessage, how would I specify the text?
|
|
|
|
|
Never mind. Figured it out.
|
|
|
|
|
theFrenchHornet wrote: hwndProgressBar = GetDlgItem(hwndProgressDialog, IDC_PROGRESS_EM);
SendMessage(hwndProgressBar, PBM_SETPOS, (WPARAM)ProgressCount, 0);
Mark Salsbery has already suggested you the right answer. I just wanted to suggest that, in case sending message to dialog items, you can use API SendDlgItemMessage . Your code will be reduce like this,
SendDlgItemMessage(hwndProgressDialog,IDC_PROGRESS_EM,PBM_SETPOS, (WPARAM)ProgressCount, 0);
Prasad
MS MVP - VC++
|
|
|
|
|
Thank you, Prasad. Your method looks more intuitive.
|
|
|
|
|
I had created game using Form, and 2 arrays of pictureboxes. I make everything, but it go very slow, so I asked my theacher how can it make faster, he said what it some function, that make project of game faster, but he didn't know hier names. So I tried search in msdn but fuond nothig. Can anybody help with this functions ?
I using visual studio c++.
|
|
|
|
|
thesad wrote: ...some function, that make project of game faster...
You mean there's a magical function that we can call that will automatically make our code faster? Cool!
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I suspect that would be the undocumented RunFaster( double howMuch ) function.
|
|
|
|
|
thesad wrote: so I asked my theacher how can it make faster, he said what it some function
Time to whack the teacher.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
thesad wrote: anybody help
Get your money back
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
|
|
|
|
|
hi
plz help me
i don't know how i can create a hidden process
thanks alot
|
|
|
|
|
|
You shouldn't want to or be allowed (by the OS) to do so. The user has a right to know what software is running on his computer. Are you trying to write a virus?
Steve
|
|
|
|
|
Can you explain why do you need to hidden proccess ?
|
|
|
|
|
hi
plz help me
i don't know how i can create a hidden process
or show a hidde process in the process list
thanks alot
|
|
|
|
|
Hello All ?
can anyone please tell me what's wrong with following code?
<code>class A
{
public:
A(const string& s)
{ }
string f()
{
return "hello world";
}
};
Class B : public A
{
private:
string s;
public:
B():A(s=f())
{ }
};
void main()
{
B obB;
}</code>
Thank you,
sanket patel
|
|
|
|
|
Is this a quiz? Why don't you first tell us what problem you are having.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
oh I am sorry!
whenever I try to run this code my program crashes.
I dont know what is wrong with it?
sanket patel
|
|
|
|
|
sanket.patel wrote: ...my program crashes.
Where? The term "crash" rarely means anything useful.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I am sorry again!!
But I dont know why this code is not executing.
I know there is some problem with my understanding of the code.
so I just want to know that Where I am wrong?
Thank you
sanket patel
|
|
|
|
|
Have you tried:
class A
{
public:
A() {}
A(const string& s) {}
string f()
{
return "hello world";
}
};
class B : public A
{
private:
string s;
public:
B()
{
s = f();
}
};
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thank you David!!
the code you show is working fine!
so can you please explain me where I was wrong ?
sanket patel
|
|
|
|
|
In class A, does it still crash if you make the f() method static? You are using A's method before A is ctor'ed. It looks like it shouldn't matter, but who knows, maybe some static consts are not available until after the first inst of the class is created? Sounds doubtful, doesn't it.
|
|
|
|