|
I am carrying out an ActiveX. I have a variable COLORREF in one of the page of Properties...and I want to use it in the .cpp that controls the ActiveX...how can i send this variable?
Thanks
|
|
|
|
|
you can use extern keyword for sharing variable between files!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi i'm trying to build a ms access database controller using visual c++ using the ado format. This also has to have client sever using ip addresses. does any one have any example code of a working system?
or a tutorial to follow to conplete this?
regards
|
|
|
|
|
DOes anyone of you know about the C++ bulider and its Client server Suit. I have got C++ builder 1997 edition but there is no serversocket and clientsocket item in the internet component tool kit. Plz help me out from where to download them ? or from where to activate them?
|
|
|
|
|
I am currently developing a little IE deskband that gives the user the ability to hotswap between proxy settings with the click of a button, the button then changes to the user knows what the current proxy setting is(Green Means Proxy On|Red Means Proxy off). The one problem I am running into is the fact that it is able to determine the proxy setting when I start IE and thus the button is correctly set, but if I manually change the proxy through IE via Tools -> Internet Options -> Connection Tab -> Lan Settings, the button doesn't update. I was wondering if there is anyway I could envoke a ilstener that would be able to notice when I manaully change the proxy and then set the button based on its current setting after said event. Might be a difficult explanation to understand but if anybody is interested please e-mail me if you want further explanation.
|
|
|
|
|
|
Thanks for pointing me in the right direction Gerald. but I can't quite seem to figure out how to exactly write something that would actively monitor for a change in this registry key. Any help with this would be greatly appreciated. I'm not an expert developer so you'll have to bear with me.
|
|
|
|
|
RegNotifyChangeKeyValue monitors the registry key for you. If you use the RegNotifyChangeKeyValue synchronously, then it waits until a subkey has changed before continuing execution. You could use a loop and continue to moniter. If you use RegNotifyChangeKeyValue asynchronously, then you wait on the event instead.
Run the code below. It will wait during the call to RegNotifyChangeKeyValue. Then change your proxy setting through IE and click ok. Then you will see the MessageBox.
#include <tchar.h>
#include <windows.h>
INT WINAPI
_tWinMain (
HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPTSTR lpCmdLine,
INT nCmdShow
)
{
LONG l = 0L;
HKEY hKey = {0};
l = RegOpenKeyEx (
HKEY_CURRENT_USER,
_T("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings"),
0,
KEY_NOTIFY,
&hKey );
if(l == ERROR_SUCCESS)
{
l = RegNotifyChangeKeyValue (
hKey,
FALSE,
REG_NOTIFY_CHANGE_LAST_SET,
NULL,
FALSE );
MessageBox(NULL, _T("Registry key changed"), _T("Registry key changed"), 0);
RegCloseKey(hKey);
}
return 0;
}
|
|
|
|
|
i have created a 3D world scene and i want it to be in movie (2D)
i tried to do that by Audio Video PlayBack in directX but i get flicker
i tried it also to do that by VMR9 but it takes bitmaps as an input and i have textures so it'll take a time to convert.
I need it in run time. Thanks for your help
|
|
|
|
|
Sorry no code.
(USING TAPI)
I have a program (I wrote) that makes a call via modem to download data. The program has been working on Wind9x/NT4.0 and above for a few years. Now we have an XP machine here that will download with the internal modem, but will cause the program to crash if you use an external modem.
If anybody has any ideas! Please pass them on!
Thank you!
Signed John R. Shaw
|
|
|
|
|
hi,everyone.
I am learining how to use GDI+.
I do the following things in my programme:
1. Include gdiplus.h
2. Add the gdiplus.lib in Project->Settings->Link-> Object/library modules .
3. Add "using namespace Gdiplus;" at the beginning of the source code.
4. Initialize GDI+ using GdiplusStartup.
but I got a lot of errors:
Compiling...
StdAfx.cpp
f:\microsoft visual studio\myprojects\trygdipp\stdafx.h(22) : error C2871: 'GdiPlus' : does not exist or is not a namespace
c:\program files\microsoft sdk\include\gdiplusinit.h(32) : error C2065: 'ULONG_PTR' : undeclared identifier
c:\program files\microsoft sdk\include\gdiplusinit.h(32) : error C2065: 'token' : undeclared identifier
c:\program files\microsoft sdk\include\gdiplusinit.h(32) : error C2165: 'left-side modifier' : cannot modify pointers to data
c:\program files\microsoft sdk\include\gdiplusinit.h(32) : error C2071: 'NotificationHookProc' : illegal storage class
c:\program files\microsoft sdk\include\gdiplusinit.h(33) : error C2146: syntax error : missing ')' before identifier 'token'
c:\program files\microsoft sdk\include\gdiplusinit.h(33) : error C2165: 'left-side modifier' : cannot modify pointers to data
c:\program files\microsoft sdk\include\gdiplusinit.h(33) : error C2071: 'NotificationUnhookProc' : illegal storage class
c:\program files\microsoft sdk\include\gdiplusinit.h(33) : error C2059: syntax error : ')'
c:\program files\microsoft sdk\include\gdiplusinit.h(86) : error C2059: syntax error : 'const'
c:\program files\microsoft sdk\include\gdiplusinit.h(95) : error C2146: syntax error : missing ')' before identifier 'token'
c:\program files\microsoft sdk\include\gdiplusinit.h(95) : warning C4229: anachronism used : modifiers on data are ignored
c:\program files\microsoft sdk\include\gdiplusinit.h(95) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
c:\program files\microsoft sdk\include\gdiplusinit.h(95) : error C2059: syntax error : ')'
c:\program files\microsoft sdk\include\gdiplusflat.h(2639) : warning C4229: anachronism used : modifiers on data are ignored
c:\program files\microsoft sdk\include\gdiplusflat.h(2639) : error C2440: 'initializing' : cannot convert from 'int' to 'enum Gdiplus::Status'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
c:\program files\microsoft sdk\include\gdiplusflat.h(2644) : error C2146: syntax error : missing ')' before identifier 'token'
c:\program files\microsoft sdk\include\gdiplusflat.h(2644) : warning C4229: anachronism used : modifiers on data are ignored
c:\program files\microsoft sdk\include\gdiplusflat.h(2644) : error C2182: 'GdiplusNotificationUnhook' : illegal use of type 'void'
c:\program files\microsoft sdk\include\gdiplusflat.h(2644) : error C2059: syntax error : ')'
Error executing cl.exe.
TryGdipp.exe - 17 error(s), 3 warning(s)
So I includeed
typedef unsigned __int64 ULONG_PTR;
in stdafx.h and there left one error:
Linking...
LINK : fatal error LNK1104: cannot open file "C:\Program.obj"
Error executing link.exe.
TryGdipp.exe - 1 error(s), 0 warning(s)
Can someone tell me how to solve the problem?
Thank you!
to PJ Arends ,thanks your answer.
|
|
|
|
|
chenqingzhi wrote:
error C2065: 'ULONG_PTR' : undeclared identifier
You need to get the Platform SDK. Alternatively, you can add the right definition of ULONG_PTR :
typedef unsigned long ULONG_PTR; however you're eventually going to have other compilation errors with your old header files.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
See here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
but there comes the new error as I descripted in this new thread
Linking...
LINK : fatal error LNK1104: cannot open file "C:\Program.obj"
Error executing link.exe.
TryGdipp.exe - 1 error(s), 0 warning(s
And I have download the lastest Platform SDK.
Thank you.
|
|
|
|
|
chenqingzhi wrote:
LINK : fatal error LNK1104:
See here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi...
I don´t know if this is the right place but... I am searching for a class to manipulate the RS-232 interface. I have seen something related with this in new visual studio... but I don´t know where can I find it... any suggestion?
thanks
|
|
|
|
|
Try this[^] or one of the other articles on serial I/O.
Signed: John R. Shaw
|
|
|
|
|
Is there any way to stop "Press any key to continue" from showing on the MS-DOS window upon the termination of a program written in C++?
|
|
|
|
|
Run it from a command prompt rather than the IDE.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Don't run it from the IDE. The "press any key" feature is there so you can read the output of your program before the console disappears, but in a regular cmd session you'll just be back at the command prompt. In VS2005, you'll actually be able to keep the console window around between sessions.
Medication for us all
You think you know me, well you're wrong
|
|
|
|
|
Thanks for the Info!!
|
|
|
|
|
Is there anything in the Win32 API or in MFC that I can use to create a very simple program that will convert a text file into a PDF?
|
|
|
|
|
None thatI know of, but there are lots of utilities you can Google for that do this.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I had already seen a few of these utilities, but I just wanted to see if there was something in an existing API that would suit my needs (something I wouldn't have to pay for to distribute w/ my other software). Looks like that isn't possible, Thanks.
|
|
|
|
|