|
|
i want to create a mfc application which will display a html page in the dialog,
and it contains a button in the html page,when i click it, it will show a messagebox with the massage "hello world!".
how to implement it?
who knows? please help me, thank you very much!
|
|
|
|
|
Off the top of my head, I'd look at CDHtmlDialog ."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
|
i am new in programming and i'm facing this problem.
i have a main frame. and i have a ToolStripMenuItem in my Main Frame. For this menu item, i put a code as below: (1example)
// loadToolStripMenuItem
//
this->loadToolStripMenuItem->DropDownItems->AddRange(gcnew cli::array< System::Windows::Forms::ToolStripItem^ >(2) {this->fromLibraryToolStripMenuItem,
this->newToolStripMenuItem});
this->loadToolStripMenuItem->Name = L"loadToolStripMenuItem";
this->loadToolStripMenuItem->Size = System::Drawing::Size(137, 22);
this->loadToolStripMenuItem->Text = L"Load..";
// ((this is a declaration))
......
((and i put the coding somewhat like below**because i couldnt find the right code))
private: System::Void fromLibraryToolStripMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
loadfromlib.h ^ openfiledialog = gcnew loadfromlib();
openfiledialog->ShowDialog();
}
when i tried to run the system; in main frame, when i click the ToolStripMenuItem, it does oppened the child frame, but it didnt work well. when the child frame is still opened, i can also click another ToolStripMenuItem as well.
i hope somebody can understand my problem and can help me solving this problem.. please, and thanks in advance...
|
|
|
|
|
|
hi.. i want code for desinging a compiler for a new language in c..plz help ...send code to this forum...
|
|
|
|
|
pavithraram wrote: hi.. i want code for desinging a compiler for a new language in c..plz help ...send code to this forum...
This is a very dumb question.
Building a compiler usign the C language is really difficult (even if the 'new' language is simple). You should start reading books about compiler construction (for instance the famous 'dragon' book [^]) and consider using tools such flex and bison (see, for instance [^]).
Moreover, asking for the code 'for a new language' (what language?) is really silly.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Never expect a code from a forum, expect a help.
Compiler designing and development is a very complex activity, i don't think, it is good choice to ask about it.
Firstly learn about compiler.
I am sending some of the website that may help u understand the vastness of compiler design.
[^]Величие не Бога может быть недооценена.
|
|
|
|
|
You forgot to say that it was urgent
Seriously, you really believe that someone will write a full compiler for you for free ? On which planet are you living ?
|
|
|
|
|
pavithraram wrote: send code to this forum
I don't think so.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
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
Holy crap Wes! Now there's something we could agree on.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Rajesh R Subramanian wrote: we could agree on
Oh good! Of course I wasn't aware that we disagreed on anything... 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
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
|
hi. i want a double cheeseburger, hold the mayo, and a lemonade. thanks. send it to this forum.
while you're at it, get all that for everyone here on the forum. and i'd also like to order blueprints for the design of a mansion. thanks.
just a word of advice, code is not part of the design, it's implementation.
|
|
|
|
|
Me think coding the compiler is the least of your problem.
anyway, read this, it's essential reading for anyone who want to write compiler. :
Principles of Compiler Design[^]Watched code never compiles.
|
|
|
|
|
Hi,
Kindly read the guidelines[^].
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Hi,all.
I got a serious problem when doing ownerdraw listview with a fixed position background image in win32.
In my code, i try to use ListView_SetBkImage, but unlucky, the image itself will also scroll with scrollbar.
I also try to draw a image in NM_CUSTOMERDRAW, this can't work either, the background paints wrong.
do someone know how to solve this problem or provide some good solution?
thanks all very much for your's great help.I'm a fish
|
|
|
|
|
Please provide a reaction for WM_ERASEBKGND
and draw your image there... virtual void BeHappy() = 0;
|
|
|
|
|
Dear Eugen:
thanks very much for your greate help,but it will flick,now i find a better solution
first i subclass my listview and handle LVM_SCROLL message with a invalidate action,it works better.
by the way, i draw the background in CUSTOMDRAW function.
thanks again.I'm a fish
|
|
|
|
|
Hi!
So I have posted this question a while back but has some additional information since I am still stuck on this problem. Here is what is supposed to happen on a server:
1) SQL Server receives request from a client
2) SQL Extended procedure launches DLL
3) Launcher DLL launches Server EXE
4) Server EXE executes Server DLL attached to it to process command
Now testing this on my environment (Windows XP Service Pack 3, Core 2 DUO @2.33GHz, 2GB of RAM) and another test server (Windows Server 2003 R2 Service Pack 2, Xeon CPU @3.0GHz, 3GB of RAM) by triggering the request event (from #1) 2x simultaneously works. The request is being handled in parallel by the server. I can see that there are different instances of Server EXE (#3) being created per request.
The problem is with another server environment that we have (Windows Server 2003 R2 Service Pack 2, Xeon CPU @2.5GHz, 3GB of RAM). No matter what happens, there is always 1 Server EXE being created (checked this through Process Explorer by Sysinternals) and for the next requests received, the machine just adds a new thread on the same existing Server EXE process (checked this through logs, GetCurrentProcessId and GetCurrentThreadId APIs). This is a problem, since there is only 1 Server EXE, that means that all threads are also sharing the attached Server DLL to it. Making the requests being processed sequentially instead of in parallel.
I have read about this and it seems to be a multi-tenant behavior on the machine but I don't know why the machine behaves that way. Anyone has any idea/clue on this problem? I'm on a dead-end right now. Thanks!
Note:
As an additional information, in Launcher DLL (in #3), here is an overview of the code being executed when called:
<br />
HRESULT hr = ::CoInitialize(NULL);
.<br />
.<br />
ServerEXEPtr ptrServerEXE;
hr = ptrServerEXE.CreateInstance(__uuidof(ServerEXEPtr));
.<br />
.<br />
ptrServerEXE->ExecuteServerCommand(param);
ptrServerEXE.Release();<br />
.<br />
.<br />
::CoUninitialize();<br />
|
|
|
|
|
Please compare the registries of the server on the both machines virtual void BeHappy() = 0;
|
|
|
|
|
Hi Eugen!
Thanks for your reply. I am currently comparing both the register of both machines, and the difference is really big right now (used compare tool on the saved registry settings). Might I know what specific settings should I look for or compare? Thanks again!
|
|
|
|
|
It could be something like "singleton"
or ..\CLSID\{..}\SingleUse
Can you find any usage of DECLARE_CLASSFACTORY_SINGLETON
in your servers code ?virtual void BeHappy() = 0;
|
|
|
|
|
Hi Eugen,
I have checked the registry and as with the Singleton or SingleUse, there is none. I also checked the code and there is also none of DECLARE_CLASSFACTORY_SINGLETON.
The thing is, the code works on other environment except for this one machine that we have. I am checking the way the thread in the application is being created. Seems to have something to do with CoInitialize on whether the application should be as an apartment thread or multithread. Anyway I'm gonna follow that lead first..
Thank you for your help!
|
|
|
|