|
|
Hi,
I have had a look and can't find an answer to this 'simple' question?
Under Vista I have noticed that all child windows in a MDI are framed in "Blue coloured Basic" style... Is there a way to get the shiny glass effect for the child windows? Or atleast get them to have the same colour as their parents?
Also is one of the ways MS is trying to stop MDIs... Make them look ugly enough and people will stop using them.. lol
|
|
|
|
|
Justin Cobb wrote: Under Vista I have noticed that all child windows in a MDI are framed in "Blue coloured Basic" style... Is there a way to get the shiny glass effect for the child windows? Or atleast get them to have the same colour as their parents?
Wouldn't that require you to change the color scheme (or theme) being used? Or are you talking about enabling Aero?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
That is what I mean...
The main window is nicey glassy thanks to Aero, but the children windows are just 'plain' non-glass. I was wondering if there is a way of getting the Aero effect on the children, or atleast picking up the right colours? I guess that by poking around with the WM_NCPAINT-ish messages it could be possible, but not sure how... I haven't really looked into the whole non-client area painting stuff.
|
|
|
|
|
Hello dear friends,
I've developed a toolbar application.
I've added icon with more than256 colors for toolbar buttons.
I've added 1 dialog box that has tab control on it.
The tab has 2 tabs and it is working fine.
Now I've added a Label and a text box in dialogbox for the third tab.
When I click on the third tab I hide all the controls except the
newly added lablel and textbox for this third tab of the dialogbox.
But I can't see them.
Can anybody tell me what goes wrong it appears in the resource view of
the dialogbox but it won't appear when i click the third tab of the
tabcontrol?
Thanks in Advance to all of you.
ritz1234
|
|
|
|
|
Can you please paste your code snippet here??
and one more thing please edit your question properly as the problem you asking hsa nothing to do with subject
|
|
|
|
|
This is the function that makes the control hide/visible
void MainDlg::ShowTabData(int nTab)
{
try
{
HWND hWnd;
CButton *ob1=(CButton*)GetDlgItem(IDC_AUTO);
CButton *ob2=(CButton*)GetDlgItem(IDC_MANUAL);
CEdit *Eob=(CEdit*)GetDlgItem(IDC_PASSWORD);
switch(nTab)
{
case 2:
GetDlgItem(IDC_STATIC4)->ShowWindow(true);
GetDlgItem(IDC_ORG)->ShowWindow(true);
GetDlgItem(IDC_STATIC1)->ShowWindow(false);
GetDlgItem(IDC_STATIC2)->ShowWindow(false);
GetDlgItem(IDC_STATIC3)->ShowWindow(false);
GetDlgItem(IDC_USER)->ShowWindow(false);
GetDlgItem(IDC_PASSWORD)->ShowWindow(false);
GetDlgItem(IDC_URL)->ShowWindow(false);
GetDlgItem(IDC_AUTO)->ShowWindow(false);
GetDlgItem(IDC_MANUAL)->ShowWindow(false);
case 1:
GetDlgItem(IDC_STATIC1)->ShowWindow(true);
GetDlgItem(IDC_STATIC2)->ShowWindow(true);
GetDlgItem(IDC_STATIC3)->ShowWindow(true);
GetDlgItem(IDC_USER)->ShowWindow(true);
GetDlgItem(IDC_PASSWORD)->ShowWindow(true);
Eob->SetPasswordChar('*');
GetDlgItem(IDC_URL)->ShowWindow(true);
SetDlgItemText(IDC_USER,m_strUserName);
SetDlgItemText(IDC_PASSWORD,m_strPassword);
SetDlgItemText(IDC_URL,m_strUrl);
GetDlgItem(IDC_AUTO)->ShowWindow(false);
GetDlgItem(IDC_MANUAL)->ShowWindow(false);
break;
case 0:
GetDlgItem(IDC_STATIC1)->ShowWindow(false);
GetDlgItem(IDC_STATIC2)->ShowWindow(false);
GetDlgItem(IDC_STATIC3)->ShowWindow(false);
GetDlgItem(IDC_USER)->ShowWindow(false);
GetDlgItem(IDC_PASSWORD)->ShowWindow(false);
GetDlgItem(IDC_URL)->ShowWindow(false);
GetDlgItem(IDC_AUTO)->ShowWindow(true);
GetDlgItem(IDC_MANUAL)->ShowWindow(true);
}
}
catch(...)
{
}
}
This Above function is called by the following function
void MainDlg::OnSelchangeOptionTabs(NMHDR* pNMHDR, LRESULT* pResult)
{
try
{
CString strtab;
int ISel=m_Tab->GetCurFocus();
ShowTabData(ISel);
*pResult = 0;
}
catch(...)
{
}
}
ritz1234
|
|
|
|
|
i guess you need to pass SW_HIDE instead of false and SW_SHOW instead of true.
also you have break missing in case statements.
|
|
|
|
|
Thanks for the reply,
I've tried according to you but the problem has not been solved.
I've added a new dialogbox and a class that implements it and when I use
the code as below when a button of the toolbar is clicked.
CDlg2 ob;
ob.DoModal();
The dialogbox doesn't appear.
So what is the problem with the resource file that I am not getting.
ritz1234
|
|
|
|
|
ritz1234 wrote: When I click on the third tab I hide all the controls except the
newly added lablel and textbox for this third tab of the dialogbox.
But I can't see them.
Have you used the debugger to find out why?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thanks for the reply David.
The toolbar is a ATL COM DLL how can I debug it?
I badly need to solve this problem?
ritz1234
|
|
|
|
|
ritz1234 wrote: The toolbar is a ATL COM DLL how can I debug it?
The same way you would any other application. Compile in debug mode. Set a breakpoint using F9. Start with F5. Step using F10 and F11.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Although the breakpoint has not reached.
it gives me the debug assertion failure of when I call DoModal() to show
the dialogbox just added in resource file.
Progame:IEXPLORE.EXE
File:afxwin1.inl
line:22
ritz1234
|
|
|
|
|
ritz1234 wrote: File:afxwin1.inl
line:22
Have you looked at this line?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
The content of this file is as below
{ ASSERT(afxCurrentResourceHandle != NULL);
ritz1234
|
|
|
|
|
Has the ActiveX control been registered? Have you tried removing any newly-added code until the problem goes away?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
yes,the COM DLL has been registered.
If possible reply soon.
ritz1234
|
|
|
|
|
I am having a bit of an odd problem that I can't figure out.
I am designing a dialog with a width of 500 pixels.
My screen resolution width is 1680.
So, logically, I would assume that the dialog would take up under one third of the window width.
However, the dialog actually takes up half. I don't suppose anyone has any idea why this is.
The only thing I can think of was something similar back in my beginning days of Windows programming with VB 4.0 and the GUI designer used to use something called "twips" (or something) for measurements. Is the problem I'm having similar, or does VS have some sort of scaling setting I'm not aware of?
Thanks
|
|
|
|
|
have you changed the dialog font?? from properties.
|
|
|
|
|
Why would I change the font? Does the dialog size scale based on the font size selected?
|
|
|
|
|
yes i had faced similar problem when i increased the dialog font size from properties.
|
|
|
|
|
and BTW the 500 width you saw was it in Resource editor??
If yes i dont think it is in pixels like your screen resolution.
Do GetWindowRect() to get the dialog width in pixels.
|
|
|
|
|
I see. I assume there is no way to diable this feature?
If not, I'll have to code the dialog manually (which I'd rather not do).
Changing the font is not really an option as it would have to be changed in a large number of places, for consistency. Something I don't have time for.
Is this problem a VS resource editor problem (feature?), or an issue with dialogs in Windows itself?
|
|
|
|
|
Brian Dunne wrote: I am designing a dialog with a width of 500 pixels.
Dialog's are measured in DLUs.
Brian Dunne wrote: My screen resolution width is 1680.
Screen resolution is measured in pixels. It's really a bad idea to design dialogs in terms of pixels. Screen resolution will vary from machine to machine, and any attempt to think about pixels at design time is doomed to failure. Don't even worry about it. If you need something sized in pixels to a specific size, you have to do it at runtime.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
typedef UINT (CALLBACK* LPFNDLLFUNC1)(DWORD,UINT);
...
LPFNDLLFUNC1 lpfnDllFunc1; // Function pointer
The above declaration seems confusing and any easy way to declare func. ptrs.
|
|
|
|