|
System namespace belongs to the .NET Framework .
See [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Ok, I didn't know that, sorry.
|
|
|
|
|
You can delete any directory using RemoveDirectory() function, provided that the directory which is being deleted is empty. So, you will first have to delete all the files of the directory (by using DeleteFile() function) and then use RemoveDirectory() to delete it.
Regards,
Vijay.
|
|
|
|
|
|
piul wrote: I know it is a stupid question, but I couldn't find any function that deletes a directory and all its contents.
Use SHFileOperation() .
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
using SYSTEM.IO; can help
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
I am using Visual C++ 2005 Pro IDE with SP1 for developing a MFC application. In my application there is a header file which contains application constants inside a namespace like
In file AppCommon.h
namespace APP_CONSTANTS
{
const int MAX_BUFFER_SIZE = 100;
const CString appStartupMsg = _T("Welcome to application");
....
};
Now when I use this header file and try accessing the variable as
APP_CONTANTS:: then the auto complete feature of Visual Studio always shows only the first defined variable. Can someone pleasae tell me how do I get the intellisense to display the other defined variables inside the namespace when trying to use auto complete feature?
I have tried deleting all the extra files (ncb, sbr etc...) and tried rebuilding the application for no success.
Thanks and Regards
|
|
|
|
|
VS intellisense is bad bad bad.
personlay i shifted to using Visual Assist X product.
you can get an eval of it.
first instal then when u open ur proj, giv it some time to parse evrything.(lokk at the status bar when it finished)
if after that it failed to give you completion regarding this namespace..then open the file code, and enter the menu and choose the reparse this file command.
..
perhaps somebody else could help you how to force VS intellisence to parse that namespace file...
Our Philosophy, Mohammed Baqir Al Sadr
|
|
|
|
|
psychedelic_fur wrote: Now when I use this header file and try accessing the variable as
APP_CONTANTS:: then the auto complete feature of Visual Studio always shows only the first defined variable.
What happens if you swap the order of MAX_BUFFER_SIZE and appStartupMsg ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I am facing a problem with Japanese font - MS UI Gothic ,regular,16.. We have a function for handling Japanese strings.. But as per current implementation.. after user types any text onto a dialog and presses enter or minimizes the dialog then the entered text is turning bold. Our current implementation is
DWORD DrawJapaneseString( HWND hWnd, PSTR str, LPRECT lpR)
{
HDC hDC;
DWORD dwExt;
int xStart = 0;
HFONT htempFont;
RECT charRect;
HideCaret( hWnd );
hDC = GetDC( hWnd );
dwExt = GetTextBoundingSize( hDC, (LPSTR) str, textLen, &xStart );
if( GetSystemMetrics(SM_DBCSENABLED)) {
SetRect( (LPRECT) &charRect,
textStart.x,textStart.y,
textStart.x+LOWORD(dwExt), textStart.y+ HIWORD(dwExt));
// AppRedraw expands rectangle by 10 anyway...
AppRedraw( hWnd, &charRect );
SetTextColor( hDC, textPen.lopnColor );
int nmode = SetBkMode( hDC, TRANSPARENT );
DrawText(hDC,str,textLen,&charRect,DT_LEFT);
SetBkMode( hDC, nmode);
textLoc.x = charRect.right;
}
ReleaseDC( hWnd, hDC );
ShowCaret( hWnd );
return( dwExt );
}
Can I know how to stop the text turning to bold.
Thanks.
|
|
|
|
|
Please do one thing after the string is bold than copy and paste that string to winword and check is it the same font that you are using ?? I think may be it is due to font is not set properly.please check.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
|
Please give me the details of
1) Font Name
2) Font Size
3) Font Style
when you paste that data in microsoft word. and if Font Style is change than please check when OnPaint is called than anywhere you set any default style or size so that when repainting is done than only your font size changes
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
MS UI Gothic
16
Regular
Yes when I copy and paste in winword... Font is appearing as in FontDialog...
|
|
|
|
|
Hi
I am developing windows mobile 6 application using vc++ 2005 on my desktop.
I am using some control over there like EDIT control, LIST VIEW control, COMBO box, button etc
I have to do it that whenever i will click on add button whatever written in edit control and combo box will go
in list view control according to coloum provided in list view.
I have searche on net for handling of controls but couldn't found.
so plz send me some link for handlind concept
Thanx
subodh kumar
|
|
|
|
|
waquasalig wrote: I have searche on net for handling of controls but couldn't found.
so plz send me some link for handlind concept
What exactly are you trying to do?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I am done with activex control printing. Now i have to print a user control. User class is derived from CWinApp. Can any body suggest me a link or code to print a user control.
Thanks
|
|
|
|
|
sorry it is derived from CObject
|
|
|
|
|
Why dont you edit your message if you want to modify??
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
subramanyeswari wrote: ...print a user control.
Please explain.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
This is my code to print the control
CWnd pWnd ;
HWND hParent,hChild1,hChild2,hChild3;
hParent=hChild1=hChild2=hChild3=NULL;
hParent = ::FindWindow("Wmak Class",NULL);
hChild1 = ::FindWindowEx(hParent,NULL,"ClientFrame",NULL);
hChild2 = ::FindWindowEx(hChild1,NULL,"WindowClient",NULL);
hChild3 = ::FindWindowEx(hChild2,NULL,"AppWindow",NULL);
pWnd.Attach(hChild3);
CDC pDC;
pDC.Attach(hDC);
// save the device context
pDC.SaveDC();
// place at the correct location
pDC.SetViewportOrg(rect.left, rect.top);
LRESULT res = pWnd.SendMessage(WM_PRINT, (WPARAM) pDC.GetSafeHdc(), PRF_CLIENT | PRF_CHILDREN | PRF_OWNED);
pWnd.Detach();
// restore the device context
pDC.RestoreDC(-1);
res is returning 1 but it is not printing. I missed something to code in the control. What is that. similar to DoSuperClassPaint for an activex control
|
|
|
|
|
Hi guys!
I got a really strange behaviour on one customer machine I really cannot figure out - perhaps someone can help...
A C++ plugin DLL of mine loaded into a third party application is calling one of my .NET applications using ShellExecute . Several arguments are passed along in this call, the last one being an empty string. Basically the call looks like this:
ShellExecute(AfxGetMainWnd()->GetSafeHwnd(), NULL, "C:\\Program Files\\MyApp\\MyApp.exe", "/arg1 /arg2 /arg3 \"argument3\" /arg4 \"\"", "C:\\Program Files\\MyApp", SW_SHOW);
/arg1 and /arg2 are simple flags for my .NET app, whereas /arg3 and /arg4 require an additional parameter. The parameter for /arg4 is supposed to be an empty string for this call.
The exact same version of this DLL works fine on many other machines, but on this particular one my .NET application won't start because it claims that the parameter for /arg4 is missing! I'm logging the arguments my application is called with and can see that the last parameter is missing, although the empty string is hard-coded inside the DLL and it works on every other machine I've come across so far.
What can be the reason for ShellExecute silently swallowing the last parameter?
Thanks in advance for every idea about how to proceed here...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
mav.northwind wrote: What can be the reason for ShellExecute silently swallowing the last parameter?
If it's empty, what's to swallow?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
That's the minute, but essential difference between passing no argument or an empty string as argument...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
But can the OS/shell differentiate between the two? For example, how would you execute that program from a command prompt?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|