|
Yes.I am having a main toolbar. Now i want to attach another toolbar at the end of main toolbar.
|
|
|
|
|
can someone please help me out in this regrad..
im a newbie to c++ and first task is assigned for me..
i have a service running in the network which will send output in XML format..i have to fetch the command from the service and based on the data have to trigger a action in another application.
can i use socket communication programming in c++ to get the xml output or is there any other method i can use.. its very urgent please someone help me asap
|
|
|
|
|
You may want to start with figuring out how the service is
providing the data you need...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Thank you.. they have given in the manual that by sending commands,i ll be able get the response like this
<authorization isloggedin="Boolean" alarm="integer<br" mode="hold">Design=integer Operate=integer AC=integer/>
please help me
|
|
|
|
|
Hello,
I need to use a DLL which was written in Delphi in my VC++ windows forms application. However, Delphi doesn't generate a .LIB file when creating DLL's so I have to create a .LIB file manually. I have already written a .h file for the functions that I need to use. The .h code is shown below.
<br />
1
2 extern "C" { <br />
3 <br />
4 __declspec(dllexport) void* __stdcall CITRemote_create( <br />
5 void *parameters ); <br />
6 <br />
7 __declspec(dllexport) int __stdcall CITRemote_open( <br />
8 void* handle, void* parameters); <br />
9 <br />
10 __declspec(dllexport) int __stdcall CITRemote_close( <br />
11 void *handle ); <br />
12 } <br />
From what I understand I need to create a .DEF file to generate a .LIB file with the LIB command: lib /def:CITRemote.def. The .DEF file I wrote is shown below.
<br />
1 ;File: CITRemote.DEF <br />
2 LIBRARY "CITREMOTE" <br />
3 <br />
4 EXPORTS <br />
5 CITRemote_open <br />
6 CITRemote_close <br />
7 CITRemote_create <br />
The name of the DLL is CITRemote.dll and uses the STD calling convention. After I execute the LIB command, CITRemote.lib and object CITRemote.exp are created. I added the lib and exp file into my project in the 'Resource Files' filter. When i try to call for example the CITRemote_create function, I get the following error:
<br />
Linking... <br />
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification <br />
1>NTP checker.obj : error LNK2001: unresolved external symbol "extern "C" void * __stdcall CITRemote_create(void *)" (?CITRemote_create@@$$J14YGPAXPAX@Z) <br />
1>C:\Documents and Settings\Aartun\My Documents\Visual Studio 2008\Projects\NTP checker\Debug\NTP checker.exe : fatal error LNK1120: 1 unresolved externals <br />
So i guess the implementation of the function isn't found, thus meaning it doesn't link the DLL. But what am I doing wrong, did I miss something?
Thanks in advance.
Note: I'm using Visual Studio 2008 Proffesional and all the files(dll, lib, h, exp and def) are in the same directory.
|
|
|
|
|
You want to change the CITRemote.h file to say __declspec(dllimport) rather than __declspec(dllexport).
You are specifying that you want to export those function from your Windows forms app. Then, when you link, it can't find an implementation for them - because the implementation is in the Delphi DLL....
As an aside - if you were using the linker packaged with GCC, you wouldn't need a .LIB file - it can link directly to DLLs. I've often wondered why Microsoft's linker didn't have that capability.
|
|
|
|
|
i need accuracy as well as i have to interact several time with user interface .if i use multimedia timer for accuracy then it slows my interface response.how could i achieve both accuracy as well as quick response from interface??
i read about queue timer form msdn that it is accurate as well as do not stop window messaging .but when i used this,this is n't accurate..
|
|
|
|
|
If you want a responsive interface while doing some other activity at the same time no matter what that activity is, then you want to run the other activity in a different thread to the UI.
If you're using MFC, look up "worker threads" in the help. That should get you started.
Be warned, though - multi-threaded programming isn't easy. There are lots of pitfalls - deadlocks, bad synchronisation etc. Don't try anything too fancy, just keep your code simple.
|
|
|
|
|
|
Hi...
How to change backgroungcolor and text color of CButton?(do not using seperate class)
can anyone please guide me?
Regards,
G.Paulraj
|
|
|
|
|
gnanapaul wrote: How to change backgroungcolor and text color of CButton
You have to owner draw the button to change the back ground color and text color
gnanapaul wrote: ?(do not using seperate class)
Handle the WM_DRAWITEM [^]message in the dialog and do the painting if the control id matches.
|
|
|
|
|
can you please explain briefly?
G.Paulraj
|
|
|
|
|
gnanapaul wrote: can you please explain briefly?
Yes, see [^].
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]
|
|
|
|
|
gnanapaul wrote: can you please explain briefly?
I means as follows
void CMyDialog::OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct)
{
if( nIDCtl == m_Button.GetDlgCtrlID()) {
return;
}
CMyDialog::OnDrawItem(nIDCtl, lpDrawItemStruct);
}
|
|
|
|
|
Or handle the WM_CTLCOLORBTN message in the parent.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Code-o-mat wrote: Or handle the WM_CTLCOLORBTN message in the parent.
I dont think this message help in changing the color of button. Did you try?
|
|
|
|
|
Yes, you are right, sorry, i forgot it doesn't work for buttons, which is imho a bit lame... and even if it worked, if it comes to XP style skinned, rounded, fancy buttons you can forget about it.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Have a look at WM_CTLCOLOR / CWnd::OnCltColor.
This lets a a dialog control change the brush of a child button (etc).
It gives the the DC that the control will draw into - so you can (I'm fairly sure) also use pDC->SetTextColor at the same time.
Iain.
|
|
|
|
|
Iain Clarke wrote: It gives the the DC that the control will draw into
I dont think so[^]
|
|
|
|
|
You can use of WM_CTLCOLORBTN .See here[^]
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
|
Hi all,
Does ATLASSERT run during release mode? should I enclose it with ifdef debug? Or it doesnt do anything on release mode?
Thanks,
Jayjay
|
|
|
|
|
What about reading documentation [^], [^]?
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]
|
|
|
|
|
The regular answer would be "RTFM".
Greetings from Germany
|
|
|
|
|
Hi programmers!
I have a question on how to attach another window. Here is a little explanation.
I created a Frame in wxWidgets and made it transparent. Now i want to attach it to another window or even better over another Window (WinAPI). I tried SetParent(child,parent) and set my window as a child window of the parent. The problem is that if the parent window updates the view, my window is in a new order and antoher window is over it and mine disappears. Is it possible to set my window over the other window without using SetParent() but my window should appear if the other window appears and disappear if the other window disappears. is it possible?
Thank you very much ans please excuse my bad english
|
|
|
|