|
It is the most simplest thing to do in programming live,
here it goes, create an array of all the strings taht you want to compare with,
then in a loop compare with each string and do appropriate action.(you can build your logic around this)
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
How about switch... case... statement?
Although to be honest I like the idea of strings' array better. Unfortunately, it's not mine. .
modified on Monday, November 29, 2010 6:02 AM
|
|
|
|
|
|
|
Where to get "sys/ioctl.h"???
Thank you!!!
Rap off for you,for me,for our human.
|
|
|
|
|
It won't matter whether you get it or not, unless you deleted it by accident. That's because the header files contain only declarations of functions, not their implementation.
I think sys/ioctl.h is a *nix header, if you're on windows you have little chance to compile the program (without many modifications to the code).
|
|
|
|
|
hi ,
i have a dialog based application in which i would like to incorporate the CMemDC concept ... can i use it???]
Thanks
Satadru
|
|
|
|
|
if you habe CMemDC Class
onpaint()
{
CCLientDC dc(this);
CMemDC pDC(&dc);
//Draw Using pDC , Simple enough
}
|
|
|
|
|
hi , thanks for your kind help....
i have the following problems... would be gratefulif you could kindly give me some suggestions.....
1)i have a dialog based application in which i have to implement a scroll view .. can i use CSrollView(i suppose i cant)..if not how do i do it..if yes then how do i do it
2)i have to capture the entire image irrespective of being within the viewable region or not ....how do i go about it....
plesae help...
Thanking you.
Satadru
|
|
|
|
|
Hey,
is it possible to connecta network-drive (e.g. "\\mypc\mydata" as drive e as I can do it within my windows-explorer.
|
|
|
|
|
hello !!
how to get the absolute path(full path) for the file which is printed ???. i m getting the file name with type of document in one element of JOB_INFO_* structure. but could not get the absolute path of it .....how to get the absolute path ...??
skpanda
|
|
|
|
|
I have to develop a multithread application.
My problem is to wait the closure of all threads
when I close my application.
I have seen that WaitForSingleObject can be used
also for threads ? Is it possible that, suppling
the thread handle to this function I can solve my
problem ?
In another way I have used an event set by the thread
when it is going to exit (the application waits for
this event after having wake up the thread) but this
solution causes a application blocking (deadlock).
Can someone help me ???
Thanks a lot !!!
|
|
|
|
|
afaik you can use the WaitForSingleObject / WaitForMultipleObjects to wait on thread handle for it's closure.
|
|
|
|
|
Hello-
I would like to build an interface with dockable pieces to it. These pieces probably most closely resemble a dialog box. That is, they have several controls as components.
I would like to construct the pieces by code -- without the dialog editor. I'm quite new to all of this, so I may be attacking this the wrong way, but I am looking at the CDialogBar class which is at least a start for dockable dialogs, but doesn't allow creation without a resource ID.
Is there a better approach? How can I create a CDialogBar without a resource ID?
|
|
|
|
|
hi,
Its good that i experienced the same problem. And found the solution for myself. This really works:
Here is the header file :
class cSmithChart:public CDialog
{
public:
int m_iChartSize;int m_iLineColor;
cSmithChart();
~cSmithChart();
void drawSmithChart();
afx_msg void OnPaint();
DECLARE_MESSAGE_MAP()
};
The implementation file :
cSmithChart::cSmithChart():CDialog()
{
DLGTEMPLATE *tmplate = new DLGTEMPLATE[4];
DLGTEMPLATE tmpl;
tmpl.cdit=0;
tmpl.style=DS_NOFAILCREATE |WS_CAPTION | WS_SYSMENU;
tmpl.x=0;
tmpl.y = 0;
tmpl.cx = 500;
tmpl.cy = 500;
tmpl.dwExtendedStyle=0;
tmplate[0] = tmpl;
tmplate[1].style=0;
tmplate[1].dwExtendedStyle=0;
int nresult = InitModalIndirect(tmplate,NULL);;
if( nresult == 0)
{
int error = GetLastError();
AfxMessageBox("Dialog Creation Failed");
}
};
cSmithChart::~cSmithChart()
{
};
BEGIN_MESSAGE_MAP(cSmithChart, CDialog)
ON_WM_PAINT()
END_MESSAGE_MAP()
void cSmithChart::OnPaint()
{
CDialog::OnPaint();
drawSmithChart();
}
void cSmithChart::drawSmithChart()
{
//Draw the smithchart
}
AS you could see i solved this for drawing a smithchart, which was a distributed .Lib file..
This is a production code. See if it works for you.
Good Luck.
John Silvester A
Asst. Manager -Projects,
SRA Systems Ltd., Chennai India
|
|
|
|
|
I want to enter in yahoo messenger window from my application i.e. login screen will be somehow skipped. Although I am trying to employ message hook, but don't know what to do and how to do.
|
|
|
|
|
Hi,
If you want to know more about hooking, try the article search! this[^] is just one out of many..
good luck!
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
the link which U gv doesn't work. Moreover I am looking for Message Hooking
|
|
|
|
|
strange! The link works fine for me..
|
|
|
|
|
I am trying to send float value using Sendmessage
the source is following
float lpar = MAKEPARAM( wkpoint.x, wkpoint.y );
SendMessage( mycontrol -> m_hwnd, WM_LBUTTONDOWN, 0, lpar );
the target I want to send to is
OnMouseDownMyCtrl(short Button, short Shift, float X, float Y)
when I call sendmessage and it invokes onmousedowmyctrl event, however
what i get for x and y is totally different from wkpoint.x and wkpoint.y
any help is appreciated.
|
|
|
|
|
you can convert float to string and then pass the string value(address)
or you can pass the address of float
|
|
|
|
|
Thanks for your post.
If you want to conver from float to string, I have to change the parameter for OnMouseDownMyCtrl. I can't not do that since we have already put a lot code inside of this function
OnMouseDownMyCtrl(short Button, short Shift, float X, float Y)
|
|
|
|
|
float *pfVal = new float;
*pfVal = MAKEPARAM( wkpoint.x, wkpoint.y );
SendMessage( mycontrol -> m_hwnd, WM_LBUTTONDOWN, 0, (LPARAM)pfVal);
delete pfVal;
try it and let me know wheather it worked?
My God is more powerfull Than Your God. (the line that divides the world)
|
|
|
|
|
Thanks for your post.
Looks like it fails at SendMessage() and can't go to the even function OnMouseDown
I am still trying.
Regards,
|
|
|
|
|
Would you help me to get the line features that near a pont?
For example, I had gotten a point pt(x,y), how could I get the line features that near the point? thanks advance.
|
|
|
|