Quantcast
Channel: Visual C forum
Viewing all 15302 articles
Browse latest View live

Need help creating two windows

$
0
0

I need to create two windows - one main window with different controls that has standard appearance and another dependent window without any style for drawing. Dependent window should be closed when the main does, both should be brought to foreground with Alt+Tab, minimized/maximized together. Both windows can be positioned anywhere on the screen and can overlap.

The closest solution I found is this:

// main window
_hWnd = CreateWindow(wcMain.lpszClassName, VER, WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 0, 0, MWW, MWH, NULL, NULL, hInstance, NULL);

// graphics window
_cWnd = CreateWindow(wcDraw.lpszClassName, "Draw Window", WS_POPUP, 0, 0, CWW, CWH, _hWnd, NULL, hInstance, NULL);

I'm happy with this behavior except that the graphics window is always on top of the main one when they overlap. I need these windows to swap z-order when they are clicked on, is that possible?

Thank you!


List users and store it in stl list

$
0
0

I am trying to save the users in a domain to a list.I can't do it.help this. my code in visual c++ is

#include "stdafx.h"
#include<Windows.h>
#include<Iads.h>
#include<AdsHlp.h>
#include<iostream>
#include<atlbase.h>
#include<wchar.h>
#include<comutil.h>
#include<string.h>
#include<AdsErr.h>
#include<list>
#include<stdlib.h>
#pragma comment(lib,"adsiid.lib")
#pragma comment(lib,"activeds.lib")
#ifdef _UNICODE
#define COUT wcout
#else
#define COUT cout
#endif
using namespace std;
class usersclass
{
public:
LPWSTR name;
int str;
};

int main()
{
list<usersclass> l;
CoInitialize(NULL);
string userdetails[10000];
HRESULT hr;
IDirectorySearch *pContainertoSearch;
int count=0;
hr = ADsOpenObject(L"LDAP://DC=fabrikam,DC=com", NULL, NULL, 
ADS_SECURE_AUTHENTICATION, IID_IDirectorySearch, (void**)&pContainertoSearch);
if (hr == S_OK)
{
ADS_SEARCH_HANDLE hSearch;
LPCWSTR pszAttr[] = { L"samAccountName" };
ADS_SEARCHPREF_INFO prefInfo2[2];
prefInfo2[0].dwSearchPref = ADS_SEARCHPREF_SEARCH_SCOPE;
prefInfo2[0].vValue.dwType = ADSTYPE_INTEGER;
prefInfo2[0].vValue.Integer = ADS_SCOPE_SUBTREE;

prefInfo2[1].dwSearchPref = ADS_SEARCHPREF_PAGESIZE;
prefInfo2[1].vValue.dwType = ADSTYPE_INTEGER;
prefInfo2[1].vValue.Integer = 1000;

hr = pContainertoSearch->SetSearchPreference(prefInfo2, 2);
hr = pContainertoSearch->ExecuteSearch((LPWSTR)L"(&(objectClass=user)(objectCategory=person))",
(LPWSTR*)pszAttr, sizeof(pszAttr) / sizeof(LPWSTR), &hSearch);
if (hr == S_OK)
{
while (pContainertoSearch->GetNextRow(hSearch) != S_ADS_NOMORE_ROWS)
{
ADS_SEARCH_COLUMN col;
hr = pContainertoSearch->GetColumn(hSearch, (LPWSTR)L"samAccountName", &col);
if (hr == S_OK)
{
if (col.dwADsType == ADSTYPE_CASE_IGNORE_STRING)
{

                                                usersclass uc;

uc.name = col.pADsValues->CaseIgnoreString;
uc.str = count;
l.push_back(uc);
//printf("%S\n", col.pADsValues->CaseIgnoreString);
printf("%S\n", uc.name);
count++;
//std::cout << count;
pContainertoSearch->FreeColumn(&col);

}
else
std::cout << "Could not obtain the object\n";

}
else
{
printf("%0x\n", hr);
break;
}
}
pContainertoSearch->CloseSearchHandle(hSearch);
pContainertoSearch->Release();
}
}
CoUninitialize();


list<usersclass>::iterator it;

for (it = l.begin(); it != l.end(); ++it)
{
printf("%S\n",it->name);

                cout<<it->str<<endl;

}
return 0;
}

