|
With the risk of being shot by Microsoft or a Java Guru, how do you think that programming has evolved the last 2 years?
Is the majority of applications still written in C/C++ (or even Cobol) or is anyone switching to VB or C#?
And what about Java? Are stilly many programmers switching to Java or has the migration stopped since the burst of the .com bubble?
Does anybody of you know if there any inquiries or reports that can be found on sites?
Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
I want to write a small program that copies files to couple directory including Program Files. Is there a function that returns the Program Files location? If there are 2 hard drives and both of them have Program Files folder, which one is returned?
|
|
|
|
|
SHGetSpecialFolderPath.. with
nFolder as CSIDL_COMMON_PROGRAMS, -- look in MSDN.
I think there is only ever 1 real Program Files folder?
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
And another way is to get the environement variable named ProgramFiles by just using getenv("ProgramFiles").
But i guess the first method is better
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
If there are 2 hard drives and both of them have Program Files folder, which one is returned?
The one returned by getenv
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
From the registry. Here's a snippet
const char FilesSection[] = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion";
const char FilesItem[] = "ProgramFilesDir";
char FilesPath[MAX_PATH] = {0};
DWORD size = sizeof(FilesPath);
if(!REG_Get(HKEY_LOCAL_MACHINE, FilesSection, FilesItem, FilesPath, &size))
return(FALSE);
char Temp[MAX_PATH] = {0};
if(!ExpandEnvironmentStrings(FilesPath, Temp, sizeof(Temp)))
return(FALSE);
Todd Smith
|
|
|
|
|
Be warned though you cannot write anything in the Program Files directory if you are running XP, depending on the user profile.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Im writing an MDI app, and I dont want the application to create / show a blank document when the application starts. I know that ProcessShellCommand calls either OnFileNew or OpenDocumentFile (depending on wether a file was specified in the command line). What can I do?
Ryan Baillargeon
Software Specialist
Fuel Cell Technologies Inc.
|
|
|
|
|
In your app's InitInstance, you should see some code like this:
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
if (!ProcessShellCommand(cmdInfo))
return FALSE;
</code>
Add this line to it:
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
if (!ProcessShellCommand(cmdInfo))
return FALSE;
</code>
By default, m_nShellCommand is set to FileNew, which creates a new document for you automatically when the app starts.
Ty
"The significant problems we face cannot be solved at the same level of thinking we were at when we created them." -Albert Einstein
|
|
|
|
|
Perfect Thanks...
Ryan Baillargeon
Software Specialist
Fuel Cell Technologies Inc.
|
|
|
|
|
arg.. i tried to replace my bitmap resource for my toolbar and now i crash everytime i get to the last line in red below.. can someone tell me what might cause SetBitmap() to crash like it is now?
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;
HBITMAP hBmp = static_cast<HBITMAP>(LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDB_SCTOOLBAR),
IMAGE_BITMAP, 0, 0, LR_SHARED | LR_LOADMAP3DCOLORS));
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | BTNS_SHOWTEXT | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1;
}
<code>m_wndToolBar.SetBitmap(hBmp);</code>
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
the problem is specifically this line:
HBITMAP hBmp = static_cast(LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDB_SCTOOLBAR),
IMAGE_BITMAP, 0, 0, LR_SHARED | LR_LOADMAP3DCOLORS)); this function is setting hBmp to NULL now.. i have tried exporting from photoshop in 256 color, 16 bit, and 24 bit.. all of them crash.. any suggestions? basically all it is is a high color bitmap for my toolbar..
thanks in advance..
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
I want to callback a vc function from my VB com dll. How do I pass the address of this vc function to my dll?
Thanks,
ns
|
|
|
|
|
I want to track the progress of my function. It does 4 distinct 'jobs'. How exactly do I convert the time taken in doing these steps into the progress bars progress?
Thanks,
ns
|
|
|
|
|
u can use a time span CTimeSpan to calculate the time, then Step the progress accordingly, after few test, ull have a good statistic in order to smooth the progress appearence
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I've got a desktop application in development in VC++ 6 that processes data and creates an SVG file that can be seen in a local html file that was built to show the SVG file and some supporting info. No network connection needed, no server, just local desktop.
What I would like to be able to do is to use the Adobe SVG viewer as an ActiveX control to read the SVG file and do the rendering, but instead of displaying the SVG in the application, I need to be able to access the rendered bitmap and operate on the individual pixels. Even converting the SVG into a JPG would allow me to use the CxImage or FreeImage library to read the JPG file and have access to the individual pixels.
A search on Google provides many hits on converting SVG into JPG, but they're all Java, and that won't cut it. I need some C++ code.
Has anyone done something like this that would be able/willing to share some code to get me started, or point me in the right direction? I need to be able to load, create, and manipulate the SVG ActiveX control in a non-visible manner, and I need access to the rendered bitmap.
Thanks,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
You might get something usable from libSVG.
|
|
|
|
|
I have started a MDI project with CFormView as the base class.
I have inserted a property sheet using the Menu item: Project¦Add to Project¦Components and Controls ->property sheet. But I cannot view the property pages nor the frame. I give access to CMyProjView class to have the property sheet embedded into the CFormView.
Any ideas how to activate this property sheet?
|
|
|
|
|
If you need the FormView only for containing the property page, you could also use this [^]
|
|
|
|
|
This does what I need it to do, but the code seems awfully longwinded for what it does. i.e. only 2 property pages.
|
|
|
|
|
Well, it has to simulate the property sheet with a tabbed control and a number of dialogs 'by hand'. The code itself is good and stable.
If you only need the PropertyView once, you maybe are better off embedding a sheet in the CFormView and handling OnSize() .
Construct the CPropertyPage s in your CPropertySheet -derived class, AddPage() them in OnIntitialUpdate() and the MUST be there.
|
|
|
|
|
Heya
I'm not too sure about your method (i've never done it that way), when i embed controls in views i do it this way ->
Create the property sheet as per normal and add it into your FormView as a member variable.
Overide the OnSize method for your formview and call
m_myspropsheet.MoveWindow(cx,cy) etc....
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
I have mainwindow.Inside that mainwindow there are various child windows which is having WS_CHILD style as like sqldiagram.When i move one child window sliding over the other as in sql Relationship Diagram,the window which i move should have the highest z-order i.e..the window which i move should be visible when i move over another child window ,but for me it is going behind the child window.
Sorry if iam not explaining properly.
If u still cant understand my quesiton,just open the Sql Server and see the relation ship diagram and move the tables.
|
|
|
|
|
If I understand what you want to do, you want a currently dragged child-window to get the "closest-to-viewer" Z-order?
SetWindowPos and HWND_TOP is probably what you're looking for.
|
|
|
|
|
Hello,
I have a console app that I can launch using CreateProcess() however I need to obtain the input and output stream from this app so I can do some processing on the data it provides (basically, automate the process of typing data in and reading the output from the console application).
I guess there are some useful articles out there in CP? Can someone point me in the right direction please??
Much appreciated.
Adam.
www.beachwizard.com/travelogue[^]
"I spent a lot of my money on booze, birds and fast cars. The rest I just squandered"
George Best.
|
|
|
|