|
i'm using VC++6;
i want to declare a global variable(i.e., to be seen in all the classes of the app)
i tried to declare it n CMyApp ( : public CWinApp) but an error message (undeclared identifier) usually appears..
regards.
keep the matter as simple as it can be !!
|
|
|
|
|
what errror ? and where does the error appears ?
you need to #include your app class .h file in the files you will access CMyApp
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
hi
ypu can declare the "extern int <variable name>" in your stdafx.h the applications global file where you have to use that variable again declare there in that header file your change will affect to the original global variable.
I think this works
Best Regards
ganesh
|
|
|
|
|
I have this code:
//BEGIN ====================
IP_ADAPTER_INFO AdapterInfo[16];// Allocate information for up to 16 NICs
DWORD dwBufLen = sizeof(AdapterInfo);// Save the memory size of buffer
DWORD dwStatus = GetAdaptersInfo(// Call GetAdapterInfo
AdapterInfo,// [out] buffer to receive data
&dwBufLen); // [in] size of receive data buffer
PIP_ADAPTER_INFO pAdapterInfo = AdapterInfo;// Contains pointer to current adapter info
//END========================
I want to convert the pAdapterInfo->Address to a std::string
Can anybody help me on this?
Thanks in advance.
Julio
|
|
|
|
|
Well,
It worked pretty well:
std::string MACData2String (unsigned char MACData[]){
std::string tmp;
char slask[100];
sprintf(slask,"%02X-%02X-%02X-%02X-%02X-%02X", MACData[0], MACData[1], MACData[2], MACData[3], MACData[4], MACData[5]);
tmp=slask;
return tmp;
}
|
|
|
|
|
Hello!
How can I open .col files with hh.exe? I already installed the latest version of HtmlHelp Workshop and tried to run the hhupd.exe, but it tells me that I got a newer version already (I'm using Windows XP SP2).
Do I have to install any update? How to make hh.exe open .col files?
Thanks in advance and best regards
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
alcowboy wrote:
I am very new to using VB.NET.
Is that why you posted to the VC++ forum? Try here for a better response.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi, i got a little problem.
In CEdit if we set Number=true we can only enter numerical characters and if we press a non-numeric char, there is an "information message"
My question,
1) is it possible to use something to accept "." s for floating numbers
2) if 1st one is not possible, is there any way to show that information message while not using Number=true format.
Thanks
|
|
|
|
|
If you need floating-point numbers, you'll need to use a custom (masked) edit control. There are several here at CP.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
OK. How can i show windows information message about numeric characters
|
|
|
|
|
I don't understand your question.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
OK. in CEdit when we choose number=true, and we enter a non-numeric character there is an error message like a tooltip. that writes something like not to enter non-numeric characters. Can i call that tooltip(or whatever it is), while not using number=true format.
|
|
|
|
|
ugur_basak wrote:
Can i call that tooltip(or whatever it is), while not using number=true format.
Yes, check out CWnd::EnableToolTips() as well as the CToolTipCtrl class.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
HI all,
is it possible to pre-pend to a CString as opposed to append, ie place a new string at the start of the string instead of the end. Thanks
Shane
|
|
|
|
|
Yes, just switch the order of the operands. Something like:
CString name("is David");
name = "My name " + name; Make sense?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
You can also use the Insert.
Insert( int, PCXSTR );
Insert( int, XCHAR );
Example:
CString test( "is a test" );
test.Insert( 0, "This " );
Larry J. Siddens
|
|
|
|
|
Thanks guys, stupid of me to not even think of that!!!
|
|
|
|
|
I have a VC++ application with tab views in the main window. I wish to be able to send some information and have it displayed in the lower portion of the main window. There are 3 shaded boxes for information along the lower right edge of the main window now. How can I access and write to those location?? Just not sure how to do it.
Thanks.
Jerry
|
|
|
|
|
|
I would like to get some code for opening a Access database. So that I can use an Excutable to open a the database rather than the .mdb Im not that familuar with Visual C++ but thats all I have avalible to me but I do know the basics Thanks for any help.
|
|
|
|
|
For starters, create a new MFC AppWizard (exe) project via AppWizard. One of the steps will ask if you want database support. Reply in the affirmative. You will then need to select an existing DSN. After that, you select the table and the columns you are interested in. The default query that is generated for you is something like "SELECT * FROM <whatever table="" you="" chose="">".
If you have an existing MFC project, you can derive a new class from CRecordset . It will prompt you for the same DSN, table, and column that AppWizard did.
When you get this far, come back and ask some more questions. It's easier to go a few steps at a time.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Okay this probably sounds weird I know a little about ADO but all I want to do is have an EXE open a mdb and still have it open in access. Thanks again. By the way i would love to do my whole database with ado but there so many things i dont yet know how to do in C++ that I can do in Access. Thanks again.
|
|
|
|
|
thetuxpenguin wrote:
all I want to do is have an EXE open a mdb and still have it open in access.
Then it sounds like you simply need to use ShellExecute() with the "open" verb. Use the absolute path to the .mdb file as the third parameter.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks your awsome could you show me an example..
|
|
|
|