|
Hi,
I insert a string table in my dll resource eidtor, and then export a fuction from this dll. in that function one of string IDs in the string table is showed by a Messagebox. The problem is: this message box shows nothing.
the following is my code:
Inside DLL
<br />
#include "Resource.h"<br />
<br />
__declspec(dllexport) void LoadMaya();
void LoadMaya()<br />
{<br />
CString strMaya;<br />
<br />
strMaya.LoadString(IDS_MAYA);<br />
AfxMessageBox(strMaya);<br />
<br />
}
Inside EXE
#include "..\MyDll\Maya.h"<br />
<br />
void CDllExeDlg::OnOK() <br />
{<br />
LoadMaya();<br />
<br />
CDialog::OnOK();<br />
}
<br />
Inside String Table
ID Value Caption
------------------------------------
IDS_MAYA 100 Maya Culture
Please single out the bug for me, thank you
Extreme programming. Do the No.1
|
|
|
|
|
Try:
void LoadMaya()
{
CString strMaya;
HINSTANCE hsav= AfxGetResourceHandle();
AfxSetResourceHandle(theApp.m_hInstance);
strMaya.LoadString(IDS_MAYA);
AfxMessageBox(strMaya);
AfxSetResourceHandle(hsav);
}
rechi
|
|
|
|
|
I have a problem with windows Medai Format SDK API .Iam trying to find if a ASF file is valis file or not .
IWMReader *m_pReader;
WCHAR wszFullUrl[ MAX_PATH ];
/*..create reader*******
.............
........*/
Here this represents a callback object
hr = m_pReader->Open(wszFullUrl , this, NULL );
if ( SUCCEEDED( hr ) )
{
//WaitForSingleObject( m_hOpenEvent, INFINITE );
_tprintf( _T( "successfull to open (hr=0x%08x)\n"), hr );
hr = m_hrOpen;
}
if ( NS_E_NO_STREAM == hr )
{
_tprintf( _T( "Waiting for transmission to begin...\n") );
//WaitForSingleObject( m_hOpenEvent, INFINITE );
hr = m_hrOpen;
}
if ( FAILED( hr ) )
{
_tprintf( _T( "failed to open (hr=0x%08x)\n"), hr );
return( hr );
}
When a give a invalid file name ,it gives the following output
successfull to open (hr=0x00000000)
failed to open (hr=0x80070002)
WHy does it give both the error messages ??Can somebody help me on this ??
|
|
|
|
|
Hi All,
I am trying to use a gradient control in my mfc app. And for that I downloaded the code from this website
http://www.codeproject.com/miscctrl/gradientprogressctrl.asp
I am using the GradientProgressCtrl.cpp class to implement in my mfc program. NOw one question is, since I am using the vertical control, how am I supposed to show the filling from BOTTOM TO TOP. The sample code shows the filling from top to bottom. I have looked into the code but nothing happened .
MY xyz.cpp uses it in the foll way where m_progbar is the instantiation of GradientProgressCtrl class. m_progbar is declared in xyz.h file.
m_Progbar.ShowPercent(TRUE);
m_Progbar.SetStep(20);
m_Progbar.StepIt();
My problem is that, after completion of 100 in the bar ctrl. I have to restart the app as filling of the bar stops after it completes the filling of the control.
I have triied lookin in the code but no use
Can you please help me with this.??
Thank a lot!!!
|
|
|
|
|
This isn't really a programming question I'm just wondering if visual safesource comes with either Visual Studio 6 or Visual Studio.net or both.
thanks you for your help
|
|
|
|
|
It's called Visual SourceSafe
It comes with VS .NET Enterprise Edition (and VS6 Enterprise Edition), and you can get it as a stand-alone product.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I am trying to use SHGetFolderLocation and keep getting
error C2065: 'SHGetFolderLocation' : undeclared identifier
I have tried linking shell32.lib and have the header #include <shlobj.h>
but I am doing something wrong.
I am using VC++6.0 sp5 Win XP, Thanks
I have been coding all morning, I am going to post this question and take a break hopefully someone can help. Hopefully I just need some fresh eyes. Thanks.
Later, JoeSox www.joeswammi.com Killing In The Name[^]
|
|
|
|
|
Try #define WINVER 0x0500 in stdafx.h
SHGetFolderLocation needs shell32.dll version 5.0, and needs Win ME or 2K, or newer, to run...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hi there I import a Activex Control but when i try to compile it the debugger gives an error which is "Unhandled exception at 0x5046b2c4 in FirstChart.exe: 0xC0000005: Access violation reading location 0x5046b2c4."
What is the problem???
|
|
|
|
|
Hello
I have a CRichEditView based MDI application.
I would like to know how to access the GetRichEditCtrl() and its functions (such as ReplaceSel) when I'm in another class such as MainFrm
What I want to do, in short:
A non-modal Dialog box (using the Create and ShowWindow functions) to be accessible by both classes MainFrm and CHTMLEditorView (my rich edit view class)
Thanks a lot
|
|
|
|
|
>I would like to know how to access the GetRichEditCtrl() and its functions
>(such as ReplaceSel) when I'm in another class such as MainFrm
Following three statements give you your view from anywhere...
CMDIFrameWnd *pFrame = (CMDIFrameWnd *)AfxGetApp()->m_pMainWnd;
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
CRichEditView *pView = (CRichEditView *) pChild->GetActiveView();
Obviously if you are calling from MDI you can use
CMDIChildWnd *pChild = (CMDIChildWnd *) GetActiveFrame();
CRichEditView *pView = (CRichEditView *) pChild->GetActiveView();
or simply
CRichEditView *pWnd = (CRichEditView *)MDIGetActive()->GetActiveView();
|
|
|
|
|
Hello
I would like to know who to add a line counter to the project. You know those gray bar to the left with line numbers which we can find in almost all those HTML editors.
Thanks for your help
|
|
|
|
|
Do you mean something to count the number of lines of code in your project, or a component to count the number of lines in some sort of edit control that is inside your application?
Dave
|
|
|
|
|
I am currently downloading a file from the web and checking info from it.
CStdioFile *remotefile;
CInternetSession mysession;
remotefile = mysession.OpenURL
(csUrl,1,INTERNET_FLAG_TRANSFER_BINARY|INTERNET_FLAG_RELOAD);
if(!remotefile)
return 0;
My question is can i write to the file that i just opened and save it back on the web server.
If this doesn't work is there another method if i want to write to a file over the web?
Scott
|
|
|
|
|
I have used CFtpConnection::PutFile(..) fn for that. But might also look a t CInternetFile::Write(..)
Art
|
|
|
|
|
I'm doing some bencmarks on low-level high-priority threads, and I'd like to see how they do when some other process is hogging a large percenbtage of CPU resources - 80% or 90%.
Does anyone know of a utility that will suck CPU time through a straw?
Thx
|
|
|
|
|
while (1);
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
search for cpustres,exe, it's installed with Visual Studio.
It does exactly what you want.
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
|
My question is:
Can I get info automatically on (all) functions that are in my project?
Here is what I want to do. I have a big workspace with several projects. I want to find all uses of a certain variable in each and every project. For example, I want to find every case that I use SYSTEMTIME or CTime in all my projects.
Can Studio report information in tabular format such as:
Function Name <--> Return Type
Function Name <--> File
Function Name <--> Class
Function Name <--> Project
Function Name <--> Argument List <--> Example of use
Return Type <--> Argument List
File <--> Project
Class <--> Project
You probably see what direction I'm going with this. I want to create a database that gives me info on my uses of a variable in an entire workspace.
Is this automated somewhere? I also have SourceSafe at my disposal. Sorry if this has been answered somewhere before, but I am not sure how to word my question or search.
Thank you
John J
|
|
|
|
|
I'm writing application that is windows explorer in some way,and I need some file icones like .htm,.sln,.zip,.cs,.aspx,.cpp,.h,..... Where can I find these icones to add them to my imagelist?
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
See SHGetFileInfo() . Use the SHGFI_ICON value for uFlags .
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks Ravi.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
hi, I need some advice about using and connecting the CBaseControlWindow into the IGraphBuilder interface. so, thnx
J.
|
|
|
|
|
Hello all,
I tried remote debuging in VC6.0 with an NT machine as host (source code) and an 2000 machine as remote. Everything worked well except breakpoints. I couldn't set breakpoints.
What I was trying to debug is a DLL running form an executable for which I don't have source code or PDBs.
Any ideas on how to solve this?
Thanks in advance.
Alberto Gattegno
Software Engineer
http://www.itgil.com
|
|
|
|