Click here to Skip to main content
15,887,485 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: GetWindowRect wrong dimensions Pin
Richard MacCutchan30-Mar-20 2:31
mveRichard MacCutchan30-Mar-20 2:31 
Questionc++ GetUpperBound equivalent Pin
ccodebase19-Feb-20 4:10
ccodebase19-Feb-20 4:10 
AnswerRe: c++ GetUpperBound equivalent Pin
Richard MacCutchan19-Feb-20 4:40
mveRichard MacCutchan19-Feb-20 4:40 
GeneralRe: c++ GetUpperBound equivalent Pin
ccodebase19-Feb-20 5:52
ccodebase19-Feb-20 5:52 
GeneralRe: c++ GetUpperBound equivalent Pin
Richard MacCutchan19-Feb-20 6:21
mveRichard MacCutchan19-Feb-20 6:21 
GeneralRe: c++ GetUpperBound equivalent Pin
ccodebase19-Feb-20 7:26
ccodebase19-Feb-20 7:26 
GeneralRe: c++ GetUpperBound equivalent Pin
Richard MacCutchan19-Feb-20 21:57
mveRichard MacCutchan19-Feb-20 21:57 
GeneralRe: c++ GetUpperBound equivalent Pin
Richard MacCutchan19-Feb-20 6:35
mveRichard MacCutchan19-Feb-20 6:35 
GeneralRe: c++ GetUpperBound equivalent Pin
ccodebase19-Feb-20 7:25
ccodebase19-Feb-20 7:25 
GeneralRe: c++ GetUpperBound equivalent Pin
ccodebase19-Feb-20 7:57
ccodebase19-Feb-20 7:57 
Questionupper bounds equivalent Pin
ccodebase19-Feb-20 3:54
ccodebase19-Feb-20 3:54 
QuestionHow to remove a non-ascii character from CString Pin
Erich Ruth1-Jan-20 9:19
Erich Ruth1-Jan-20 9:19 
AnswerRe: How to remove a non-ascii character from CString Pin
phil.o1-Jan-20 13:27
professionalphil.o1-Jan-20 13:27 
GeneralRe: How to remove a non-ascii character from CString Pin
Erich Ruth1-Jan-20 14:42
Erich Ruth1-Jan-20 14:42 
GeneralRe: How to remove a non-ascii character from CString Pin
phil.o1-Jan-20 14:56
professionalphil.o1-Jan-20 14:56 
AnswerRe: How to remove a non-ascii character from CString Pin
Eddy Vluggen1-Jan-20 13:30
professionalEddy Vluggen1-Jan-20 13:30 
GeneralRe: How to remove a non-ascii character from CString Pin
phil.o1-Jan-20 14:56
professionalphil.o1-Jan-20 14:56 
GeneralRe: How to remove a non-ascii character from CString Pin
Eddy Vluggen1-Jan-20 15:55
professionalEddy Vluggen1-Jan-20 15:55 
QuestionC++ control textBox of Form1 and Form2 Pin
HeeMongKorea29-Dec-19 20:07
professionalHeeMongKorea29-Dec-19 20:07 
AnswerRe: C++ control textBox of Form1 and Form2 Pin
Richard MacCutchan29-Dec-19 22:05
mveRichard MacCutchan29-Dec-19 22:05 
GeneralRe: C++ control textBox of Form1 and Form2 Pin
HeeMongKorea16-Jan-20 0:29
professionalHeeMongKorea16-Jan-20 0:29 
Questionwidows api setwindowpos with SWP_HIDEWINDOW not always works Pin
viewlucc28-Nov-19 14:04
viewlucc28-Nov-19 14: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 22:35
ManojMaheshPatil15-Nov-19 22: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 4:59
mveDave Kreskowiak16-Nov-19 4:59 
QuestionGenerate the equivalent of a DLL: a .netmodule Pin
Wim Hoeks16-Sep-19 9:28
Wim Hoeks16-Sep-19 9:28 

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.