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

How to determine a menu item is checked/unchecked using CMFCToolBarMenuButton in a toolbar?

$
0
0

I'm using CMFCToolBarMenuButton  in a toolbar where I create a popup menu and replace a button in the toolbar with a dropdown menu. When I select a menu item I get to the ON-COMMAND... function but I do not know how to determine if the menu item I selected is checked or uncheck. How do I do this?

I should add that I also want to toggle the menu item on/off.

Thanks



Access .NET 4.5 DLL from 2.0 Application

$
0
0

We have upgraded one application to .NET 4.5.2 Framework, and also we have some older application built in .NET 2.0.

The issue here is, the 2.0 Application cannot find the 4.5 dlls which is under the new GAC (%windir%\Microsoft.NET\assembly). I think 2.0 application still looks in old GAC.

Any configuration changes will fix this issue?

Please suggest some solutions. Thanks.

CEdit PosFromChar() broken?

$
0
0

Same as https://social.msdn.microsoft.com/Forums/vstudio/en-US/5740af95-ec61-4f6a-b46b-ad22521e4609/cedit-posfromchar-broken

but nothing has changed since 2011. The documentation is still wrong and / or the function is not doing what the documentation says. 

If the documentation is wrong how do I get the point behind the last character, I want to call SetCaretPos(point) to move the caret.

Thanks for the help,


Andreas

MFC: I cannot Resize programmatically an MFC Child Dialog contained in it's Parent Dialog

$
0
0

Hello all!

I'm sorry for my bad english but this problem is exciting for someone who knows and understand the MFC and have to be corrected with your help as soon as possible

I'm working actually on the open source Project MicroSip and I want to improve the User Interface.

Let me introduce to you shortly the issue: We have a class: MicrosipDlg wich create other Dialogs, some Dialogs like Settings which appear in another Dialog. And my issue don't concern the other Dialogs. But one Dialog (the Dialer) is inside the main window (in the next snapshot  it's called CallMgt) 

Here is the main window of the program:

What I want to do is when I click in this button  I want to make Disappear the Dialpad (buttons 1,2,3,4,5....+,C) and in the Same time make the MicrosipDlg Smaller.

So I make disappear the buttons in the Dialer.cpp Code with this kind of lines (in a HideDialer() Function)

//in Dialer.cpp

GetDlgItem(IDC_KEY_9)->ShowWindow(SW_HIDE); /*and to show the buttons back I use the same in another Function (ShowDialer() function) with SW_SHOW and I Make

all the buttons come back in the dialogs.*/

This Easy and it works good : 

:)

BUT now come the problems!

If I want to resize the MicrosipDlg (The Parent) I looked the .rc files and in this case we have a Dialog.rc2 which Contains these:

IDD_MICROSIP DIALOGEX 0, 0, 228, 200, 0 STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_OVERLAPPEDWINDOW EXSTYLE WS_EX_APPWINDOW FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN CONTROL "", IDC_TAB, "SysTabControl32", 0x00000108, 0, 3, 228, 16 END