Yeah I got all the users from my domain.I can print it inside that while loop above as u can see (commented lines).But when I try to save that in a list and print outside of the loop, only str is printed and name is not printing properly.

Adding mscorlib.dll in a c++ project

$
0
0

I'm trying to use the DateTime struct in my Visual Studio 2017 C++ project and after configuring the project to support /clr I get the following errors:

SeverityCodeDescriptionProjectFileLineSuppression State
Error (active)E2976/clr:nostdlib requires that mscorlib.dll be in the list of forced usingsReservationDbc:\Users\Denis\source\repos\ReservationDb\ReservationDb\Reservation.h1

SeverityCodeDescriptionProjectFileLineSuppression State
Error (active)E2998PCH warning: an unknown error occurred.  An IntelliSense PCH file was not generated.ReservationDbc:\Users\Denis\source\repos\ReservationDb\ReservationDb\Reservation.h1

Any ideas on how may I solve them?

Why is CWinAppEx::OnFileNew called automatically?

$
0
0


And I just override the default CWinAppEx::OnFileNew method by

Hi, I am using Visual Studio 2015 to develop asingle document MFC program.

void CmyappApp::OnFileNew()
{
   CWinAppEx::OnFileNew();
   MessageBox(NULL, _T("hello.\n"), _T("Error"), MB_OKCANCEL);
}

Then I find that the method above is called automatically upon executing the program, because I see the Message box immediately after the program window shows up.

    I traced the stack and found that the onFileNew method gets called in CmyappApp::InitInstance by 2 functions:

    1)ProcessShellCommand(cmdInfo), in which cmdInfo.m_nShellCommand = CCommandLineInfo::FileNew by default.

    2) m_pMainWnd->UpdateWindow();

    I don't what UpdateWindow() actually does, however if ProcessShellCommand is skipped by, for example, setting cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing, the following exception will be thrown by UpdateWindow():

Exception thrown at 0x101CCC0E (mfc140ud.dll) in mrteditor.exe: 0xC0000005: Access violation reading location 0x00000020.

    Finally I have to adopt the following workaround:

    first, declare a flag initFlag which is initialized to true in the constructor of CmyappApp.

    second, set initFlag=false at the end of CmyappApp::InitInstance().

    Third, kick the routine into different branches according to the value of initFlag:

void CmyappApp::OnFileNew()
{
 if (initFlag) {
  CWinAppEx::OnFileNew();
  return;
 }
// my codes go here
}

