|
Um, sorry, I thought you had some devices in mind.
So yes... if you want to send data via Wifi, you're going to need an emitter and a receiver. You should browse manufacturers of such devices and read the docs on their devices.
|
|
|
|
|
Hi,
OK, thank you very much, Earl. One last question, Any suggestion, please?
Thanks so much again.
|
|
|
|
|
Sorry, no -- it's not really what I do. Besides, it's going to depend on what type of sensors you have, how much data, how far, etc. Your best bet is probably to find integrated devices, though I do think there are wifi boxes that will let you run code on them that talks over serial, etc. Expensive though.
|
|
|
|
|
Hello everybody,
I want to add string values to combobox and in the Data tab i added the srings separating with a semi-colon.In the styles tab i set the Type to dropdown.But while executing i didn't get values.what was the mistake i did?
Please help me.
tejaswini
|
|
|
|
|
hi tejaswini,
u should not do like that.
if u seperate the strings with semicolon, it will come as one string.
if u want multiple strings Ctrl + Enter
|
|
|
|
|
tejaswini.g wrote: But while executing i didn't get values.
It is working fine for me. Is it in the dropdown?
|
|
|
|
|
|
Yes me toooooooooooooooooooooooooooooooooooo.
|
|
|
|
|
voorugonda prashanth wrote: u should not do like that.
if u seperate the strings with semicolon, it will come as one string.
this is first one
voorugonda prashanth wrote: Yes me toooooooooooooooooooooooooooooooooooo.
This is second one... seems contradictory to each other.
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
It's not working with me.It's not with dropdown.I think it's with the version.
I am using visual studio6.0.
And I got solution with Ctrl+Enter.
It's working fine.
thank u
tejaswini
|
|
|
|
|
You said that you have the combo box with Type as drop down and adding string in the data box.
Did you go to the resource editor. Click on the arrow button of the combo box and then drag it down to some size to show the drop down list.
If not you will need to do so . Everything else works.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
In visua studio 6, you should specify the data seperated by "new lines" not with semicolon. you can use Ctrl+Enter for the same purpose.
In Visual Studio 2003, in the property page, we can't add data in new lines, hence we specifies it using ";"
Seems it's clear
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
How we change the shape of the Button, please help me
thank you,
kanth
|
|
|
|
|
|
The question is slightly deviated but related to buttons and dynamic control, so hope i get some clue.
I like to autosize the owner draw button depending upon the text that it load dynamically based on localization strings. so some strings are large than others. Keeping this I override DrawItem in the inherited class from CButton.
The sample code is below
void CMyGraphicButton::DrawItem (LPDRAWITEMSTRUCT lpDrawItemStruct)
{
CString cs;
CString cslong;
ASSERT(lpDrawItemStruct->CtlType == ODT_BUTTON);
LPCTSTR lpszText = (LPCTSTR) lpDrawItemStruct->itemData;
if (!lpszText || lpszText == (LPCTSTR)-1)
{
GetWindowText (cs);
}
else
cs = lpszText;
// now i m trying to resize , so let try to increase the size of button unconditioally
// I get
//lpDrawItemStruct>rcItem.left =0
//lpDrawItemStruct>rcItem.right =75
//lpDrawItemStruct>rcItem.top = 0
//lpDrawItemStruct>rcItem.bottom = 25
//As my button is on extreme right side of dialog so i tried to extend/increase the size of
// button of the left side as follows
lpDrawItemStruct>rcItem.left -= 25 ;
// but the above causes the text to be moved on right side insead of resize/increase the
//button size.
Any idea or help is appriciated.
Thanks
Anil
}
[AKS]
|
|
|
|
|
why CPaintDC not used in other than OnPaint()?
|
|
|
|
|
for a WM_PAINT messaege we do the drawings withing BeginPaint and EndPaint.
CPaintDC calls BeginPaint at construction time and EndPaint at destruction time.
From MSDN:
CPaintDC objects encapsulate the common idiom of Windows, calling the BeginPaint function, then drawing in the device context, then calling the EndPaint function. The CPaintDC constructor calls BeginPaint for you, and the destructor calls EndPaint. The simplified process is to create the CDC object, draw, and destroy the CDC object. In the framework, much of even this process is automated. In particular, your OnDraw function is passed a CPaintDC already prepared (via OnPrepareDC), and you simply draw into it. It is destroyed by the framework and the underlying device context is released to Windows upon return from the call to your OnDraw function.
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
hi sarath,
why it is not working if i use CPaintDc in onLButtonDown()?
|
|
|
|
|
Now again i use from MSDN
From the MSDN
The CPaintDC class is a device-context class derived from CDC
whitesky
|
|
|
|
|
hi all plz tell me with example plz.........
i have a question in four parts:-
i want to know how
1)i can change the style of button ,
2)a picture or like this is placed on button,
3)and can a button is placed on title bar.
4)change the color of button and its text
plz tell me example for this its a request......
plz...........
Ashish Dogra
MCA
Noida
|
|
|
|
|
You can derived CButton class and use WM_DRAWITEM in this event you cahnge color and or draw one bitmap on button with dc handle
whitesky
|
|
|
|
|
sir can you give some example which clear this
Ashish Dogra
MCA
Noida
|
|
|
|
|
set OwnerDraw from Button to true in property window and include AtlImage.h
class CMyButton : public CButton
{
public:
CMyButton();
virtual ~CMyButton();
protected:
virtual void DrawItem( LPDRAWITEMSTRUCT lpDrawItem );
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnClose();
CImage m_Image;
};
CMyButton::CMyButton()
{
m_Image.Load("d:\\0.bmp");
}
CMyButton::~CMyButton()
{
}
BEGIN_MESSAGE_MAP(CMyButton, CButton)
END_MESSAGE_MAP()
void CMyButton::DrawItem(LPDRAWITEMSTRUCT lpDrawItem)
{
CDC dc;
CString Str;
CRect Rect(lpDrawItem->rcItem);
dc.Attach(lpDrawItem->hDC);
GetWindowText(Str);
dc.SetBkMode(0);
if ( (lpDrawItem->itemState& ODS_SELECTED) )
{
dc.FillRect(Rect,&CBrush(RGB(255,255,255)));
dc.FrameRect(Rect,&CBrush(RGB(0,0,255)));
dc.SetTextColor(RGB(0,0,0));
dc.DrawText(Str,Rect,DT_CENTER|DT_SINGLELINE);
}
else
{
dc.FillRect(Rect,&CBrush(RGB(53,97,200)));
dc.FrameRect(Rect,&CBrush(RGB(0,0,0)));
dc.SetTextColor(RGB(255,255,255));
dc.DrawText(Str,Rect,DT_CENTER|DT_SINGLELINE);
}
dc.Detach();
}
</code>
whitesky
|
|
|
|
|
SIR I WANT TO TELL YOU HOW I MDE MY APPLICATION PLZ HELP ME
SIR I MADE AN DIALOG BASED APPLICATION NOW A DIALOG IS AUTOMATICALLY THERE SO I PUT ONE BUTTON ON IT.
ITS CLASS IS CBTNCOLORDLG AND IT IS DERIVED FROM CDIALOG
NOW AS YOU SAY
I MADE ANOTHER CLASS FROM INSERT MENU ->NEW CLASS AND THEN A BOX IS OPENED ON WHICH I USE MFC AS CLASSTYPE,
CMY AS NAME AND ITS BASE CLASS AS CBUTTON.
NOW I USE CLASS WIZARD TO ADD ONDRAWITEM FUNCTION THEN I USE THE CODE AS YOU SEND ,
BUT NOTHING HAPPEN
NOW TELL ME WHEATHER I DECLARE ALL THIS IN RIGHT DIRECTION OR NOT
PLZ TELL ME ...
Ashish Dogra
MCA
Noida
|
|
|
|
|
SIR PLZ I ASK U AGAIN
PLZ..... HELP ME
Ashish Dogra
MCA
Noida
|
|
|
|