IDD_DIALER DIALOGEX 0, 0, 228, 160, 0 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 0x1 EXSTYLE WS_EX_NOINHERITLAYOUT BEGIN COMBOBOX IDC_NUMBER, 44, 4, 145, 30, CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL PUSHBUTTON "Video call", IDC_VIDEO_CALL, 36, 27, 23, 18, BS_ICON | WS_DISABLED PUSHBUTTON "Call", IDC_CALL, 63, 27, 82, 18, WS_DISABLED PUSHBUTTON "Message", IDC_MESSAGE, 148, 27, 23, 18, BS_ICON | WS_DISABLED AUTOCHECKBOX "Expand Dialpad", IDC_BUTTON_EXPAND_DIALPAD, 174, 27, 23, 18, BS_ICON | BS_PUSHLIKE | BS_FLAT PUSHBUTTON "Transfer", IDC_TRANSFER, 36, 27, 23, 18, BS_ICON | NOT WS_VISIBLE | WS_DISABLED PUSHBUTTON "End call", IDC_END, 63, 27, 82, 18, NOT WS_VISIBLE CHECKBOX "Hold", IDC_HOLD, 148, 27, 23, 18, BS_ICON | BS_PUSHLIKE | NOT WS_VISIBLE | WS_DISABLED CTEXT "+", -1, 9, 4, 16, 8 CONTROL "Microphone level", IDC_VOLUME_INPUT, "msctls_trackbar32", WS_TABSTOP | TBS_LEFT | 0x0000021A, 9, 12, 20, 50 CTEXT "-", -1, 9, 59, 16, 8 AUTOCHECKBOX "Mute microphone", IDC_BUTTON_MUTE_INPUT, 9, 74, 16, 16, BS_ICON | BS_PUSHLIKE | BS_FLAT CTEXT "+", -1, 204, 4, 16, 8 CONTROL "Speaker level", IDC_VOLUME_OUTPUT, "msctls_trackbar32", WS_TABSTOP | TBS_LEFT | 0x0000021A, 204, 12, 20, 50 CTEXT "-", -1, 204, 59, 16, 8 AUTOCHECKBOX "Mute speaker", IDC_BUTTON_MUTE_OUTPUT, 204, 74, 16, 16, BS_ICON | BS_PUSHLIKE | BS_FLAT CONTROL "1", IDC_KEY_1, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 56, 54, 39, 18 CONTROL "2", IDC_KEY_2, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 99, 54, 39, 18 CONTROL "3", IDC_KEY_3, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 142, 54, 39, 18 CONTROL "4", IDC_KEY_4, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 56, 75, 39, 18 CONTROL "5", IDC_KEY_5, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 99, 75, 39, 18 CONTROL "6", IDC_KEY_6, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 142, 75, 39, 18 CONTROL "7", IDC_KEY_7, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 56, 96, 39, 18 CONTROL "8", IDC_KEY_8, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 99, 96, 39, 18 CONTROL "9", IDC_KEY_9, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 142, 96, 39, 18 CONTROL "0", IDC_KEY_0, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 99, 117, 39, 18 CONTROL "*", IDC_KEY_STAR, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 56, 117, 39, 18 CONTROL "#", IDC_KEY_GRATE, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 142, 117, 39, 18 CONTROL "+", IDC_KEY_PLUS, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 99, 138, 39, 18 CONTROL "<", IDC_DELETE, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 56, 138, 39, 18 CONTROL "C", IDC_CLEAR, "BUTTON", BS_OWNERDRAW | WS_TABSTOP, 142, 138, 39, 18 END

IN MY CASE I WANT TO MAKE THE DIALER resized with this width and height :228,90 ( so smaller height )

and the MicrosipDlg smaller and because of the taskbar (tabs..)  lets say in Height :130 instead of 200.

So I looked if there is any Function that can help me doing that: and SetWindowPos and I understand now how it works!

I can resize the MicrosipDlg bigger but NEVER smaller than the size of the Dialer which is a tab included inside MicrosipDlg.

