|
You want to put the variable m_ID as public in the cContentSourcesDialog.
John
|
|
|
|
|
That is what I thought and that is what I tried first ( a day before I started this thread).
Please take a look at my code in my last reply - in bold at the beginning of the public: block in the dialog header file I declare the variable. I also included the source code where I try to assign a value to dlg.M_ID prior to calling dlg.DoModal(). This results in the compiler error I also included.
If it all looks correct then what is my next step? Should I reinstall VIsual C++ - is there some weird compiler switch that might have been inadvertantly set?
|
|
|
|
|
I thought that was the source code for the grid (the first dialog that launches the second). You want to declare the m_ID in the second dialog which from the error is cContentSourcesDialog.
Is this the call that shows the second dialog???
cContentSourcesDialog dlg;
dlg.m_ID = csKey;
dlg.DoModal();
Your change should be in cContentSourcesDialog:
class cContentSourcesDialog : public CDialog
{
public:
CString m_ID;
}
John
|
|
|
|
|
Well - I did a clean and then rebuild all and now it is working........
I don't quite understand.
Thanks much for your help!
|
|
|
|
|
Hello all,
I am calling the store procedure from the VC++ application and like to pass some parameters to the store procedure.
The store procedure executes correctly when i pass hard code values like
(SQLExecDirect(hStmt,(SQLCHAR*)"{call usp_SetPushCheck(1,'A','222xyz')}", SQL_NTS)
how should i pass parameter dynamically?
I am trying to use SQLBindParameter() but i am not getting the desired store procedure result thou i am also not geting any error.
can some one help me in getting correct step/code for passing three arg. as shown above dynamically?
thanks
Prasad
|
|
|
|
|
CString str;
str.Format("{call usp_SetPushCheck(%d,'%c','%s')}", 1, 'A', "222xyz");
(SQLExecDirect(hStmt,(SQLCHAR *) str, SQL_NTS)
|
|
|
|
|
I am using SQL 2000 and VC.net. I have an image field in my table together with 2 binary fields.
The first process in my app adds a jpg image to the table and the second app does some image processing
resulting in two CByteArray values which needs to be handled via the RFX_Binary call. For some reason,
calling the recordset update function I get a message "Error: field address (column %u) has changed!\n".
I tried the msdn but this just states that the bug has been fixed. Is this me making a mistake or what is going on here.
Table1.Edit();
//Initialise the m_ByteArray1 and m_ByteArray2 of Table1 whith some procedure
Table1.SetFieldDirty(&Table1.m_ByteArray1);
Table1.SetFieldNull(&Table1.m_ByteArray1, FALSE);
Table1.SetFieldDirty(&Table1.m_ByteArray2);
Table1.SetFieldNull(&Table1.m_ByteArray2, FALSE);
Table1.Update();
//Calling the above Update, assetrs with "Error: field address ...."
Please give me some direction, appreciate
|
|
|
|
|
Hello, this is probably a rather stupid question but I've been having problems with it for a couple of days...
I have to send a message over a TCP/IP conection, i.e. sockets...the message that I must send should have a header and a trailer, the message structure is this:
<esc><esc><esc><stx><message><esc><esc><esc><etx>13<null>
I found on asciitable.com that ESC, STX, and ETX have a decimal int value of 27, 2 and 3 respectively...
I have declare the array like this:
char message[]={27,27,27,2,'h','e','l','l','o',27,27,27,3};
when I compile it marks errors, how can I address ESC, STX and ETX in a char array????
|
|
|
|
|
char message[]={'\033','\033','\033','\002','h','e','l','l','o','\033','\033','\033','\003'};
the '\033' is the octal value for ESC dec 27
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
char message[] = "\0x1b\0x1b\0x1b\0x02hello\0x1b\0x1b\0x1b\0x03";
|
|
|
|
|
edujule wrote:
char message[]={27,27,27,2,'h','e','l','l','o',27,27,27,3};
when I compile it marks errors,
I get none. Please list the compiler error(s).
|
|
|
|
|
If I want to add an browse functionality in my dialog box, how can we do that??
|
|
|
|
|
What is a browse functionality?
Kuphryn
|
|
|
|
|
The usual way is to add a button with three dots (or the word "Browse"). Add a ON_BN_CLICKED message handler for the button, and within the handler call SHBrowseForFolder or CFileDialog. Search CP for examples of both.
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
Hello!
In your dialog box, have a button where the user clicks and have that button execute this code:
void your_class_name_here::OnButtonClick()
{
CFileDialog m_file(TRUE);
CString m_value;
if(m_file.DoModal() == IDOK)
{
// get file selected
m_value = m_file.GetFileName();
UpdateData(FALSE);
}
// add whatever else you need
}
Hope that helps!
Caleb
|
|
|
|
|
and how to change font of and Titlebar of MDIChild
is there a another way than use SystemParamenterInfo()
help me .......thanks
|
|
|
|
|
I have been messing around with sockets for a while now but still can't get the code right to display ONLY the servers on a network.
How do I tell them apart from normal terminals??
Thanks.
|
|
|
|
|
What functions are you using?
Take a look at NetServerEnum()
using SV_TYPE_SERVER_NT & SV_TYPE_DOMAIN_CTRL & SV_TYPE_DOMAIN_BAKCTRL
- Anders
Money talks, but all mine ever says is "Goodbye!"
http://SourceLocker.net[^] SourceControl and DefectTracker Project.
nsms@spyf.dk <- Spam Collecting
|
|
|
|
|
Hello all,
I'm new to device programming and am pleading for somebody to help me with this problem. I own a Fujitsu N-Series Lifebook (N3010) which has an Application Panel (extra buttons for quick access to programs). I am currently trying to write a program that uses the Application Panel for specific hotkeys. Unfortunately, the only resources I have for accessing this panel is available for Linux systems (apanel.sourceforge.com), and that code is actually a device driver. I want to use the built-in device driver, but do not know how to access the device. If anybody could tell me how I am to interface with the driver and access the device, your help is greatly appreciated. Btw, I do not have the source code on the functions, defines, etc of the device driver, which is a .SYS file. Thank you!
Zero_Divide_1
|
|
|
|
|
I am trying to change the title of the MFC Window from "Untitled". Does someone know how to do this? I know that it needs to be implemented in the PreCreateWindow(cs) function. Can someone help me?
Thanks
|
|
|
|
|
Look at the SetWindowText function.
Do Lipton employees get coffee breaks?
|
|
|
|
|
You could look in your recources and add the string AFX_IDS_APP_TITLE (If you use a SDI application the name of your document is appended!)
The second thing you can do is override the PreCreateWindow() and change the value of CreateStruct.lpszName
hope this helps
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I have tried this code segment on two different compilers receiving two different results. Using MSVC++6, the console reports that the file was not opened. C++.NET reports that the file was opened but none of the input data was displayed. What string operation do I need to use to output the contents of the file to the console?
#include iostream
#include fstream
#include string
using namespace std;
string line1;
string line2;
string line3;
string line4;
ifstream inData;
int main()
{
inData.open("data.dat");
if ( !inData) // Was file opened
{
cout<<"Could not open input file.";
return 1;
}
else
{
cout<<"File was succesfully opened"<
|
|
|
|
|
Cpudood wrote:
inData.open("data.dat");
Use the full path to the file. Without a path, the OS looks in the current directory, whatever that happens to be, and the file evidently isn't in that directory.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
Latest art~!@#2rDFA#@(#*%$Rfa39f3fqwf--=
NO CARRIER
|
|
|
|
|
I have inlcuded the data file as a part of the project workspace. I don't know if that is the current directory or not but I wouldn't know how to specify its location in the actual project.
|
|
|
|