|
> Why do you need to do this?
'Cause with visual styles, the appearence of the application's controls (sizes, position, ecc.) changes.
> Can't you use a console application?
No! I need to use a GUI application!!!
>Or is it just one single window, then again what do you want to do with it? Because the only use of an invisible window is to receive events. And this can be done by creating a CWnd dummy object.
> Please clarify your needs.
It shouldn't matter. I simply need a window that is rendered with the basic visual style (classic Windows XP style).
|
|
|
|
|
which version of visual studio are you using?
|
|
|
|
|
VS 2008. It includes application manifest; I thought it could be modified to disable visual styles, but I don't know how.
|
|
|
|
|
If you open the stdafx.h, you can find some statements like...
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
Comment it all. Doing so will prevent your application from creating a manifest file that have dependency with comctrl version 6.
|
|
|
|
|
It works!!!
Thanks a lot!!!!
|
|
|
|
|
how can i send a clist of cstring elements to another process using writeprocessmemory?
when i try to send the list, the list is getting copied in the dest process but i cannot access its elements (i think the elements dont get copied).
thanks
|
|
|
|
|
Why did you use such a function (Did you considered the Clipboard for such operations)?
Are you aware that, generally speaking, pointer cannot be shared by different processes?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
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.
|
|
|
|