But this way looks dirty:-( Is there any more elegant way to resolve this?

Thank you!


C++ SAFEARRAY* to C# char[]

$
0
0

C# code:

    class Hello{
        public void helloWorld(char[] chars){
            //do something
        }
    }


    

C++ code to call C#:

MyCSDLL::Hello* hello; //init hello, some calls are ok. char* myCharPtr; //init with message

SAFEARRAY* safeArray = NULL;

createSafeArray(safeArray, myCharPtr);

MyCSDLL::_MyRetVal* _retValPtr; HRESULT result = hello->helloWorld(safeArray, (MyCSDLL::_MyRetVal) _retValPtr);

void createSafeArray(SAFEARRAY** saData,char* charPtr){char*iterator= charPtr;
    SAFEARRAYBOUND  Bound;*saData =SafeArrayCreate(VT_R8,1,&Bound);char HUGEP *pdFreq;
    HRESULT hr =SafeArrayAccessData(*saData,(void HUGEP* FAR*)&pdFreq);if(SUCCEEDED(hr)){do{*pdFreq++=*iterator;}while(*iterator++);}}


How to call `hello.helloWorld()`? it is expecting `SAFEARRAY*`.


C++ Project is not CLR.


How to include library header files in subdirectory

$
0
0

Hi, I have a Visual Studio 2015 C++ project organized like this:

myapp

  |

   -- subdir/something.cpp

   -- libdir/blabla.h

And I have add path\to\myapp\libdir to the "Include directories", "library directories" as well as "Additional include directories" in project property.

However, when I include blabla.h in something.cpp:

#include <blabla.h>

I still get the "cannot open source file blabla.h" error.

Files right under the root directory do not have such problem.

I know "#include "../libdir/blabla.h"" may bypass this issue, but it's not very beautiful.

Can't VC project be organized into hierarchical directories, like Linux does?

Thank you!


How to Write Collection Class Helper CompareElements?

$
0
0

Hi,

I am using Visual C++ & MFC. Now I need to use CMap and the key is a special structure CMyKey defined by myself. Since the structure is large, I plan to use CMyKey& as the ARG_KEY. Therefore, I use CMap as below:

typedef CMap<CMyKey, CMyKey&, DWORD, DWORD> CMyMap;

Now I need to implement the collection class helper as described in https://msdn.microsoft.com/en-us/library/7y37x7cs.aspx

It said the function should be like this:

template<class TYPE, class ARG_TYPE>

BOOL AFXAPI CompareElements(

   const TYPE* pElement1,

   const ARG_TYPE* pElement2

);

So I write the specialization of the template function as below:

template< > BOOL AFXAPI CompareElements<CMyKey, CMyKey&> (const CMyKey* pElement1, const CMyKey&* pElement2)

{

}

But the compiler said a pointer to a reference(const CMyKey&*) is illegal. I have to modify the function as below:

template< > BOOL AFXAPI CompareElements<CMyKey, CMyKey> (const CMyKey* pElement1, const CMyKey* pElement2)

{

}

Now the compilation is fine. But I cannot understand why. Since I have already defined ARG_KEY as CMyKey&, not CMyKey, why I should use CMyKey instead of CMykey& as the ARG_TYPE?

Thanks

sound processing in VC++ Visual Studio

$
0
0

Hello from Ireland.  I'm trying to receive and send some voice in Visual Studio to write a chatroom (Skype style) and I'm having a real nasty. I'd like to know if anyone has run into the same issue or has any suggestions. I call the WaveOutOpen command and that calls a callback function which I use to do whatever (I'm actually using it to send voice to another computer through a holepunch socket). That works. I have it running in a thread.

If I listen on a socket in another thread, the callback function (above) is no longer called.

It works if I have the waveoutopen in the foreground but that's not much use. If I have them both in threads, then I just listen on a socket with a recvfrom or even a select command and the waveopen no longer calls its callback. This is live voice but I get the same symptoms if I am processing a file. It seems that VC++ in windows cannot listen for sound on one thread and process sound from a mike or file on another thread. Any suggestions anyone?  Peadar


"cannot register dll code=-2147024891"

$
0
0

Hi,

While running a visual studio 2008 SP1 app, I get this error.

Any ideas? 



Question about file with random name without extension

$
0
0
Hi, I'm new here .. Can anyone help me with 1/2 functions? I found a random name file with no extension in TEMP. So I have to find  with C ++ like this: "find TEMP file (without C: \ Users \ AppData \ Local \ Temp) there you will find file witch got 16 random digits and that file is without extension " . So what i know is : 1.that file is somewhere in temp 2. that file dont have extension. 3. that file got 16 random digits. How can i find it?

CComboBox::GetItemDataPtr() function is returning NULL.

$
0
0

For a  ComboBox item, we are calling GetItemDataPtr() function and casting the return value to double* (using C-style cast). Then we are dereferencing the casted pointer. But the application is crashing because the pointer has became NULL.

Issue code:

(*((double*) GetItemDataPtr(nIndex)))

Are there any scenarios where GetItemDataPtr() can return NULL?

Or C-style casting to double* is causing problem?

I can't debug the crash since I'm analyzing this crash using dump files. Also, I'm not able to find whether casting double* is causing NULL or GetItemDataPtr() itself  is returning NULL.

Kindly let me know what might be the root cause.

Regards,

Abhilash


CDHtmlDialog KeyUp event

$
0
0

Hi,

In CDHtmlDialog I have many controls. and  for every controls I am adding DHTML_EVENT_KEYUP in the EVENT_MAP.