And the code is done in My Dialer.cpp file where I make disappear the buttons and bring them back. this is the line wher i try to make the MicrosipDlg smaller with a height of 130 (but MicrosipDlg take finally a height of 200 the Dialer's height fixed in the .rc2 file):

	microsipDlg->SetWindowPos(NULL, 0, 0, 228, 130, SWP_SHOWWINDOW | SWP_NOMOVE);

So this is where in MicrosipDlg.cpp the Dialer Dialog is created:

//this is MicrosipDlg.cpp

CTabCtrl* tab = (CTabCtrl*) GetDlgItem(IDC_TAB); tab->SetMinTabWidth(1); TC_ITEM tabItem; tabItem.mask = TCIF_TEXT | TCIF_PARAM; pageDialer = new Dialer(this); tabItem.pszText = Translate(_T("CallMgt")); tabItem.lParam = (LPARAM)pageDialer; tab->InsertItem( 99, &tabItem );pageDialer->SetWindowPos(microsipDlg, 0, 32, 0, 0, SWP_NOSIZE | SWP_NOZORDER); AutoMove(pageDialer->m_hWnd,50,0,0,0); ______________________________________________________ //and this is the code of AutoMove function (which is in CBaseDialog.cpp file):

void CBaseDialog::AutoMove(HWND hWnd, double dXMovePct, double dYMovePct, double dXSizePct, double dYSizePct)
{
ASSERT((dXMovePct + dXSizePct) <= 100.0);   // can't use more than 100% of the resize for the child
ASSERT((dYMovePct + dYSizePct) <= 100.0);   // can't use more than 100% of the resize for the child
SMovingChild s;
s.m_hWnd = hWnd;
ASSERT(s.m_hWnd != NULL);
s.m_dXMoveFrac = dXMovePct / 100.0;
s.m_dYMoveFrac = dYMovePct / 100.0;
s.m_dXSizeFrac = dXSizePct/ 100.0;
s.m_dYSizeFrac = dYSizePct/ 100.0;
::GetWindowRect(s.m_hWnd, &s.m_rcInitial);
ScreenToClient(s.m_rcInitial);
m_MovingChildren.push_back(s);
}


So I tried in Dialer.cpp to Resize The Dialer with this line:

microsipDlg->pageDialer->SetWindowPos(NULL, 0, 30, 228, 100, SWP_SHOWWINDOW | SWP_NOZORDER); //this is to make it small

// and the same line with bigger height when i want the Dialer bigger with all the buttons

But it wasn't working... this is the result of it:

I tried the AutoMove Function (see in the code i put before in this post) But it's not working and the result was not good.

So if you have an idea thank you for your help

or if you want to have more informations, I can put more code here, it's an open source project and you can have the original source code here: http://www.microsip.org/source (Version 3.10.11.0) 

Anyway, thanks a lot ad YOU DID IT, you read all this post (with this crappy english :) (French people have a BIG issue with English haha)

Sincerely, Ahmed


VS2015 SP2 - Cant debug using Mixed Mode debugger

$
0
0

I have a fairly complex program that starts in .NET/C#, and shims into a native DLL
That native DLL in turn shims down into C# to use ADO.net
Its a fairly old project, and has been running/developing for a number of years

I loaded VS2015 SP2, rebuilt all components and set the Framework to 4.6.1
Native components are C++/2015/Multibyte

Since building w 2015 SP2, I can no longer start the native DLL in Debug or Release build while Debugger is Mixed
Debug command is $(TargetDir)\MainApp.exe, which starts the top level application

I can Start and Debug using Native Only, or Managed, but not Mixed

In Mixed it shims from the main C#  exe into the native DLL
The native DLL then shims into a /CLR mixed DLL, which finally calls a C# assembly
The C# assembly manages to allocate an sql command object, but when that object tries to execute, this error is thrown

Managed Debugging Assistant 'FatalExecutionEngineError' has detected a problem in 'MyMainApp.exe'

Additional Information: The runtime has encountered a fatal error. The address of the error was at 0xee5ddd75, on thread 0x120. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.


As I say, I can debug using Nateve or Manged debugger, but not Mixed
A co worker is able to start and debug with Mixed, he has a new Win10 machine, mine is an older Win7

Any thoughts appreciated.


Use SetStdHandle to redirect stdout and stderr

$
0
0

I am attempting to capture my own program's output to parse later (don't ask). In using SetStdHandle to achieve this I am getting odd behavior.

In the following code I am seeing "HelloHi?" on the console while I would expect "Hi?".  I am seeing "Ha!" when I read from the pipe.

oldStdOutHandle is different from stdOutWrite.  xstdout is the same as stdOutWrite.

It appears that while Get/SetStdHandle thinks that the stdout has been retargeted, but I am not seeing any indication from program behavior that it has happened.

I also attempted to flush stdout before calling SetStdHandle, and that didn't change behavior

What is happening, and how can I fix this?  I am using VS2015 Update 2 on Windows 10.

HANDLE stdOutRead = INVALID_HANDLE_VALUE;
HANDLE stdOutWrite = INVALID_HANDLE_VALUE;

SECURITY_ATTRIBUTES securityAttributes;
securityAttributes.nLength = sizeof(SECURITY_ATTRIBUTES);
securityAttributes.lpSecurityDescriptor = nullptr;
securityAttributes.bInheritHandle = TRUE;

ASSERT_NE(0, CreatePipe(&stdOutRead, &stdOutWrite, &securityAttributes, 0));
auto g1 = CreateScope([&]() {
   CloseHandle(stdOutRead);
   CloseHandle(stdOutWrite);
});

HANDLE oldStdOutHandle = GetStdHandle(STD_OUTPUT_HANDLE);
ASSERT_NE(INVALID_HANDLE_VALUE, oldStdOutHandle);
ASSERT_NE(0, SetStdHandle(STD_OUTPUT_HANDLE, stdOutWrite));
auto g3 = CreateScope([&]() { SetStdHandle(STD_OUTPUT_HANDLE, oldStdOutHandle); });
HANDLE xstdout = GetStdHandle(STD_OUTPUT_HANDLE);

