|
Hi all ,
Is it possible to disable only certain columns in a Flexgrid.
If yes, please tell me how!
Thanks in advance,
Sunil.
|
|
|
|
|
AFAIK, there is no specific api to disable a particular column in flex grid. so i frequently change the back color of the required cell to achieve this effect.
good luck.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
try {
byte *p=new byte[-1]
} catch (...) {
}
It reports an unhandled exception. Why the exception couldn't be catched? Any way to catch it?
|
|
|
|
|
It is because new is not throwing an exception. The error you see is due to assert. Since new takes unsigned int and you are passing -1 which warps it to 4294967295. New used an assert to check that maximum size requested for allocation is <= 2147483647.
-Saurabh
|
|
|
|
|
Saurabh.Garg wrote: The error you see is due to assert
debug assert won't report like "unhandled exception" but may reports the invalid allocation size.
|
|
|
|
|
If you step through CRT code then you will see that it is assert. In the function _heap_alloc_dbg_impl you will see a check like this:
if(nSize > (size_t)(_HEAP_MAXREQ - nNoMansLandSize - sizeof(_CrtMemBlockHeader)))
{
_RPT1(_CRT_ERROR, "Invalid allocation size: %Iu bytes.\n", nSize);
*errno_tmp = ENOMEM;
}
-Saurabh
|
|
|
|
|
so what?
Saurabh.Garg wrote: you will see that it is assert
Assert is debug helper, you won't see the debug assert in release version, and
Saurabh.Garg wrote: _RPT1(_CRT_ERROR, "Invalid allocation size: %Iu bytes.\n", nSize);
says "Invalid allocation" not "unhandled exception" which OP got. see my reply to the OP.
|
|
|
|
|
I think the exception is not at the point of allocation (new statement), but at the statement where the pointer(which is null pointer because of allocation failure) is dereferenced, try commenting the dereferencing part of the code and check.
Or try the debug build as I think you are using release build and you didn't find the debug assertion before the exception.
followait wrote: byte *p=new byte[-1]
possibly you are using VS6.0, later version shows "error C2148: total size of array must not exceed 0x7fffffff bytes" you cannot pass larger size directly but you can indirectly by variable. Newer version throws exception that can be caught with your code.
|
|
|
|
|
Hi,
How could I find the HWND of window if application is in system tray and post a message to it?
|
|
|
|
|
If you know window class and window name then use FindWindow. Otherwise use EnumWindows to enumerate all windows to get one you want.
-Saurabh
|
|
|
|
|
This works fine when application is minimicsed But if the application is in system tray FindWindow unable to find it .
|
|
|
|
|
I am not totally sure but that mean window no longer exists. It was deleted when application was minimized.
-Saurabh
|
|
|
|
|
Did you try to enumerate child windows of system tray using FindWindowEx.
-Saurabh
|
|
|
|
|
Same result as FindWindow, If it is in system tray FindWindowEx is not detecting it. Is there any workaround?
|
|
|
|
|
Are you sure window exists? I just tried with one of my own application and even after minimizing window to system tray I can get HWND using FindWindow(NULL, "Window Name"). I think the application is deleting the window before minimizing or may be it is changing the window caption.
-Saurabh
|
|
|
|
|
If window is deleting then how come it is getting maximize on double click on system tray icon?
|
|
|
|
|
In my applications I hide windows when minimized to system tray but one also choose to delete all windows and the re-create them every time application needs to show a window again.
-Saurabh
|
|
|
|
|
You mean to say, If a minimise window to system tray it is getting deleted automatically.
|
|
|
|
|
No of course not. Application should be doing it. Is the application for which you are trying to find window written by you?
-Saurabh
|
|
|
|
|
|
Have you tried FindWindow[Ex] when the application is maximized.
|
|
|
|
|
Yes, I am getting when app is maximized.
|
|
|
|
|
Well, What you are doing in "minimising to system tray" to the application.
|
|
|
|
|
I am using a 3rd party class to minimise it like:
m_TrayIcon.MinimizeToTray(this);//CMainFrame
|
|
|
|
|
pther wrote: 3rd party class
get help from it.
Have a look at ShellTrayInfo[^] to get HWND for the tray icon
|
|
|
|