|
Use ModifyStyle(WS_CAPTION,0); in OnCreate instead.
|
|
|
|
|
Thanks for your reply.
we need add one more tweak to avoid painting problems.
The following code worked fine for me.
ModifyStyle(WS_CAPTION,0);
SetWindowPos(NULL, 0, 0, 0, 0,
SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE|
SWP_DRAWFRAME);
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
Sarath. wrote: SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE| SWP_DRAWFRAME);
you can mention this as third parameter of ModifyStyle . You need not call SetWindowPos
|
|
|
|
|
I forgot it Thanks
Anyway those flags need to be called
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
Sarath. wrote: But it is not working for me.
Which means what exactly? Does the frame window still have a titlebar?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi
Application in release version is working fine but crashing in debug version.
I think its because of ASSERT statement.
Does any one has a clue?
TIA
|
|
|
|
|
Use your debugger to locate more precisely the problem.
EDIT:
Yes, ASSERT wroks only in debug mode but if something asserts, it means that something is going wrong.
|
|
|
|
|
Where it is crashing ?
Please show the code where it is crashing
RinuRaj
|
|
|
|
|
Its a switch statement with diff cases:
pseudo code:
switch(text)
{
case1:
Do something...;
case 2:
Do something..;
default:
ASSERT(FALSE);
}
Its going to default case and then assert statement is excuting and it crashes here.
Its giving error
"A breakpoint has been reached.
(0x80000003) ocurred in application at location 0x7c901230"
|
|
|
|
|
Jacqi123 wrote: Its giving error
"A breakpoint has been reached.
(0x80000003) ocurred in application at location 0x7c901230"
Possibliy, you are pressing Abort Retry button on Assert dialog.
Assert doesn;t necessarily lead code to crash. Its just indication, thats some thing going wrong.
What happens,if you use Ignore button on assert dialog? As its not crashing in Release, should not crash in debug.
And then, check code flow, why code is going to default case, where it should not go, as per your coding.
-- modified at 8:08 Thursday 7th September, 2006
-- modified at 8:39 Thursday 7th September, 2006
|
|
|
|
|
Jacqi123 wrote: Application...crashing in debug version.
I think its because of ASSERT statement.
ASSERT() statements do not causes crashes. They actually indicate to where the problem is.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
From the MSDN:
Note This function is available only in the Debug version of MFC.
|
|
|
|
|
Hello all,
I want to restrict user not to reduce the size of dialog within limits.
My dialog box is created in resource editor and class is derived from CDialog.
I made the Border property "resizable" and it allows the user to resize the dialog.
I want to restrict the user not to reduce the size than certain limit. I write the code in OnSize handler as below
void CMyDlg::OnSize(UINT nType, int cx, int cy)<br />
{<br />
if (cx < 650)<br />
cx = 650;<br />
<br />
if (cy < 270)<br />
cy = 270;<br />
<br />
CDialog::OnSize(nType, cx, cy);<br />
<br />
}
But the dialog still can be reduced less than width 650 and height 270.
I tried to put "return" if the cx is < 650 and cy < 270. but user can still reduce the size.
Can any one suggest how to restict the user?
Thanks for your time
Ravi
|
|
|
|
|
Try OnSizing[^]
-Sarath.
The more you can dream the more you can do - Michael Korda"
|
|
|
|
|
sravishankar wrote: I want to restrict user not to reduce the size of dialog within limits.
That's what OnGetMinMaxInfo() is for. There is an example of it here (in the Extras section).
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi all,
i have strucked with linker error 2001 : unresloved external symbol "__declspec(dllimport)".
this is not comming when the it is in debug mode but this is comming in the release mode only.
what is the error pls help me out.
Uday kiran
|
|
|
|
|
In the project configuration, switch to release and add the libs which u added in Linker->input in debug mode.
"Some people believe football is a matter of life and death.
I'm very disappointed with that attitude.
I can assure you it is much, much more important than that. -- Bill Shankly"
|
|
|
|
|
Hi,
It's because the debug configuration has the included library under:
Project->Settings->Link->Object/library modules:
But the release configuration hasn't ... Follow these steps:
Project->Settings
Setting For: All Configurations (Drop Down)
Include the missing library at:
object/library modules:
And compile ... should work fine when
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Hi
Is there a way to get a notification when a file is closed by another program. e.g., I have a txt file in my app in which another program , say notepad, writes something. Is there a way to get to know immediately when that program closes the file. I know i can do it through polling mechanism but i'm looking for a Notification based solution if possible.
"Some people believe football is a matter of life and death.
I'm very disappointed with that attitude.
I can assure you it is much, much more important than that. -- Bill Shankly"
|
|
|
|
|
You may use the following code if you hav only that file in its directory if there is any other file in the directory a change in any of the file will signal the event.
HANDLE hFileChangeHandle = FindFirstChangeNotification("C:\TestDir",TRUE, FILE_NOTIFY_CHANGE_LAST_WRITE);
// Wait until a file in the C:\TestDir is changed.
if( WAIT_OBJECT_0 == WaitForSingleObject( hFileChangeHandle, INFINITE ))
{
// Do the action u want to do
}
RinuRaj
|
|
|
|
|
Have you tried this? AFAIK, WaitForSingleObject doesnt work on Change Notification Handles. As per MSDN Documentation it works only on the following object handles.
Event
Mutex
Semaphore
Process
Thread
Anyway... I will give it a try and will let u know the result
"Some people believe football is a matter of life and death.
I'm very disappointed with that attitude.
I can assure you it is much, much more important than that. -- Bill Shankly"
|
|
|
|
|
It works, Thanks
But there is a little problem that it fires the notifcation event only if the file has changed. It wont do anything if someone just closes the file. That was what I needed precisely. But anyway.... Thanks a lot.
"Some people believe football is a matter of life and death.
I'm very disappointed with that attitude.
I can assure you it is much, much more important than that. -- Bill Shankly"
|
|
|
|
|
you may check
ReadDirectoryChangesW() use this flag..................FILE_NOTIFY_CHANGE_LAST_ACCESS
RinuRaj
|
|
|
|
|
This function might work as it is stated but I already said that I dont want to do it through polling mechanism.
"Some people believe football is a matter of life and death.
I'm very disappointed with that attitude.
I can assure you it is much, much more important than that. -- Bill Shankly"
|
|
|
|
|
Aamir Butt wrote: ...I dont want to do it through polling mechanism.
ReadDirectoryChangesW() doesn't poll. It uses notification. Keep in mind, though, that Windows NT and Windows 2000 only update the LastAccessTime every hour for performance reasons.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|