std::cout << "Hello";
DWORD x;
WriteFile(stdOutWrite, "Ha!", 3, &x, nullptr);
WriteFile(oldStdOutHandle, "Hi?", 3, &x, nullptr);

"sendto" issue, windows 7

$
0
0

According to the help, the INADDR_BROADCAST is supposed to send to all interfaces.

At least in Windows 7, this doesn't appear to be the case. Other than manually iterating each interface and sending them myself, is there a workaround for this defect?

It worked in XP, though the from addr was always the first iterated interface.

Does anyone know if this works as intended/documented in Windows 8 and 10?

Thanks

(still stuck in VS2010, Win7)

Excerpt from your own online help:

For Sockets Using IP (Version 4)

To send a broadcast (on a SOCK_DGRAM only), the address pointed to by the to parameter can be constructed to contain the special IPv4 address INADDR_BROADCAST (defined in Winsock2.h), together with the intended port number. If the address pointed to by theto parameter contains the INADDR_BROADCAST address and intended port, then the broadcast will be sent out on all interfaces to that port.

How can I capture the touch pressure in my c++ application?

$
0
0

Hi there,

I'd like to add functionality to my c++ application to work with the pressure sensitivity of the stylus pen and touch screens. The more pressure that is applied, the thicker the line being drawn would appear.

Is there a way to capture the pressure information somehow?


VC++ 2015 - LNK2005_"void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new_scalar.obj)

$
0
0

I have converted a  VC++ project from VS2010 to VS2015. Also changed the General->Character Set to Unicode from MBCS. Changed the code to support Unicode by using _T and other macros as and when required. This project is using following libraries (in the same order) 

winmm.lib
nafxcwd.lib
libcmtd.lib

All the compilation issues are resolved. However there were 9000+ linker errors observed. 

When only libcmtd.lib was used, 4 linker errors were observed,  such as

ErrorLNK2005"void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z) already defined in LIBCMTD.lib(new_scalar.obj)

When nafxcwd.lib and libcmtd.lib were used 1856 errors observed. 

I think as there are changes to CRT in VS2015, i am not linking correct libraries. Please help.


Are the COM samples Locclien/Locserve still available, if so where can i find them ?

$
0
0

Hi

I was looking for tutorials and samples about how to write an out-of-process COM server. I found a few answers here and there at stackoverflow, but all of them point to this website :

https://msdn.microsoft.com/en-us/library/aa230606(v=vs.60).aspx

It is exactly what i was searching for. I need these samples from that SDK :

https://msdn.microsoft.com/en-us/library/aa230606(v=vs.60).aspx

https://msdn.microsoft.com/en-us/library/aa230607(v=vs.60).aspx

https://msdn.microsoft.com/en-us/library/aa230619(v=vs.60).aspx

The MSDN documentation about COM is simply not enough. Well, there is this site for downloads :

https://blogs.msdn.microsoft.com/codefx/2010/11/25/all-in-one-com-code-samples/

What i need is to write an out-of-process COM server to be able to talk across bit boundaries, means i need to marshal function calls. To be precisely i want to have a single app ( client ) that installs and communicates with 2 servers, one 32 and the other 64 bit. The Locclien/Locserve sample is telling exactly my scenario in the description and it is mentioned in nearly all good answers out there in web, but there are no download links anylonger on Microsoft's websites....

Any idea where i can get them ?

Regards,

co0Kie

Visual Studio 2010 Crash when want to debug the code but exe works without errors

$
0
0

Hi There

I have the following code and I want to debug it

HINSTANCE dynamicLib = LoadLibrary("BCCore.dll");

if (dynamicLib)
{
	std::cout << "okkk";
}
else {
	std::cout << "error";
}

system("pause");
return 0;

When I run the project in VS 2010 it crashes and I can not do debugs.

I'm sure the problem related with LoadLibrary because when I comment above code it's working fine.

I have the dlls in folders.

When I run the exe without Visual Studio it's working without any problem and I can see that dll loading without any error.

So please give me an advice.

how COM component to give a value to JS through argument instead of return value ([propget]) ?

$
0
0

Hello, I'm writing JS script to call COM component,it works like this:

.idl :

    [propget]HRESULT CardNo([out, retval] BSTR* bsNo);

.cpp:

