|
The instance of New_dialog_box that you have in MyProgView.cpp is not the same one that is instantiated in CPage4::OnBnClickedRadio10().
|
|
|
|
|
keegan wrote:
Now, back in MyProgVew.h, i tried putting in the constructor of CMyPropgView the line:
m_new_dialog_box.new_dialog_edit = 0;
That won't work, I'm even surprised it did not crash, since you obviously try to change values of a CDialog which has still no handle.But anyway, what you should do is set up the edit boxes to 0 in the OnInitDialog function of your dialog class, that is in New_dialog_box::OnInitDialog()
~RaGE();
|
|
|
|
|
i put m_new_dialog_box.new_dialog_edit = 0;
in my onInitDialog for New_dialog_box, but it says that m_new_dialog_box is an undeclared itdentifier. i can't put it in
class New_dialog_box: public CDialog<br />
{<br />
DECLARE_DYNAMIC(New_dialog_box)<br />
<br />
public:<br />
New_dialog_box m_new_dialog_box
if i cant put it there, where else am i going to put it?
THanks for all your responses.
*.*
|
|
|
|
|
What do you want to do there ?? You cannot declare a class within itself !
Just declare a new_dialog_edit variable like this:
class New_dialog_box: public CDialog<br />
{<br />
<br />
public:<br />
int new_dialog_edit;<br />
Then initialize it at 0 in the constructor:
New_dialog_box::New_dialog_box()<br />
{<br />
new_dialog_edit = 0;<br />
...
|
|
|
|
|
holy cow, that works.
Basically, i was getting confused because i was dealing with PreopertySheets in my first case, and normal dialog boxes in the second. I was using m_sh to do something that i don't need to do with just a normal dialog box.
I knew it was something simple, and now i understand what i was doing incorreclty.
thanks
*.*
|
|
|
|
|
I would like some assistance in writting a program that draws a shape in the screen by reading the coordinates of the shape (from a comma delimited ascii file). For example it must read the coordinates of a straight line and automaticaly plot the given line i,e the coordinates 0,0 1,1 2,2 3,3 4,4 should result in a straight line. I'm using ms visual c++ version 6.0
The progoram is coded using the doc/view architecture.
Thanks
|
|
|
|
|
hi there,
first of all u will have to decvide on which event u have to draw i mean after clicking the button oe any thing like that ..
then just read the file and get the point..
the main thing starts here.
what u have to do is create a pen by calling create pen and pass the appropirate parameters.
then get the clientdc .
using the dc please call select object and pass the pen which is created in the above step .
and then using this dc call the function moveto and lineto for drawing a line
bye
TAKE CARE
best luck
Thanx
TAKE CARE
|
|
|
|
|
The MFC sample app Scribble does something very similar to what you are trying to do (though, not from a CSV). It might be worth a look.
onwards and upwards...
|
|
|
|
|
Hello Friends,
I wnat to start my application when ever it detct the live internet connection.
How can i detect the live internet connection?
Thanks
|
|
|
|
|
raghute_h wrote:
How can i detect the live internet connection?
There are a couple of ways. One is to detect when a modem dials, but that only works for dial-up connections. For LAN connections, you can try to connect to a remote system, eg. Ping a server that you know exists. It you can get to the server, then the internet connection is active. If you can't it doesn't necessarily mean that the connection is not active - the server might be down, so you have to ping a few servers, such as microsoft, google, yahoo, msn etc. If all of them don't work, then you can reasonably assume that the internet connection is not working. If one of them works, then the connection is definitely working.
Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
See if this helps:
http://www.pcausa.com/resources/InetActive.txt
|
|
|
|
|
Here's one way:
bool canConnectTo (LPCTSTR url)
{
DWORD flags = 0;
if (InternetGetConnectedState (&flags,0)) {
if (InternetCheckConnection(url, FLAG_ICC_FORCE_CONNECTION, 0))
return true;
return (false);
}
return (false);
}
Sample usage:
if (canConnectTo (_T("http://www.google.com")) &&
canConnectTo (_T("http://www.yahoo.com"))){
}
} /ravi
Let's put "civil" back in "civilization"
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
That's easier than my way, although basically the same at the lowest level
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
I have to develop an application that sends a serial packet
with a period 20 millisec.
Does WindowsNT support this performance ???
If I develop a specific driver, can I reach my target, or
20 millisec is to short also for a driver ?
Are there some solutions to have a Real Time-like performance
in WinNT ??
Thanks a lot !!!
|
|
|
|
|
[edit] See WiB's message for information on how to do this using Windows NT. It requires Windows itself to be modified, so with standard Windows it's still not possible [/edit]
Anonymous wrote:
Does WindowsNT support this performance ???
That's not an easy question. If your 20ms period must be exact, or else you get errors, then the answer is "no", Windows NT is not that accurate in its scheduling.
If the 20ms period is an average, then the answer is "maybe". A lot depends on the system load, and the other applications that are running. If this is a one-off system, then you might be able to measure the exact performance of the system, but Windows is inherently unstable and may do funny things at any time.
It may be better to use a cheap PC running Linux to handle the packet transmission, hooked up to a standard Windows PC running your application as a front-end only.
Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
Anonymous wrote:
Are there some solutions to have a Real Time-like performance
in WinNT ??
you can use RTX - real-time extention for Windows NT core from Venturcom
|
|
|
|
|
Hi all,
I want to trap keys through A to Z I am using VK_A to VK_Z. but it does not recognize it at all..
is there any other way of doing it..
Please I need to do it..Any help and pointers are thoroughly appreciated..
Thanks in advance..
Himanshu
|
|
|
|
|
Not clear from where u want to trap the keys. if it is from ur app dialog just use ON_WM_KEYDOWN - OnKeyDown msg handler. Otherwise, if u want system wide key trap , see documentaion of the API SetWindowsHookEx.
Best wishes..mil10
|
|
|
|
|
Like it says in winuser.h
/* VK_0 thru VK_9 are the same as ASCII '0' thru '9' (0x30 - 0x39) */
/* VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' (0x41 - 0x5A) */
Example...
void CMyCtrl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
if( nChar == 'A' )
{
}
}
|
|
|
|
|
hi!
i want to use IAccessible interface and other Accessibility interfaces.
when i compile .cpp file the complie error is "IAccessible' : undeclared identifier"
in msdn its specified that we IAccessible is declared in "oleacc.h" and use "oleacc.lib"
so i made an entry of oleacc.lib in
"Project->Settings->Link->object/library modules"
but still i am getting the same error.
next i tried
#import "oleacc.lib" in the .cpp file
the compile error is
"Cannot open type library file: 'oleacc.lib'"
so whats the way out?
thanks
anshu
|
|
|
|
|
I have soem queries regarding component versioning.
I had a component named "Old_Component" exposed as an STA, out-of proc COM server, developed in VC++. This is wrapped by another component "Old_Component_Wrapper" which is in-proc COM server and exposed to client.
Now we are planning to provide new version of our product.
In new version, we are thinking of removing the wrapper layer. That is we want to expose "Old_Component" to client instead of "Old_Component_Wrapper". Can you tell me is this possible? Or what can be the possible issues in doing this?
|
|
|
|
|
I want to make a combobox with bitmap items.
<br />
m_list.Create(IDB_BITMAP2, 50, 0, RGB(255,255,255));<br />
m_Lang.SetImageList(&m_list);<br />
<br />
COMBOBOXEXITEM cbItem;<br />
cbItem.mask = CBIF_IMAGE;<br />
cbItem.iItem = nItem;
cbItem.iImage = nImageIndex;
m_Lang.SetItem(&cbItem);
Like upper coding or another mehod, please give a help to me.
|
|
|
|
|
Hi!I have a strange question about the Vector.
I want to use vector in my project,but when I try to build my project.
Occur the errors like this:
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2061: syntax error : identifier 'THIS_FILE'
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2091: function returns function
c:\program files\microsoft visual studio\vc98\include\new(35) : error C2809: 'operator new' has no formal parameters
What can I do? I really want to use vector,use the STL container,but seems the VC++ not support the STL containers,anyone can help me? thank's
|
|
|
|
|
Did you add this line before defining any variable of type vector?
using namespace std;
A. Riazi
|
|
|
|
|
Move the include above the macro mess (redefinition of the new operator) that is added by MFC. You should end up with something like...
#include "stdafx.h"
#include "DlgDummy.h"
#include "DlgDummyDlg.h"
#include <vector>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
using namespace std;
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|