BEGIN_DHTML_EVENT_MAP(CSampleDlg)
DHTML_EVENT_ONKEYUP(_T("Id1"), OnChangeValues)

In CDialog we on_wm_keyup to catch key events for all controls likewise is there any way to handle in CDHtmlDialog().

Thanks.



How to use GDI+ to load a GIF image?

$
0
0

I am trying to load an image (GIF) from a file using GDI+ to be displayed in a static control, but the loaded image always points to NULL, I also tried to load a bitmap, the loaded image is also NULL.

Could you help me check if there is any problem in the code below? Thanks in advance.

HBITMAP ctrlBitmap(NULL);
LPCTSTR lpszResourceName = MAKEINTRESOURCE(IDB_THICKNESSZ);
ASSERT(lpszResourceName != NULL);
Gdiplus::Image *image = Gdiplus::Image::FromFile(lpszResourceName);
Gdiplus::Bitmap* pBitmap = static_cast<Gdiplus::Bitmap*>(image->Clone());
Gdiplus::Status status = pBitmap->GetHBITMAP(Gdiplus::Color(0, 0, 0), &ctrlBitmap);

GetParent()->GetPropertySheet()->SetControlImage(ctrlBitmap);

Adding sqlite3 to Solution

$
0
0

Hello,

I have the following project in my VS Solution:

- ReservationDb - Dll library

- ReservationDbTest - Google Test project

I've installed the following package: https://www.nuget.org/packages/sqlite3/ and when I compile my testing project I get the following errors:

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorLNK2019 unresolved external symbol _sqlite3_close referenced in function "unsigned int __cdecl DestroyComponent(void)" (?DestroyComponent@@YAIXZ)ReservationDbTestC:\Users\Denis\source\repos\ReservationDb\ReservationDbTest\ReservationDb.lib(ReservationDb.obj)1

SeverityCodeDescriptionProjectFileLineSuppression State
ErrorLNK2019 unresolved external symbol _sqlite3_open referenced in function "unsigned int __cdecl InitializeComponent(void)" (?InitializeComponent@@YAIXZ)ReservationDbTestC:\Users\Denis\source\repos\ReservationDb\ReservationDbTest\ReservationDb.lib(ReservationDb.obj)1

Any ideas why this only happens when I compile my testing project? I can successfully compile the ReservationDb project. Thank you!

I can confirm that the nuget package is installed for both solutions.

no Images on toolbar buttons

$
0
0

Here is my function for the toolbar creation. Image is a bitmap created with VS toolbar editor. Also, I'm unclear how the linker associates my bitmap with the #define in the .h file. Some magic when the .rc file is linked in?

void c_CharEditWindow::Toolbar()
{
	HIMAGELIST g_hImageList = NULL;

	hwndToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, NULL, WS_CHILD | TBSTYLE_WRAPABLE,
		0, 0, 0, 0, m_hwnd, NULL, GetModuleHandle(NULL), NULL);

	g_hImageList = ImageList_Create(22, 22, ILC_COLOR16 | ILC_MASK, 4, 0);

	SendMessage(hwndToolbar, TB_SETIMAGELIST, 0, (LPARAM)g_hImageList);

	SendMessage(hwndToolbar, TB_LOADIMAGES, (WPARAM)IDR_TOOLBAR1, (LPARAM)GetModuleHandle(NULL));

	TBBUTTON tbButtons[4] = {
	{ID_BUTTON40002, WM_MOVE, TBSTATE_ENABLED, BTNS_AUTOSIZE, {0}, 0, NULL },
	{ MAKELONG(ID_BUTTON40003, 0), WM_MOVE, TBSTATE_ENABLED, BTNS_AUTOSIZE, { 0 }, 0, NULL },
	{ MAKELONG(ID_BUTTON40004, 0), WM_MOVE, TBSTATE_ENABLED, BTNS_AUTOSIZE, { 0 }, 0, NULL },
	{ MAKELONG(ID_BUTTON40005, 0), WM_MOVE, TBSTATE_ENABLED, BTNS_AUTOSIZE,{ 0 }, 0, NULL }
	};

	SendMessage(hwndToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);
	SendMessage(hwndToolbar, TB_ADDBUTTONS, 4, (LPARAM)&tbButtons);
	SendMessage(hwndToolbar, TB_AUTOSIZE, 0, 0);

	ShowWindow(hwndToolbar, TRUE);

}
I only get blank buttons.