STDMETHODIMP CICReader::get_CardNo(BSTR* bsNo) {
    if (bsNo) {
        *bsNo = SysAllocString(L"888888888");
        return S_OK;
    }
    return E_INVALIDARG;
}

.JS:

function get_id() {
    try {
        var cardReader = new ActiveXObject("MdHal.ICReader");
        var sId = cardReader.CardNo;
        WScript.Echo(sId);
        return sId;
    } catch (e) {
        WScript.Echo(e.message);
        return NaN;
    }
}


but sometimes i want to return something to JS through arguments like this:

HRESULT CardNo2([out] BSTR* bsNo2);

STDMETHODIMP CICReader::CardNo2(BSTR* bsNo2) {
    if (bsNo2) {
        *bsNo2 = SysAllocString(L"99999");
        return S_OK;
    }
    return E_INVALIDARG;
}

but when i coding like below, JS got empty string!!!

try {
        var cardReader = new ActiveXObject("MdHal.ICReader");
        var sId;

        cardReader.CardNo2(sId);
        WScript.Echo(sId);               // why sId is "" ???
        return sId;

    } catch (e) {
        WScript.Echo(e.message);
        return NaN;
    }

can anyone tell me why JS cannot get "99999" instead of a empty string?

How can i transport data through argument?

Thanks in advance!

Which supports visual studio programming in CUDA?

$
0
0

Hi,

Need help to know which visual studio download, I want to program in CUDA and would like to know what Visual Studio supports? and which version, I know that 2012 had, but I wnat a newer!

Thanks!

HLSL - Which data types are allowed for POSITION and COLOR?

$
0
0

I know that there is a documentation entry for this, but I saw some example codes (not from MSDN) that do not follow these rules/guidelines. For example, the video tutorial C++ / DirectX11 Tutorials - S02E05 - Creating and loading Shaders defines the vertex shader's POSITION input as float2, which must be float4 according to documentation (linked above). Because this is just one of the examples, I wonder whether I can specify other data types for specific semantics without getting unexpected program behavior, even though the documentation defines only one data type for each semantic? If so, which data types are allowed for which semantics? Is there another documentation page that lists all possible data types for specific semantics or a rule helping me?

Problem with temples cannot convert argument 1 from ' to 'int &'

$
0
0

I am on my Data Structure class and I'm using pure virtual functions with templates passing an object from the main to the derived class by reference and I am getting an error " cannot convert argument 1 from 'ArrayBag<int>' to 'int &'"I have done a lot of research and tried everything has occur to me, even the professor was with me for like 10 minutes and could not find the problem.

This is my code. 

This is the part on the interface 

virtual ItemType   join(const ItemType &bag1, const ItemType &bag2) = 0;

This is the implementation 

Function header

ItemType join(const ItemType &bag1, const ItemType &bag2);

Function body

template<class ItemType>
ItemType ArrayBag<ItemType>::join(const ItemType &bag1, const ItemType &bag2) {

	int j = 0;//Counter for the second bag


	vector<int> bagItems1 = bag1.toVector();
	int numberOfEntries = (int)bagItems1.size();
	vector<int> bagItems2 = bag2.toVector();



	cout << fixed << "Bag 1:\t" << "Bag 2:\t" << endl;
	cout << "--------------------" << endl;
	for (int i = 0; i < numberOfEntries; i++)
	{

		cout << bagItems1[i] << "\t" << bagItems2[i] << endl;
	}
	cout << "--------------------" << endl;


	numberOfEntries = 0;
	numberOfEntries = bagItems1.size() + bagItems2.size();
	cout << fixed << "Bag 3 information:\t" << endl;



	for (int i = 0; i < numberOfEntries; i++)
	{
		if (i <= this->getCurrentSize() - 1) {
			this->add(bagItems1[i]);
		}

		if (i > bag2.getCurrentSize() - 1) {
			this->add(bagItems2[j]);
			j++;

		}
	}
	this->sortItem();

	return (*this);



}

Portion of the main

