|
This example seems to write both server and client in ATL, is it possible to write the server in C#, or does that complicate things ?
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
Christian Graus wrote:
is it possible to write the server in C#, or does that complicate things ?
Yes. In fact you can write the server in any programming language, as long as you have a valid SOAP library.
However, I've tried only the opposite combination: ATL server and C# client. It worked just fine, and I assume (but cannot guarantee) that your case will be fine too.
|
|
|
|
|
The web service will return an xml which you can "consume" in normal c++.
Jason Henderson My articles
"The best argument against democracy is a five-minute conversation with the average voter." - Winston Churchill
|
|
|
|
|
which function can capture mouse and cursor events of system?
is it possible to capture their shapes (i.e. Arrow or user icon of mouse, cursor shape in different edit)?
thx
includeh10
|
|
|
|
|
It sounds like you are needing a system-wide hook. See if SetWindowsHookEx() works.
|
|
|
|
|
Forgive me if I am using the wrong terminology.
By system tool bar I mean the bar that defaults to the top of each application. The bar that host the minimize, maximize and close buttons.
Two questions.
(1) what is this area of the screen correctly called? Is it the frame?
(2) Can you point me towards an article that would show me how to add a button to this bar?
thanks
|
|
|
|
|
McGahanFL wrote:
Can you point me towards an article that would show me how to add a button to this bar?
There actually is one here on CodeProject about that!
I don't remember where because it was like hell to find it when I was searching for it!
Happy searching! (if not somebody post the link)
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Hi,
I have a DlgApp that launch other applications. When the user click on a button, a popup menu is created with some data that I have collected in my database. The user then need to select an item into the menu. The selected info is used as parameters to launch the other app.
This is my click button handler:
void CmyDlg::OnBnClickedBtnDbmanager()
{
CMenu myMenu;
CRect rect;
m_wndDBBtn.GetWindowRect(&rect);
monMenu.CreatePopupMenu();
monMenu.AppendMenu(MF_STRING, 0, "Name1");
monMenu.AppendMenu(MF_STRING, 0, "Name2");
monMenu.AppendMenu(MF_STRING, 0, "Name3");
monMenu.AppendMenu(MF_STRING, 0, "Name4");
myMenu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON, rect.left+20, rect.top+20, AfxGetMainWnd());
}
I would like to know how I can get the index of the menu. For example, if I select name4 into the menu, I would like something to tell me that the fourth item is selected... After that, I can use GetMenuString() to retrieve my data and launch my other App.
As you can see, unstead of ID as second parameter into AppendMenu() I have 0. The reason of this is that I dont know how many info I will have to put into my menu, so i can't provide ID for each of them.
Any Ideas?
Everything's beautiful if you look at it long enough...
|
|
|
|
|
a) Specify the index as second parameter in AppendMenu
b) use TrackPopupmenuEx, and specify TPM_RETURNCMD in the flags.
The return value will contain the value passed as second parameter to AppendMenu
c) NEVER EVER use an User Interface String (such as the one displayed in the menu) directly for further processing. Don't do that. Never. it is not done.
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
MemLeak wrote:
I would like to know how I can get the index of the menu.
Assign the menu items unique IDs starting with 1 and incrementing. Add the TPM_RETURNCMD flag to TrackPopupMenu() and it will return the ID of the item the user selected, or 0 if he cancelled the menu.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
Anyone know of a problem with the old fprintf function? I have been using it for years now and all of a sudden during some testing it has started to crash inside the call.
|
|
|
|
|
iltallman wrote:
I have been using it for years now and all of a sudden during some testing it has started to crash inside the call.
Could you be trying to reference a memory location that no longer exists?
-Nick Parker
|
|
|
|
|
No. I looked in the debugger at all the data and attributes - it all looked good with appropriate NULL ending strings
|
|
|
|
|
well -- fprintf works fine for me when I don't do something boneheaded.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Santa Cruz Networks / VidiTel / Reality Fusion (pick a name -- may change at any moment)
|
|
|
|
|
I had a case once, where I did something like this.
<br />
char *str = GetSomeInputString();<br />
fprintf( F, str );<br />
worked pretty well, but would crash once in awhile when someone put a %s.
changed it to:
fprintf( F, "%s", str );
all is well.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Santa Cruz Networks / VidiTel / Reality Fusion (pick a name -- may change at any moment)
|
|
|
|
|
fprintf has always worked well for me. Except when I did something boneheaded like you point out.
Sometimes I have done things like
int i = 8675309;<br />
char *str = GetSomeString()<br />
fprintf(F, "%s", i, str);
|
|
|
|
|
Robert Little wrote:
int i = 8675309;
Reminds me of a song!!
|
|
|
|
|
I've done that too.
None of us are exempted from bonehead mistakes..... I've certainly had my share, and unfortunately they seem to be the most difficult to track down...
It's my guess that the writer of this question made some boneheaded mistake....
Have fun!
P.S. I don't really consider fprintf to be old....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Santa Cruz Networks / VidiTel / Reality Fusion (pick a name -- may change at any moment)
|
|
|
|
|
A common problem with formatting is that the parameters don't match the formatting string, and VC++ doesn't do a check to see if they match.
Elaine
The tigress is here
|
|
|
|
|
I've been trying to use the MSComm serial communications control with a Doc/View architecture but can't seem to find a way to access the OnComm windows message directly in the View class... Can it only be accessed from a dialog class? (I though adding an object of the control in the View header file (CMSComm m_comm;) would allow me to "see" the OnComm windows handler in Class Wizard.
Using the MSComm control in a dialog box is fairly easy... you bring in the control and double click on it in the dialog box to add the OnComm message handler to your dialog box class. What if you don't want the dialog box sitting on your view...I'd like to respond to serial port data and draw lines on the View.
|
|
|
|
|
Hi,
When I use window, if I right click on the desktop, there is a menu that display refresh,copy, paste etc..
I would like to be able to do something similar to that. In a DlgApp, if I click on a button, I would like to see a menu appear from witch I can choose data. What kind of control do I have to use?
Any ideas on how to achieve that?
thanks
Everything's beautiful if you look at it long enough...
|
|
|
|
|
see TrackPopupMenu in the documentation
|
|
|
|
|
|
I have been working on an application that displays data in various labels and textfields.
How can I size the application to the correct dimensions video card settings (display settings)?
thanks,
sj
|
|
|
|
|
Call GetSystemMetrics with the following:
SM_CXSCREEN,
SM_CYSCREEN
|
|
|
|