|
Hello,
how it is possible to register and then get the message WM_DWMWINDOWMAXIMIZEDCHANGE from system?
"Windows can register to hear about when other windows have been maximized"
I have tried to check for the message ... but I will never get this message ;-(
(Desktop Composition is enabled)
LRESULT CALLBACK wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_DWMWINDOWMAXIMIZEDCHANGE:
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
Thanks,
Regards michi
|
|
|
|
|
This may be a dumb question, but your app is running under Vista, right?
/ravi
|
|
|
|
|
i'm doing a dialog with this browse for folder box and i'm thinking to add more parameters/flags to the BROWSEINFO. So anyone have a list of things to put in the browsinfo, like default dir, toolbars and more?
this is what i got now, makes a box with title "hello" and OK, Cancel and New folder buttons
BROWSEINFO bi;
memset(&bi, 0, sizeof(bi));
bi.hwndOwner = hOwner;
bi.lpszTitle = "Hello";
bi.ulFlags = 0x0060 | BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS; //more flags?
//more bi. things?
thanx
|
|
|
|
|
|
thanks, that was really helpful.
|
|
|
|
|
..i'm getting an error when using bi.ulFlags = BIF_USENEWGUI;
error C2065: 'BIF_USENEWUI' : undeclared identifier
heres the code i'm using, i must be doing something wrong:
#include "shlobj.h" //dont know if it matters
BOOL BrowseForFolder(HWND hOwner, CString& folderpath)
{
::OleInitialize(NULL);
// Create a pointer to a MALLOC (memory allocation object)
// then get the Shell Malloc.
IMalloc* pMalloc = 0;
if(::SHGetMalloc(&pMalloc) != NOERROR)
return false;
// Now create BROWSEINFO structure, to tell the shell how
// to display the dialog.
BROWSEINFO bi;
memset(&bi, 0, sizeof(bi));
bi.hwndOwner = hOwner;
bi.lpszTitle = "hello";
bi.ulFlags = BIF_USENEWUI | BIF_RETURNONLYFSDIRS;
// Now show the dialog and get the itemIDList for the selected folder.
LPITEMIDLIST pIDL = ::SHBrowseForFolder(&bi);
if(pIDL == NULL)
return false;
// Now create a buffer to store the path, thne get it.
char buffer[_MAX_PATH];
if(::SHGetPathFromIDList(pIDL, buffer) == 0)
return false;
::OleUninitialize();
// Finally, set the string to the path, and return true.
folderpath = buffer;
return true;
}
|
|
|
|
|
rolfhorror wrote: error C2065: 'BIF_USENEWUI' : undeclared identifier
the error message relevant to the:
rolfhorror wrote: bi.ulFlags = BIF_USENEWUI | BIF_RETURNONLYFSDIRS;
You've missed the letter 'G' int the BIF_USENEWGUI
Fresh eye seems to be helpful sometimes :]
|
|
|
|
|
Newbie00 wrote: Fresh eye seems to be helpful sometimes :]
Sometimes yes, but probably not now It's really BIF_USENEWUI , not BIF_USENEWGUI .
|
|
|
|
|
ahaa so why did You use the sentence:
"..i'm getting an error when using bi.ulFlags = BIF_USENEWGUI;"
at the top of your question? There is definitely BIF_USENEWGUI
|
|
|
|
|
But in the code he used the correct one
|
|
|
|
|
As written in the documentation, the BIF_USENEWUI flag is supported only by version 5.0 and higher.
Therefore, define _WIN32_IE to 0x0500 or higher before including the shlobj.h file. Normally you define this in the StdAfx.h file, which gets included before all other header files.
|
|
|
|
|
thanks, i'll try that
(..regarding the error posted i meant to write "BIF_USENEWUI" not ..GUI)
|
|
|
|
|
If you like and need you can insert controls to BROWSEINFO
|
|
|
|
|
|
|
I just changed the default locale for my OS and it has caused havic with my fonts.
Could somebody please tell me what is the default font VS uses for the text editor?
|
|
|
|
|
|
Courier is the ugly font I am being shown now. I'm pretty sure 'Courier new' is what it was before my changing things.
Thanks anyway
|
|
|
|
|
|
This still isn't working correctly.
I have changed the systems default locale for non-unicode programs to "Chinese simplified". Now wheneve I open VS the font's have gone haywire. The strange thing is, VS settings claim the font to be "Courier New" ( it obviously isn't ), I have to change to a random font then change it back.
|
|
|
|
|
Maybe you should start thinking about reinstalling your VC ++ :]
|
|
|
|
|
Hi All,
In VC++ 6.0 application, I am using LVITEM (List View).
When i run the application, the list view will update data continuously.
For this to work, i am deleting the old data and inserting new data.
DeleteAllItems()
...
InsertItem() or SetItem()
The problem..
The screen flickers.
Is there any way to update data without deleting?
|
|
|
|
|
Use the SetRedraw() method to turn the redrawing off before updating the list and turn redrawing on again after the list is updated.
m_List.SetRedraw(FALSE)
m_List.DeleteAllItems();
m_List.InsertItem(...);
...
m_List.SetRedraw(TRUE);
m_List.RedrawWindow();
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
Thank you very much.
Its working fine.
Another problem...
Since there is huge list of Data. When i am in middle of List View,
Scroll Bar goes up. (May be because of DeleteAllItems())
What may be the solution?
|
|
|
|
|
HMmmmmmmmm In my opinion that's good the scroll bar goes up when you delete all items this is the scroll bar's main task always to be up-to-date with windows. If you don't have any item in your window (in that case List View) why the scroll bar should stay down ? It would be strange and very useless ...hmmm
Unless I haven't understood your qestion/intention
|
|
|
|