|
Is WriteProcessMemory() really the interprocess communication
method you want to use?
Interprocess Communications[^][^]
Regardless, you need to serialize the strings into a byte stream somehow
and send that stream. The receiving end needs to de-serialize the byte
stream back into a list of CString objects.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
WriteProcessMemory[^] is generally used by debuggers. I'd look for another IPC method if I was you.
Steve
|
|
|
|
|
how can i check whether the audio driver installed or not(in pc) for my vc++ application?
Thnx,
Fedi
|
|
|
|
|
Perhaps the CreateFile[^] function will help. Here's a quote from MSDN:
Creates or opens a file or I/O device.
Steve
|
|
|
|
|
waveOutGetNumDevs() ; This fn works fine..
|
|
|
|
|
i have 3 tabs on tab control
when i click on one tab i dialogbox became show
but when i click on next tab new dialog became show but preveious
does not hide
i am using ShowWindow(0) and i have also try EndDialog(0)
here is my code
void CBargraphDlg::OnSelchangeTab1(NMHDR* pNMHDR, LRESULT* pResult)
{
CTabCtrl *c =(CTabCtrl*)GetDlgItem(IDC_TAB1);
int s=c->GetCurSel();
t=new txt;
t->Create(IDD_TXT);
bargraph=new graph;
bargraph->Create(IDD_GRAPH_DIALOG);
t2=new txt2;
t2->Create(IDD_TXT2);
if(s==0)
{
t2->ShowWindow(SW_HIDE);
bargraph->ShowWindow(SW_HIDE);
t->ShowWindow(1);
}
else if(s==1)
{
bargraph->ShowWindow(1);
t->ShowWindow(0);
t2->EndDialog(0);
//t2->ShowWindow(0);
}
else if(s==2)
{
t2->ShowWindow(1);
t->ShowWindow(0);
bargraph->ShowWindow(0);
}
*pResult = 0;
}
|
|
|
|
|
Shift Dialog creation code zto InitDialog.
-@SuDhIrKuMaR@-
|
|
|
|
|
ani_ikram wrote: t2->ShowWindow(SW_HIDE);
bargraph->ShowWindow(SW_HIDE);
Why didn't you use similar code in following options and instead of 0/1 use
SW_HIDE/SW_SHOW.
also as sudhir has already suggested you are every time creating dialogs in SelChange notification.
you can move them to InitDialog as suggested by sudhir.
Regards,
Sandip.
|
|
|
|
|
SandipG wrote: Why didn't you use similar code in following options and instead of 0/1 use
SW_HIDE/SW_SHOW.
Especially since SW_SHOW is 5
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I want to rename my exists VC6.0 project, how to do it correctly?
Many thanks.
|
|
|
|
|
|
The tools you suggested works fine. Many thanks, and I vote 5 for you.
|
|
|
|
|
|
chnage the name, what is the problem.. i hope you are talking about dsw files.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
I have cleared some doubts regarding combo box in one of my earlier threads.Had got the solution too.I have a new problem..
I have two dialogs as I told before.there is a combo box in the first dialog.i have a text box in the second dialog.when i click a button, i get the second dialog in which the text box is present.i get the data in the text box in the combo box when i click the ok button .have written code for that.my problem is , i have to see all the data that i enter in the text box in the second dialog into the combo box in first dialog.now what happens is, i can only see the last entered item.i have written it i the OnOK function ,but have commented CDialog::OnOk();
I need to enter details as long as i want and see them all in the first combo box. what to do?
Code in second dialog:
CString i;<br />
fstream f;<br />
f.open("C:\\myfile.txt",ios::app); <br />
printf("\n");<br />
<br />
GetDlgItemText(IDC_EDIT2,str_name);<br />
f.write(str_name.GetBuffer(str_name.GetLength()),str_name.GetLength()); <br />
f<<endl;<br />
<br />
m_combo.AddString(str_name); <br />
<br />
m_edit3.SetWindowText(_T(""));<br />
f.close();
in first dialog:
Add cd;<br />
cd.DoModal();<br />
<br />
m_selcam.AddString(cd.str_name);
|
|
|
|
|
|
projectip wrote: m_combo.AddString(str_name);
Which combo box variable is this.
for adding multiple strings you can create a modeless dialog and use SendMessage(..) to parent dialog
to add strings.
I hope it makes sense.
projectip wrote: Add cd;
cd.DoModal();
and you are able to see only one string because
projectip wrote: m_selcam.AddString(cd.str_name);
this will execute only when DoModal() will return.
Regards,
Sandip.
|
|
|
|
|
m_combo is in the second dialog...thats just for debugging purpose.
|
|
|
|
|
Hi all,
I want to make enteries in Add or remove programs(control panel)Programmatically.
how can i do this???
Thanks in advance
|
|
|
|
|
CRegEdit is class that would help you add your entries in the Registry location
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You/xml>
|
|
|
|
|
These day i practice ACM problem.
and many times, i can't understand problem.
i am studying by "Programming challenges" book.
but that book only give me problom, not answer.
what i want to say is i want to know tip.
May be there are people who solve problom, and i don't want to code or source, i just want to know how they can solve that problem.
so, do you know website about ACM problom and tip?
firstly, i am sorry, i am from korea.
and i am not good in wriitting english so please understand~
Thank you everyone~
|
|
|
|
|
You can try posting a specific problem in the Mathematics and Algorithms forum and ask for a tip. There are many people there that will help you.
|
|
|
|
|
Hi,
Why ShellExecuteEx is suggestible to use over CreateProcess,WinExec in Vista. What is the disadvantage if I still continue to use CreateProcess,WinExec in Vista.
Thanks,
Venkat
|
|
|
|
|
WinExec function is provided only for compatibility with 16-bit Windows. So even if you are using windows XP, you should not use it.
venkat.kupunaram wrote: Why ShellExecuteEx is suggestible to use over CreateProcess
who suggested?
|
|
|
|
|
CreateProcess gives you more control over the spawned process u start, you can spawn it as a different user or different security priveledges and a whole lot more.
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius and a lot of courage to move in the opposite direction." -Albert Einstein
|
|
|
|