|
Hi
I am using a multidocument application.
CMultiDocTemplate* pDocTemplate_Digi;
pDocTemplate_Digi = new CMultiDocTemplate(
IDR_DIGITAL,
RUNTIME_CLASS(CDDRUDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CSuperGrid1View));
my view CSuperGrid1View is inherited from CFormview.
I want to disable the scroll bars that is coming default in my view.
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs]
cs.style &= ~WS_EX_RIGHTSCROLLBAR;
cs.style &= ~WS_EX_LEFTSCROLLBAR ;
if( !CMDIChildWnd::PreCreateWindow(cs) )
return FALSE;
return TRUE;
}
I did the same in CSuperGrid1View::PreCreateWindow(..)
But it is not disabling.Can anybody help me please.
Regards
Deepu
|
|
|
|
|
A form view derived class will automatically show its scroll bars if the client area assigned to it is smaller than the dialog resource used to create the form with. This is so that the controls can be scrolled into view.
To remove the scroll bars you need to handle the WM_SIZE message for your form and call SetScaleToFitSize(cx, cy) (function name from memory with no docs available, may not be precise) function which is part of CScrollView, a base class of CFormView. You may also need to resize/reposition controls on your form so make full use of the available space.
If you vote me down, my score will only get lower
|
|
|
|
|
Hi all,
how can i check the dialog is already open or not just before calling DoModal().
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: how can i check the dialog is already open or not just before calling DoModal().
If you already have a handle to the window that you are expecting to be open then use functions
1. IsWindowVisible
2. IsWindow - To check validity of window handle
|
|
|
|
|
I m alrady try this its gives error of Debug Assertion Failed.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: I m alrady try this its gives error of Debug Assertion Failed.
Where does it assert?
|
|
|
|
|
After clicked on Retry button of debug assertion failed dialog box, its focused on afxwin2.inl
on this line.
_AFXWIN_INLINE BOOL CWnd::IsWindowVisible() const
{ ASSERT(::IsWindow(m_hWnd)); return ::IsWindowVisible(m_hWnd); }
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: _AFXWIN_INLINE BOOL CWnd::IsWindowVisible() const
{ ASSERT(::IsWindow(m_hWnd)); return ::IsWindowVisible(m_hWnd); }
Call IsWindow before IsWindowVisible since the check for visibility can only be done on a valid window handle.
Should be something like
if( !::IsWindow( m_Dlg.GetSafeHwnd() ))
{
m_Dlg.DoModal();
}
else if( !::IsWindowVisible( m_Dlg.GetSafeHwnd() ))
{
m_Dlg.ShowWindow(SW_SHOW);
}
|
|
|
|
|
Its open dialog box again and again i want if dialog box is already open its not open again only show tha previous one.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: i want if dialog box is already open its not open again only show tha previous one
For this you should create modless dialog and show/hide as required.
Regards,
Sandip.
|
|
|
|
|
If it's a single threaded function, the main thread will be blocked if you've already called "DoModal" (which means the window is visible". So you will not be able to execute the any other functions during this period (sure you can get paint messages and some other notifications to your parent window).
In which case, it's required to check the windows is showing or not?
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
How about using a flag to detect this?
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
yes its working with use of flag.
thanks
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
modified on Tuesday, February 3, 2009 1:13 AM
|
|
|
|
|
Welcome!
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Hi everyone there,
I need to make a mapping (two column) in vc++(win32). I was suggested to make an INI file. But i don't have any idea about it, and how to use it in vc++. Could someone pleas help me.
Thanks in advance
I am a learner Always
|
|
|
|
|
YOu can use PrivateProfile Set/Get functions[^]to manipulate INI files. Please note that INI file formats are deprecated. If possible to switch to XML file format.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
thanks
I am a learner Always
|
|
|
|
|
.INI files contain one or more sections. Each section begins with a section name, which is followed by zero or more entries. An entry associates a keyname with a value. The general format is:
[section]
keyname=value
Use GetProfileString()to retrieves the string associated with a key in the specified section of the ini file.
http://msdn.microsoft.com/en-us/library/ms724366(VS.85).aspx[^]
aks
|
|
|
|
|
thanks aks
where can I get information for ace message queue of ace framework....I wanted a simple message quque for my application...please help
Thanks
I am a learner Always
|
|
|
|
|
|
|
I've got a question about programming for mobile devices in winapi. Is that possible to check if a mobile device like pocket PC or palmtop was connected to ActiveSync? I mean I need a code that will catch an event when the connection is established and active sync notifys about that.
I'm using WinAPI, VS 2005 SP1, Windows Mobile 6.1
|
|
|
|
|
I believe CeRapiInit is what you're looking for.
«_Superman_»
|
|
|
|
|
thanks, but I'm afraid it's only for PC side notification
rapi.h does not exist on the device's API...
|
|
|
|
|
Hello All,
I have a large legacy application that I will soon be updating with some new development. The new features will require a fair amount of owner draw stuff. My concern is that some of the application's current owner draw stuff runs slowly on Vista. Win2K and WinXP run great. I'm not sure what's causing the slowness on Vista, but I want to figure it out before the new development. I'm not sure whether it's poor programming (although it seems pretty adequate to me) or whether I need to swap out all the pDC->MoveTo() pDC->LineTo() etc... for some other methodology or switch to a Directx equivilent or something. I'm developing in Visual Studio 2003 so perhaps upgrading to VS2008 would fix the problem?
Anyone have any similar experience? Any thoughts?
Thanks in advance.
|
|
|
|