|
Windows services don't have message loops or perform hidden windows (usually). I did create a service one time that had a peekmessage loop and a hidden window bag in the good old days.
The best alternative is to use a different socket class that doesn;t depend on theses items.
I seem to remember using
http://www.codeproject.com/internet/casyncsocketex.asp[^]
in a service once. Check it out and see if it works for you or not.
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|
|
Hello,
Using the MoveTo And LineTo function i can able to draw the line but now i want to draw the horizontal or vertical line then what should i do?
|
|
|
|
|
Whenever you draw horizontal line change the x co-ordinate only and when user push left button down then save the y-coordinate and use it for drawing
same case for vertical lines change the y-co-ordinate and persist x co-ordinate
good luck
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Thaks for this valuabe suggestion. Please tell me how give the dimesion to that peritcular entity such as line or rectagle.Hope for ur positive response toward me as am just started to learn MFC.
|
|
|
|
|
MoveTo updates the current position. LineTo will draw a line from the current position to the specified point, and update the current position to the new point
To draw a rectangle, I believe you can do:
MoveTo(0, 0); // initial position
LineTo(5, 0); // draw top
LineTo(5, 5); // draw right
LineTo(0, 5); // draw bottom
LineTo(0, 0); // draw left
Does that help?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
in OnLButtonDown
..
if(MK_SHIFT)
{
if(abs(oldpt.y-newpt.y)>abs(oldpt.x-newpt.x))
newpt.x=oldpt.x
else(abs(oldpt.y-newpt.y)
|
|
|
|
|
Hello All of u,
Using the MFC i am able to draw the various gometric primitives such as line, circle, rectangle. But I want to give them the Dimension then How should i do this?
I am learing MFC from last few days.Guide me.
|
|
|
|
|
What you have to achive..??
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
Hi,
I want to store my application settings in registry, so that on the next launch i can use it [ window size, positioning,etc].
The registry keys has to be such that which can be used by guest users and normal users.
This has to work for all supported OS like Win 2k, Win XP Home and Professional with and without sp2.
Which registry key can i use HKEY_CLASSES_ROOT,
HKEY_LOCAL_MACHINE or
HKEY_CURRENT_USER.
Please suggest.
NancyAsath
|
|
|
|
|
If you want to allow the application settings to all users then simply add the registry keys into HKEY_LOCAL_MACHINE
and
If you want to restrict the application settings to particular users then simply add the registry keys into HKEY_CURRENT_USER
good luck...
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
I ported an application from VC++ to VC++.NET and the application is running fine in debug mode. But the same application is crashing in release mode. How can I determine the cause of it. Can anyone pls help.
---Arun.
|
|
|
|
|
Check the dynamic memory allocations ,array out of bounds etc.
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
We have the same application running in vc++ 6.0 perfectly, but after we have ported it to vc.net the problem surfaces in the release version only.
Is there any difference between vc and vc.net and is this an issue at all?
Pls. help me out.
Thanks,
Arun.
Arun.
|
|
|
|
|
You can re-check member variable, initialize value. In Debug mode & Release mode, initialize of variable is differ
conglt
|
|
|
|
|
Build a release build which contains debug information and debug it.
Steve
|
|
|
|
|
|
Hello
I have this list control in a dialog class:
CListCtrl m_LIST1;
One of the class methods launches a modal dialog after the user selects
some items on the list.
The problem is when it returns, the selected items in the list control
are not painted any more, although the selection is preserved.
To repaint i did what F1 said (see code) but it won't work.
What am i doing wrong?
<br />
void CxwApp::OnWrite() <br />
{<br />
CWriteDlg writeDlg;<br />
writeDlg.DoModal();
m_LIST1.RedrawItems(start, end);<br />
m_LIST1.Invalidate();<br />
m_LIST1.UpdateWindow();<br />
m_LIST1.RedrawWindow();<br />
.....<br />
}<br />
alex
'Architecture is music frozen in space.'
|
|
|
|
|
When you return from dialog
use the following code for list box
int numberSelected = GetSelCount();
if (numberSelected>0)
{
int *selIndex = new int[numberSelected];
GetSelItems( numberSelected, selIndex );
for (int i=0; i < numberSelected; i++)
{
}
}
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
I'm talking about keeping the selection, and just being able to see it again.
alex
'Architecture is music frozen in space.'
|
|
|
|
|
|
Mike:
I agree. But it doesn't (not one, not even all 3).
I see the selection again only if manually I click on one of the list headers.
alex
'Architecture is music frozen in space.'
|
|
|
|
|
Anybody??
I'm really stuck with this one.
Thanks
alex
'Architecture is music frozen in space.'
|
|
|
|
|
Anyone ever try it using command line tools only?
I don't have Visual C++ anymore so I am using the free compiler (which MS released in 2001 or so) thus I have to resort to command line compilation...using MAK files, etc..
Everything is configured properly I think and everything compiles except when I reach resource compilation everything chokes saying cannot find 'msvcrt.lib' which I don't understand because I have setup environment vars for compiler and SDK (which I also downloaded) appropriately I'm sure...???
I just searched my entire HDD drive for that stupid file and only found two:
1) AMD64/msvcrt.lib
2) IA64/msvcrt.lib
Neither of which is my target platform but instead I believe I am using x86 WIN32 as a release build. I just looked into those two directories and noticed only they exist, so I guess that is the way it is supposed to be
Anyone have any ideas?
I've read the apache docs numerous times, so please don't send me those...besides their Windows docs are poor...
Cheers
It's frustrating being a genius and living the life of a moron!!!
|
|
|
|
|
I know about programming questions in the lounge but...
I have been working on a c++ windows forms application project off and on for the past few weeks and i am going nowhere. The part I am stuck on right now is when the user clicks a button, to actually have the button do anything, right now it does nothing.
I am trying Form1::button1_Click and variations to try to make the button work and it is not working and it is driving me crazy...
I have also posted in the c++ forum, but didn't get an answer, hopefully someone here can help me. Thanks.
-- Moved by editor at 0:14 Friday 14th April, 2006
Do not post programming questions in the Lounge.
|
|
|
|
|
http://www.samspublishing.com/bookstore/product.asp?isbn=0672321971&rl=1[^]
Since we can't see your code, or your mouse drags on the IDE it is pretty hard to figure out what you did or did not do. I use DevCPP for GUI design, and most of the guys at work use Visual C++'s designer, without problems. So I know it can be done.
check out the discount shelf at a bookstore, you might find 1st edition for a few bucks.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|