ArrayBag<int> bag1;
	int n1, n2, n3, n4, n5, n6;

	cout << "Enter 6 integers: ";
	cin >> n1 >> n2 >> n3 >> n4 >> n5 >> n6;
	bag1.add(n1);
	bag1.add(n2);
	bag1.add(n3);
	bag1.add(n4);
	bag1.add(n5);
	bag1.add(n6);

	bag1.displayBag();


	ArrayBag<int> bag2;
	int m1, m2, m3, m4, m5, m6;

	cout << "Enter 6 integers for Bag 2:" << endl;
	cin >> m1 >> m2 >> m3 >> m4 >> m5 >> m6;
	bag2.add(m1);
	bag2.add(m2);
	bag2.add(m3);
	bag2.add(m4);
	bag2.add(m5);
	bag2.add(m6);

	ArrayBag<int> bag3(bag1.getCurrentSize() + bag2.getCurrentSize());
	bag3.join(bag1, bag2);

If you guys need the complete code I will update it. I hope someone can help Thanks in advance. 


How do I call a tree that I insert or add elements to it by key or id?

$
0
0

If my key or id is 32 bit integer, then I can pass through all it's bits and each bit tells me in which direction to go, that is to say if the current bit is set then go right else or otherwise (if current bit is cleared then) go left.

If I can't go in the direction that the bit tells me, because that direction (either left or right) is NULL, then simply I create and allocate it and then proceed.

Finally or At last after I have passed all bits, I allocate new memory and copy into it the value of the element that I want or wish to insert or add.

I have never heard nor learnt about this kind of tree anywhere and anytime and never found it on the internet. I didn't see or meet anybody suggesting it, it's something that I have thought about it myself, but I believe that someone has already thought about it many years ago and gave it a name. I am just curious to know what it's name, and who developed and published it and when and where it was developed and published!

I also realized that the complexity of all actions I can perform on this kind of tree (add, insert, get, set, remove, delete, and etc...) areO(1)!

The only bad thing with this kind of tree, is that it costs a lot of allocated memory!

Please explain me this Encryption algorithm Code ?

$
0
0

Can anybody explain me the following code briefly ? How does it work and why does it work ? 

#define ROTL8(x,shift) ((uint8_t) ((x) << (shift)) | ((x) >> (8 - (shift))))

void initialize_aes_sbox(uint8_t sbox[256]) {
	/* loop invariant: p * q == 1 in the Galois field */
	uint8_t p = 1, q = 1;
	do {
		/* multiply p by x+1 */
		p = p ^ (p << 1) ^ (p & 0x80 ? 0x1B : 0);
		/* divide q by x+1 */
		q ^= q << 1;
		q ^= q << 2;
		q ^= q << 4;
		q ^= q & 0x80 ? 0x09 : 0;
		/* compute the affine transformation */
		sbox[p] = 0x63 ^ q ^ ROTL8(q, 1) ^ ROTL8(q, 2) ^ ROTL8(q, 3) ^ ROTL8(q, 4);
	} while (p != 1);
	/* 0 is a special case since it has no inverse */
	sbox[0] = 0x63;
}

Best regards, 

Th0ma$

Where is Multibyte MFC Library for Visual Studio 2015 ?

$
0
0

Simple question:

where is Multibyte MFC Library for Visual Studio 2015 ?

After 3 days of searching and broken links I have to ask here.


how to fix mfc140ud.dll.

$
0
0

Dear all, 

I am using  windows 10 and VisualStudio 2015. i am getting this error while i use SetWindowPos and MoveWindow. 

Please help me to fix this.

just for example i use dialog app and use one group box. when resize dialog box need to reposition and size as per dialog box. 

the code 

void CTest_23_04_2016Dlg::OnSize(UINT nType, int cx, int cy)
{
CDialogEx::OnSize(nType, cx, cy);
CRect rect;
GetWindowRect(&rect);
m_CtrlGroup1.MoveWindow(rect.right - 300, rect.top, 300, rect.Height());

// TODO: Add your message handler code here
}

i have install redist package also. and this error in debug mode. compile is ok. but when it run. this error come. for the release mode it does not come this error. 


Jar Dependencies in Visual C++ Development in Visual Studio 2015

$
0
0

I'm attempting to add fmod to a cross-platform project.

I need to reference fmod.jar in my project, but I'm not sure how.

I've added it into a folder I've called lib, and I've updated my project.properties to include jar.libs.dir=lib, but when I attempt to call System.loadLibrary("fmod"); in my activity, it says it cannot find fmod.so.

I know it's aware of the fmod.so files during build (they are in each of the sub-folders in lib: arm64-v8a, armeabi, armeabi-v7a, and x86) because it complains if I move/remove any of them.

Any help would be greatly appreciated.

Viewing all 15302 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>