cl option unable to build the file which presented is presented at the relative UNC location

$
0
0

I'm trying to build the file which is presented at the UNC path. Here i'm providing simple example to get more clarity.

main.cpp

#include <iostream>
#include "additionApi.hpp"

int main(){

    int a=10, b=20;
    std::cout<<"Addition:"<<addNumbers(a,b);

    return 0;
}

tmpOperation\additionApi.hpp

int addNumbers(int a, int b);

tmpOperation\additionApi.cpp

#include <iostream>
int addNumbers(int a, int b){
    return a+b;
}

tmpOperation\Makefile

tmpOperationDir = \\unc\path\location\tmpOperation
%.obj:%.cpp
    cl /TP /Od /Oy- -Zi /EHsc -I"." -I"$(tmpOperationDir)" /c $< /Fo$@

../math_exe:additionApi.obj ../main.obj
    link /OUT:../math.exe  additionApi.obj ../main.obj

all:../math_exe

In the above file structure, i'm using make command from the tmpOperaion directory. main.cpp is presented at outside of the tmpOperaion directory. So i'm accessing main.cpp using the relative path as ../main.cpp in Makefile. But it is unable to build the main file and giving the following error.

gmake: *** No rule to make target `../main.obj', needed by `../math_exe'.  Stop. 

So finally, below are my straight forward questions:

  1. can we build a file(main.cpp in the given example) relatively from the UNC path  ?

Radio button automatically checked at form startup

$
0
0

I've form with a only 4 radio buttons in it. When I start it, the top most radio button (which has tab index=0) is automatically checked. How do I set it in such a way that nothing is checked when the form starts?

Thanks!


facebook.com/prateek203

Win10 UI without minimize & maximize buttons

$
0
0

Hey I'm currently trying to create a windows UI which only displays the close button in the title bar.

Is this even possible in windows?

So far it only works without displaying anything or displaying all 3 buttons.


Video Game Developer

Windows fonts

$
0
0

I would like to add the fonts used with excel to an application I am writing. The application is sold commercially. Do I need a license for the fonts? I have found some avialableto download  for free from the net which I am using in my development version, but obviously if we include them in the release version we would need to get a license if required. Advice please!

Debug assertion failed! MFC Application Visual studio 2015 c++

$
0
0

I am new to visual studio and I want to create a simple mfc application with a combo box selection. 

// MFCApplicationTestDlg.cpp : implementation file
//

#include "stdafx.h"
#include "MFCApplicationTest.h"
#include "MFCApplicationTestDlg.h"
#include "afxdialogex.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CAboutDlg dialog used for App About

