Click here to Skip to main content
14,423,178 members

Managed C++/CLI

 
PinnedThe C++ / CLI is for managed and mixed-mode C++ programming only Pin
Chris Maunder9-Jan-06 10:36
cofounderChris Maunder9-Jan-06 10:36 
QuestionHow to remove a non-ascii character from CString Pin
Erich Ruth1-Jan-20 10:19
MemberErich Ruth1-Jan-20 10:19 
AnswerRe: How to remove a non-ascii character from CString Pin
phil.o1-Jan-20 14:27
mvephil.o1-Jan-20 14:27 
GeneralRe: How to remove a non-ascii character from CString Pin
Erich Ruth1-Jan-20 15:42
MemberErich Ruth1-Jan-20 15:42 
GeneralRe: How to remove a non-ascii character from CString Pin
phil.o1-Jan-20 15:56
mvephil.o1-Jan-20 15:56 
AnswerRe: How to remove a non-ascii character from CString Pin
Eddy Vluggen1-Jan-20 14:30
mveEddy Vluggen1-Jan-20 14:30 
GeneralRe: How to remove a non-ascii character from CString Pin
phil.o1-Jan-20 15:56
mvephil.o1-Jan-20 15:56 
GeneralRe: How to remove a non-ascii character from CString Pin
Eddy Vluggen1-Jan-20 16:55
mveEddy Vluggen1-Jan-20 16:55 
QuestionC++ control textBox of Form1 and Form2 Pin
HeeMongKorea29-Dec-19 21:07
professionalHeeMongKorea29-Dec-19 21:07 
AnswerRe: C++ control textBox of Form1 and Form2 Pin
Richard MacCutchan29-Dec-19 23:05
communityengineerRichard MacCutchan29-Dec-19 23:05 
GeneralRe: C++ control textBox of Form1 and Form2 Pin
HeeMongKorea16-Jan-20 1:29
professionalHeeMongKorea16-Jan-20 1:29 
Questionwidows api setwindowpos with SWP_HIDEWINDOW not always works Pin
viewlucc28-Nov-19 15:04
Memberviewlucc28-Nov-19 15:04 
int cpp_ptysetpg(unsigned long iProc)
{
HANDLE stdFds[3];
HWND hWnd;
DWORD wndPId;
int vRlt = 0;
WINDOWINFO vInfo;
hWnd = GetTopWindow(NULL);
unsigned long vProc = GetCurrentProcessId();
iProc = vProc;
assert(vProc == iProc);
while (hWnd != NULL)
{
GetWindowThreadProcessId(hWnd, &wndPId);
if (iProc == wndPId) break;
hWnd = GetNextWindow(hWnd, GW_HWNDNEXT);
}

vRlt = SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 1, 1, SWP_NOACTIVATE| SWP_HIDEWINDOW);
ShowWindow(hWnd, SW_HIDE);

/* save the current standard handles */
stdFds[0] = GetStdHandle(STD_INPUT_HANDLE);
stdFds[1] = GetStdHandle(STD_OUTPUT_HANDLE);
stdFds[2] = GetStdHandle(STD_ERROR_HANDLE);

FreeConsole();
if (AllocConsole())
SetConsoleCtrlHandler((PHANDLER_ROUTINE)myhdlr, TRUE);

/* restore the standard handles */
SetStdHandle(STD_INPUT_HANDLE, stdFds[0]);
SetStdHandle(STD_OUTPUT_HANDLE, stdFds[1]);
SetStdHandle(STD_ERROR_HANDLE, stdFds[2]);

hWnd = GetTopWindow(NULL);
while (hWnd != NULL)
{
GetWindowThreadProcessId(hWnd, &wndPId);
if (iProc == wndPId) break;
hWnd = GetNextWindow(hWnd, GW_HWNDNEXT);
}
int test = 0;
if (test)
SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 1, 1, SWP_NOACTIVATE | SWP_HIDEWINDOW);
else
{
vRlt = SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 1, 1, SWP_NOACTIVATE);
assert(vRlt != 0);
vRlt = SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 1, 1, SWP_HIDEWINDOW);//second call not always work
assert(vRlt != 0);
}
vRlt = GetWindowInfo(hWnd, &vInfo);
assert(vRlt != 0);
if (vInfo.dwStyle&WS_VISIBLE)
{
assert(0);
ShowWindow(hWnd, SW_HIDE);
}
vRlt = GetWindowInfo(hWnd, &vInfo);
assert(vRlt != 0);
if (vInfo.dwStyle&WS_VISIBLE)
assert(0);

return (0);
}

The second call (inside if(test) xx; else{ }) of SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 1, 1, SWP_NOACTIVATE) and SetWindowPos(hWnd, HWND_BOTTOM, 0, 0, 1, 1, SWP_HIDEWINDOW) does not always work. At least 1 of 10 times running of this function the window is still visible. However it always works with
SWP_NOACTIVATE|SWP_HIDEWINDOW
. Why?
QuestionCan Someone please convert this from C++ to C? Topic : "Placement of Signal Boosters Using Tree Data Structures." Pin
ManojMaheshPatil15-Nov-19 23:35
MemberManojMaheshPatil15-Nov-19 23:35 
AnswerRe: Can Someone please convert this from C++ to C? Topic : "Placement of Signal Boosters Using Tree Data Structures." Pin
Dave Kreskowiak16-Nov-19 5:59
mveDave Kreskowiak16-Nov-19 5:59 
QuestionGenerate the equivalent of a DLL: a .netmodule Pin
Wim Hoeks16-Sep-19 10:28
MemberWim Hoeks16-Sep-19 10:28 
Questionprogramming an SDI drawing application with MFC in VC++ Pin
Member 1449477212-Sep-19 6:01
MemberMember 1449477212-Sep-19 6:01 
AnswerRe: programming an SDI drawing application with MFC in VC++ Pin
Richard MacCutchan12-Sep-19 6:07
communityengineerRichard MacCutchan12-Sep-19 6:07 
GeneralRe: programming an SDI drawing application with MFC in VC++ Pin
Member 1449477212-Sep-19 6:21
MemberMember 1449477212-Sep-19 6:21 
GeneralRe: programming an SDI drawing application with MFC in VC++ Pin
Member 1449477212-Sep-19 7:48
MemberMember 1449477212-Sep-19 7:48 
GeneralRe: programming an SDI drawing application with MFC in VC++ Pin
Richard MacCutchan12-Sep-19 7:51
communityengineerRichard MacCutchan12-Sep-19 7:51 
Questionadd prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
TH_Raksdsks9-Sep-19 20:30
MemberTH_Raksdsks9-Sep-19 20:30 
AnswerRe: add prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
OriginalGriff9-Sep-19 20:36
communityengineerOriginalGriff9-Sep-19 20:36 
GeneralRe: add prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
TH_Raksdsks9-Sep-19 21:33
MemberTH_Raksdsks9-Sep-19 21:33 
GeneralRe: add prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
OriginalGriff9-Sep-19 22:28
communityengineerOriginalGriff9-Sep-19 22:28 
GeneralRe: add prerequisites and vcredistributable package to mfc setup application in vs2010 Pin
TH_Raksdsks10-Sep-19 3:14
MemberTH_Raksdsks10-Sep-19 3:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.