When I'm debugging something in Delphi and there's a system library in the stack trace, I've got the name of the library and the function that's being called into. Unfortunately, this doesn't seem to apply to any other external DLLs. I've got one that was compiled in Visual C++ 2005, and any time it gives me any sort of trouble, I have...
Hello,
Is there any C# equivalent of the code below?
HRESULT hr;
ActiveXSite* pSite;
pSite = CAxWindowlessHost<CMainDlg>::CreateControlSite(L"AgControl.AgControl", NULL, IDC_AGCONTROL1);
if ( pSite != NULL )
{
// disable right-click!
pSite->SetAllowRClick(false);
// set moniker URL
CCom...
When I write the following:
private: System::Void queue_FormClosing(
System::Object^ sender,
System::Windows::Forms::FormClosingEventArgs^ e) {
if(e->CloseReason!=CloseReason::FormOwnerClosing) e->Cancel=true;
}
I get this error:
###\queue.h(153) : error C2039: 'FormOwnerClosing' : is not a member of 'System::Windows:...
I have a predefined struct (actually several) where variables span across 32-bit word boundary. In Linux (and Windows using GCC) I am able to get my structs to pack to the correct size using 'attribute((packed))'. However I cannot get it to work the same way using VC++ and #pragma pack.
Using GCC this returns a correct size of 6 bytes...
Hi !
I use alutLoadMemoryFromFileImage to convert a wav file that lies in memory to data that can be used in OpenAL. The docu says, the returned data is only malloced and can simply be freed afterwards, but when I try that, my application crashes.
Can someone explain this to me or show me an example of how to use alutLoadMemoryFromFile...
I have a resizeable CListCtrl and I want to avoid any item being displayed partially, ever.
For example:
I want Item 9 to not be displayed in this case. Is there a flag or method for this? How would you go about solving this issue?
I tried the following and it was no good:
void CMyCListCtrl::OnEndScrolling()
{
int iCount = this...
Is there a way to make a TaskDialog always on top (ie, system modal)?
I've checked the TaskDialogConfig structure (http://msdn.microsoft.com/en-us/library/bb787473%28VS.85%29.aspx), but I'm not having any luck.
Anyone know how to do it or if it's possible?
...
Hello All,
I am working on a installer, it should check FUS (Fast user switching) is enabled or not on the XP system. If FUS is enabled then installer should exit, otherwise perform the actual installation. My question is there any command line utility (or API) to check if FUS is enabled on XP?
Thanks..
...
I want to execute some code when the user selects a row in a CListCtrl (report view, I don't care about the other viewing modes).
How do I catch this event? is there some message I can map or a method like "OnSelectionChanged" or something like that?
...
I've got a code snippet of c# that I've been trying to translate into vc++, but I'm having some difficulties. So, I'm wondering if it is possible or advisable to mix c# and vc++; that is to say, can I call my c# function from vc++ and vice-versa. If so, are there tricks to it? If, not, why?
...
I have a device that is connected on port COM4, (115200 baud, 8-N-1). Based on examples I found here I'm opening the port with:
Keyboard_Handle=CreateFile("\\\\.\\COM4",GENERIC_WRITE,0,NULL,OPEN_EXISTING,FILE_FLAG_OVERLAPPED,NULL);
if(GetLastError() !=0 || Keyboard_Handle == INVALID_HANDLE_VALU...
Suppose I have an RAII-style C++ class:
class StateSaver
{
public:
StateSaver(int i) { saveState(); }
~StateSaver() { restoreState(); }
};
...to be used like so in my code:
void Manipulate()
{
StateSaver save(1);
// ...do stuff that modifies state
}
...the goal being to enter some state, do stuff, then leave that sta...
My Node.h is
class Node{
private:
int x;
int y;
public:
Node();
Node(int x, int y);
void setXX( int x);
.....
}
In Node.cpp I am doing:
#include "Node.h"
#include "stdafx.h"
Node:: Node(){}
Node:: Node(int x, int y){
this->x = x;
this->y =y;
}
void Node::setXX(int x){
this->x = x;...
Does anybody has a hint for the following problem?
I have a derived class from CPaneDialog, it contains just one button. I want to show a tooltip if the mouse is over it. For this I use CMFCToolTipCtrl:
// Create the ToolTip control.
m_ToolTip.Create(this, TTS_ALWAYSTIP | TTS_NOPREFIX);
m_ToolTip.Activate(TRUE);
CMFCToolTipInfo params...
SHChangeNotifyEntry changeentry = new SHChangeNotifyEntry();
changeentry.pIdl = GetPidlFromFolderID(this.Handle, CSIDL.CSIDL_DESKTOP);
changeentry.Recursively = true;
uint notifyid = SHChangeNotifyRegister(
this.Handle,
SHCNF.SHCNF_PATHA ,
SHCNE.SHCNE_ALLEVENTS,
...
public partial class Form1 : Form
{
[DllImport("coredll.dll")]
static extern int SetWindowLong(IntPtr hWnd, int nIndex, IntPtr dwNewLong);
[DllImport("coredll.dll")]
static extern IntPtr CallWindowProc(IntPtr lpPrevWndFunc, IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
[DllImport("coredll.dll")]
public static exte...
My application used to use an MFC CEdit control and we had no problems with wide character (Unicode) strings. After switching to a CRichEditCtrl, it seems that Unicode is no longer supported. Chinese characters become "??" and so forth. I have read that CRichEditCtrl uses RichEdit* under the hood and I have played around with trying to c...
I have a project which have three dialog, Let's say A, B, C.
And A contain B & C, B contains C.
They all are inherited from a DialogBase class
and have a setBitmap function to set a background image.
And I have add the relationship that every time drag on C, B will drag as well.
and B is a transparent dialog!
When onLbuttonDown is trig...
We are seeking ideas on resolving a problem with linking/pdb generation when running multiple devenv.com using Visual Studio 2005.
We are getting the following intermittently errors when doing parallel builds using devenv.com.
I.e. when the following get run at the same time on the same build server:
devenv.com master.sln /build "Relea...
Hi All vc++ Masters,
I am migrating my vs-2003 code to vs-2008(on vista machine)...I have the compilation successfully.But i am getting the compilation errors in the debug mode...
I think It should be issue of multiple string datatypes in my project like: MFC Cstring, DblString datatype, char *. It might be mismatch of MFC/ATL Cstring...