|
|
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
|
|
|
|
|
If you are trying to keep the newest data in view after an update, you will have to use something like this in your CListView -derived class:
CListCtrl &list_control = GetListCtrl();
int count = list_control.GetItemCount();
if (count > 0) {
list_control.EnsureVisible((count - 1),TRUE);
}
Software Zen: delete this;
|
|
|
|
|
Hey folks,
i m trying to make an application for reading a barcode for that i have a BARCODE READER which i can connect with the system thu USB and have to use VC++ 6.0 for developing the application,
So pls help me in doing so...
Thank you
Regards,
Pankaj Sachdeva
|
|
|
|
|
hi !
i am doing the following things for replace my space(' ') replace with '$' for that it gives following.
i have checked with google and msdn but not satisfied.
std::string bufferstrig(buff_input.begin(),buff_input.end());
string newbuff=bufferstrig.replace(' ','$');
Error is following::
error C2661: 'std::basic_string<_Elem,_Traits,_Ax>::replace' : no overloaded function takes 2 arguments.
Amit
|
|
|
|