|
Ok, i see the problem
it's not a problem of MFC or something else, it's at new a BCGSoft-Problem
With standard-textboxes it works great... But with the BCGSoft-Librairy it sucks
so, i think i can't resolve the problem
|
|
|
|
|
I used to use BGCSoft - you can see my posts on their forum.
I do not use them anymore, though...!
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
I must excuse me by BCGSoft, it wasn't a BCGSoft Problem.
RedrawWindow(NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE | RDW_FRAME);
resolves the Problem
Sorry & thanks BCGSoft
|
|
|
|
|
Hi,
I have a Client-Server Application.
I am trying to get the IP address of the machine on which the client is running on at the Server Side.
I want to store the IP address at the Server side and use it for future processing.
How to get the IP address of the client machine at the Server Side.
I am using VC++ 6.0
Thanks n regards
|
|
|
|
|
Vichitram wrote: I am trying to get the IP address of the machine on which the client is running on at the Server Side.
I want to store the IP address at the Server side and use it for future processing.
If you have the machine name then use gethostbyname .
|
|
|
|
|
or if the client is connected (you have a connected socket) then you can use getpeername().
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
|
how can i change the font of menu items? i am using visual studio 2005-VC++
|
|
|
|
|
|
it is layerd,like stack wnd ,
and like outlook bar ,but it can expand panel more than one panel .
and it is not like xp explorer bar ,this dreamweaver panel is not scroll when
all the panel height is greater than the ctrl height.
thanks you.
|
|
|
|
|
|
sorry,
and i want to use it in my project ,
thanks you.
|
|
|
|
|
Did you search on the codeproject I saw articles like your question that I think are helpfuls for you but you dont want that this panel has scroll?
|
|
|
|
|
No need scroll,
all panel in this ctrl is always visable , just hide the window in the panel when click panel to hide it .
it likes "window blind"
|
|
|
|
|
can anyone help me in finding the size of a folder or size of directory using MFC
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
I dont know if there is any API available to do this.
Other way is to write a recursive function to traverse through all files/directories in a directory using combination of FindFirstFile and FindNextFile , and use GetFileAttributesEx to determine size of each file. And add up those to size of root directory.
|
|
|
|
|
void FindFoldersize ()
{
WIN32_FIND_DATA fd;
HANDLE hFind = ::FindFirstFile (_T ("*.*"), &fd);
CString str;
DWORD filesize;
int size=0;
if (hFind != INVALID_HANDLE_VALUE)
{
do
{
if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
TRACE (_T ("%s\n"), fd.cFileName);
}
str.Format("%s",fd.cFileName);
//AfxMessageBox(str);
filesize=((fd.nFileSizeHigh* MAXDWORD) + fd.nFileSizeLow);
str.Format("%d",filesize);
//AfxMessageBox(str);
size=size+filesize;
} while (::FindNextFile (hFind, &fd));
CString str3;
str3.Format("%d bytes",size/1024);
AfxMessageBox(str3);
::FindClose (hFind);
}
}
This Works
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
You should write function recrusive, i.e. in a way, if file found is directory , you should call same function for finding files inside that directory and size.
|
|
|
|
|
|
i need to update one child dialog from other for that i did the following things
when i click on the list view item.
LRESULT CALLBACK GlobaListProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_NOTIFY:
if(((LPNMHDR)lParam)->code == NM_CLICK)
{
iSelect=SendMessage(hList,LVM_GETNEXTITEM,-1,LVNI_FOCUSED);
if(iSelect==-1)
{
break;
}
index=iSelect;
ShowWindow(hWndinoutfiledir,SW_HIDE);
ShowWindow(hwndEncrypt,SW_HIDE);
ShowWindow(hwndSplit,SW_HIDE);
ShowWindow(hwndUpload,SW_HIDE);
<code>ShowWindow(hwndTagEditorDlg ,SW_SHOW);</code>
UpdateWindow(hwndTagEditorDlg);
}
break;
}
}
now i need effect of that click event on the following call back function <code>ShowWindow(hwndTagEditorDlg ,SW_SHOW) </code> its call but its not updated the window with
empty edittext control what should i do?
addtional i want to pass the iSelect value also for the further processing of my global array of object _ProtectSet[index] for dispaly the old values which is stored in objetc.
LRESULT CALLBACK TagEditorProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
Utility util;
switch(message)
{
case WM_INITDIALOG:
if(_ProtectSet[index].listviewIndex==index)
{
SetDlgItemText(hDlg,IDC_EDIT_ARTIST,util.ConvertStringToWCHAR(_ProtectSet[index].artist));
SetDlgItemText(hDlg,IDC_EDIT_ALBUM,util.ConvertStringToWCHAR(_ProtectSet[index].album));
SetDlgItemText(hDlg,IDC_EDIT_YEAR,util.ConvertStringToWCHAR(_ProtectSet[index].year));
SetDlgItemText(hDlg,IDC_EDIT_COPYRIGHT,util.ConvertStringToWCHAR(_ProtectSet[index].copyright));
SetDlgItemText(hDlg,IDC_EDIT_AUTHOR,util.ConvertStringToWCHAR(_ProtectSet[index].author));
SetDlgItemText(hDlg,IDC_EDIT_GENRE,util.ConvertStringToWCHAR(_ProtectSet[index].genre));
SetDlgItemText(hDlg,IDC_EDIT_DESCRIPTION,util.ConvertStringToWCHAR(_ProtectSet[index].desc));
}
break;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_SAVE_TAG:
_ResideId3TagForSelectedFile(hDlg);
MessageBox(hDlg,_T("Your file has been saved"),_T("encoder"),0);
break;
case IDC_HIDDEN_BTN:
MessageBox(0,_T("HAY"),_T("HI"), 0);
::PostMessage(hDlg,WM_INITDIALOG,0,0);
break;
}
break;
}
return FALSE;
}
what should I do ?
Amit
|
|
|
|
|
amitmistry_petlad wrote: i need to update one child dialog from other
Do these have a common parent (e.g. the CDocument)?
If yes, Dlg1 could manipulate the common parent, and the Parent in turn manipulates Dlg2.
This is a much clearer architecture, where only the Patent-class needs to be adapted to changing needs.
Failure is not an option - it's built right in.
|
|
|
|
|
its WIN32 API,
and the parent is common. I didn't get you please briefly introduce me.
so i can understand.
Amit
|
|
|
|
|
Your Dialog knows its Parent.
So you can either send it a user defined message with your iSelect as a parameter, or call a function in your Parent which takes iSelect as a parameter.
Either way, the handler in your parent would then manipulate the second dialog, e.g. by sending it a WM_CLick of WM_SHOW you "made up" or by calling function of this dialog.
So no dialog needs to "know" the other one. Both only know their parent - which they do anyway.
Failure is not an option - it's built right in.
|
|
|
|
|
how can i send it ? could you please provide me piece of code ?
|
|
|
|
|
amitmistry_petlad wrote: could you please provide me piece of code ?
Difficult. I am not using Win32 for a reason: I dont know it.
To send a message, you use SendMessage waits for the message to return or PostMessage , which does not wait.
(Daniel Koptchinski mad a four-part series about message handling: The first entries here[^]
As a message, you can either send a message the target class knows (like WM_SIZE ), or you define a new one (as WM_APP + YourConstant)
Failure is not an option - it's built right in.
|
|
|
|