|
well, since no money is charged here i'm not complaining... thanks for everyone who finds time to write back to me (however, Mr.Prakash does have a point )
about pipes in linux - again, i'm no expert but i think that these things work differently in linux. i think in linux you can put pipe handles in select and it listens to them just fine. in windows i'm affraid it doesn't work (and in msdn it clearly states that select is for sockets).
about thread communication/synchronization - i think i know the different but i'm not quite sure under what king does my problem fall into. i'll restate my problem briefly:
1) i need thread T to always listen to a socket for read/write
2) i need MAIN to block somehow (pipe, event...) until it gets response from T
in other words i just need T to be able to listen both to a socket and to MAIN.
i'm open to ideas
(but if possible don't offer me linux/unix solutions cause i think the pipes/select issues differ in this matter)
|
|
|
|
|
Hi!
Is there any way to expand the classwizard's override knowledge for a class?
I mean the virtual member functions on the (when classview) Properties->overrideables page.
So for example there're the OnAccept, OnReceive, OnConnect func already put into that overrides page for CAsyncSocket. I define a new func, like OnDataArrive(), then how can I make it appear on the that page in addition?
Thx for your help in advance,
clayman
|
|
|
|
|
If you find out an answer let me know. I have the same problem. It seems like it should list all of the virtual functions of my base class, but it does not list any.
|
|
|
|
|
hello,
I have a database program and i'm trying to get a CString variable from one class to work in another but i am getting strange results.
It's dialog based and i made a new dialog class. I included the header files and it copiles with no errors but it spawns the main dialog when i try to use the string.
(the string name is Value1 and its from the CChange class.)
CChange change;
m_edit1.SetWindowText(change.Value1);
for some reason this launches the main dialog and does not work as a string.
Any help would be much appreciated.
|
|
|
|
|
Actually what you want,
You need a CString Value from child dialog to fill an edit control in parent dialog?
Assume CChildDlg is your child and CParentDlg is your parent dialog clasess
Let m_EditValue is the name of the Edit control variable in your parent Dlg,
m_csChildStringVariable is the CString variable in your child dialog declared as public
then
in parent dialog:
void CParentDlg ::OnOk()
{
CChildDlg oChild;
oChild.DoModal();
/*from that dialog you get some value for csChildStringVariable */
// set parent edit control
CString csTemp = oChild.m_csChildStringVariable;
m_EditValue.SetWindowText(csTemp );
}
try that..
I want to change Myself..Can u help me?
|
|
|
|
|
Well, actually im trying to get a string from the parent dialog to fill a child dialog edit box.
I took your suggestion, but for some reason when i hit the button, it opens the main dialog.
In the parent dialog i have:
Value1="test";
CChange change;
change.DoModal();
then in the child i did:
CMainDlg maindlg;
m_edit1.SetWindowText(maindlg.Value1);
m_edit1.UpdateWindow();
when i hit the button, it launches the main dialog window as if it were opening the program again ! ?
The reason i want this function is so that i can double click an entry in the listctrl and have it open with the strings in edit boxes, so that you can edit them and make changes.
|
|
|
|
|
no_life wrote:
The reason i want this function is so that i can double click an entry in the listctrl and have it open with the strings in edit boxes, so that you can edit them and make changes.
ok..thats your problem is'nt. you can solve that in a better way like this.
in your CChange , create a public member variable as m_csEditString
and when you double click the list control in the parent dialog, get the currently selected String and
call
CChange change;
change.m_csEditString = "String from parent list";
change.DoModal();
in the CChange class create a control variable for your edit control via ClassWizard let m_edit1
and in the OnInitDialog() function of your CChange class,
just call
m_edit1.SetWindowText(csEditString );
That will work..!!
if you have anymore doubt...feel free to ask me..
I want to change Myself..Can u help me?
|
|
|
|
|
Hi everyone,
My name is Toan.I am studying about hook programming.And when I do my project,I wonder there is any way to get the characters just deleted by using Backspace key(or Delete key).
Thanks for reading my question.
(My English is not very good.Sorry for using any wrong words)
|
|
|
|
|
I understand you are editing in an edit control which you expect to UNDO when you delete a character. Am I correct? If so use CEdit Clipboard Operations.;)
|
|
|
|
|
Thanks Manikandan.But my problem is that I want to write a program processing input and output.For example,if the user press the Backspace key and the key deleted is 'a' the program will replace that character by character 'b'.
|
|
|
|
|
May be this one helps you...
BOOL CParentWnd::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_KEYDOWN)
{
if(pMsg->hwnd == urCtrl.GetSafeHwnd())
{
switch (pMsg->wParam ) {
case VK_BACK_SPACE :
{//TRY HERE}
}
}
}
|
|
|
|
|
Sorry for my confuse question.My project is a Dll component processing input and output.For example,when my program is running and you are working with MS Word,you press the Backspace and the character just deleted is 'a',my program hook that event and show a message "Hello".(or any other actions)
|
|
|
|
|
Thanks for your helping,Manikandan
|
|
|
|
|
Hi,
I am using CRichEditCtrl to edit Unicode characters like Arabic, Chinese and Japanese. When I tried to get the Unicode values of the characters typed in as below I can able to get only the lower 2 bytes not the whole 4 bytes.
UINT nChar = 0x0000;
int nLineLength,nRead;
CString strLine;
for(int i = 0; i < m_cRich.GetLineCount(); i++)
{
nLineLength = m_cRich.LineLength(m_cRich.LineIndex(i));
nRead = m_cRich.GetLine(i,strLine.GetBuffer(nLineLength + 3), nLineLength + 1);
strLine.ReleaseBuffer(nRead);
for(int j=0;j
|
|
|
|
|
Hi all,
I'm trying to set up a simple dialog with a button that has a bitmap instead of text.
From the dialog editor I set the "Bitmap" option for the button and in the OnInitDialog() method of the dialog, I did the following:
m_button.SetBitmap(LoadBitmap(NULL, MAKEINTRESOURCE(IDB_PLAY)));
The button appears but no bitmap.
Anyhelp would be GREATLY appreciated
Mark
|
|
|
|
|
Try looking here[^].
Software Zen: delete this;
|
|
|
|
|
Hi Mark
seems like the loaded bitmap resource is set free when your leaving the OnInitDialog(). Therefor the bitmap not appear. Try this hint to avoid that :
create a member var for the bitmap in your Dialog class :
class CMyDialog : public CDialog
{
:
:
private :
CBitmap m_Bmp;
};
and in the OnInitDialog :
BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();
m_Bmp.LoadBitmap ( IDB_PLAY );
m_button.SetBitmap( m_Bmp );
return TRUE;
}
|
|
|
|
|
please before asking such basic question have a look at the FAQ &&/|| (and/or ) at the posted articles...
very thank you !
TOXCCT >>> GEII power
|
|
|
|
|
Which moron gave you one.
|
|
|
|
|
|
Some moron had rated your question as 1.
|
|
|
|
|
I have found some ways to find MAC of Network Interface Card. But the one I really want to get is the physical address of NIC. By changing Network Address in NIC properties setup, I get the software configured MAC and not the hard-coded MAC of NIC. How can I write a program to get physical address burned into ROM of NIC even if the softare configured MAC is different.
|
|
|
|
|
Hi!
I'd like to make my overrideable functions appear on the Properties->Overrides page of the vs enviroment, therefore offering users of my classes a more convenient overriding.
What should I do to achieve this?
Thanks in forward
|
|
|
|
|
Where is my profile Update settings link..????????????????????????
I want to change Myself..Can u help me?
|
|
|
|
|
put this message in the suggestion... cus this seems 2 b a bug
There is nothing new under the sun, But there are lots of old things we don't know. - Ambrose Bierce
|
|
|
|