class CAboutDlg : public CDialogEx
{
public:
    CAboutDlg();

// Dialog Data
#ifdef AFX_DESIGN_TIME
    enum { IDD = IDD_ABOUTBOX };
#endif

    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

// Implementation
protected:
    DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialogEx(IDD_ABOUTBOX)
{
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx)
END_MESSAGE_MAP()


// CMFCApplicationTestDlg dialog



CMFCApplicationTestDlg::CMFCApplicationTestDlg(CWnd* pParent /*=NULL*/)
    : CDialogEx(IDD_MFCAPPLICATIONTEST_DIALOG, pParent)
{
    m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CMFCApplicationTestDlg::DoDataExchange(CDataExchange* pDX)
{
    CDialogEx::DoDataExchange(pDX);
}

BEGIN_MESSAGE_MAP(CMFCApplicationTestDlg, CDialogEx)
    ON_WM_SYSCOMMAND()
    ON_WM_PAINT()
    ON_WM_QUERYDRAGICON()
    ON_CBN_SELCHANGE(IDC_COMBO1, &CMFCApplicationTestDlg::OnCbnSelchangeCombo1)
    ON_CBN_SELENDOK(IDC_COMBO1, &CMFCApplicationTestDlg::OnCbnSelendokCombo1)
END_MESSAGE_MAP()


// CMFCApplicationTestDlg message handlers

BOOL CMFCApplicationTestDlg::OnInitDialog()
{
    CDialogEx::OnInitDialog();

    // Add "About..." menu item to system menu.

    // IDM_ABOUTBOX must be in the system command range.
    ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
    ASSERT(IDM_ABOUTBOX < 0xF000);

    CMenu* pSysMenu = GetSystemMenu(FALSE);
    if (pSysMenu != NULL)
    {
        BOOL bNameValid;
        CString strAboutMenu;
        bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX);
        ASSERT(bNameValid);
        if (!strAboutMenu.IsEmpty())
        {
            pSysMenu->AppendMenu(MF_SEPARATOR);
            pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
        }
    }

    // Set the icon for this dialog.  The framework does this automatically
    //  when the application's main window is not a dialog
    SetIcon(m_hIcon, TRUE);         // Set big icon
    SetIcon(m_hIcon, FALSE);        // Set small icon

    // TODO: Add extra initialization here
    CComboBox *combo = new CComboBox();
    combo->AddString(L"csv1.csv");
    combo->AddString(L"csv2.csv");
    combo->AddString(L"csv3.csv");


    return TRUE;  // return TRUE  unless you set the focus to a control
}

void CMFCApplicationTestDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
    if ((nID & 0xFFF0) == IDM_ABOUTBOX)
    {
        CAboutDlg dlgAbout;
        dlgAbout.DoModal();
    }
    else
    {
        CDialogEx::OnSysCommand(nID, lParam);
    }
}

// If you add a minimize button to your dialog, you will need the code below
//  to draw the icon.  For MFC applications using the document/view model,
//  this is automatically done for you by the framework.

void CMFCApplicationTestDlg::OnPaint()
{
    if (IsIconic())
    {
        CPaintDC dc(this); // device context for painting

        SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);

        // Center icon in client rectangle
        int cxIcon = GetSystemMetrics(SM_CXICON);
        int cyIcon = GetSystemMetrics(SM_CYICON);
        CRect rect;
        GetClientRect(&rect);
        int x = (rect.Width() - cxIcon + 1) / 2;
        int y = (rect.Height() - cyIcon + 1) / 2;

        // Draw the icon
        dc.DrawIcon(x, y, m_hIcon);
    }
    else
    {
        CDialogEx::OnPaint();
    }
}

// The system calls this function to obtain the cursor to display while the user drags
//  the minimized window.
HCURSOR CMFCApplicationTestDlg::OnQueryDragIcon()
{
    return static_cast<HCURSOR>(m_hIcon);
}



void CMFCApplicationTestDlg::OnCbnSelchangeCombo1()
{
    // TODO: Add your control notification handler code here
    CString csv[] = { _T(""), _T("csv1.csv"),_T("csv2.csv"),_T("csv3.csv") };
    UpdateData(FALSE);
}


void CMFCApplicationTestDlg::OnCbnSelendokCombo1()
{
    CComboBox *combo1 = new CComboBox();
    CString file;
    int n;
    // TODO: Add your control notification handler code here
    int index = combo1->GetCurSel();
    combo1->GetLBText(index, file);

}


It was working till yesterday and I was just wondering how to display the string. But today I have got this problem which says


Debug Assertion failed!

Program:
...Root\MFCApp\MFCApplicationTest2\Debug\MFCApplicationTest2.exe
File:f:\dd\vctools\cv7libs\shop\atlmfc\include\afxwin2.inl
Line: 795

For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts.

(Please retry to debug the application)

And when I click retry I get this,

MFCApplicationTest2.exe has triggered a breakpoint.


breaking this takes me to this line of assertion failure,

	{ ASSERT(::IsWindow(m_hWnd)); return (int)::SendMessage(m_hWnd, CB_ADDSTRING, 0, (LPARAM)lpszString); }

I checked this post which is related to my question on the topic on this forum,

MFX CComboBox assert error doing AddString

and I noticed that I haven't made that mistake and I am not sure what the problem is.

Please do help.

Viewing all 15302 articles
Browse latest View live