Click here to Skip to main content
16,006,348 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how can I launch another application( like notepad.exe ) in my VC Pin
Mark Salsbery19-Jul-07 7:34
Mark Salsbery19-Jul-07 7:34 
AnswerRe: how can I launch another application( like notepad.exe ) in my VC Pin
Michael Dunn19-Jul-07 7:40
sitebuilderMichael Dunn19-Jul-07 7:40 
GeneralRe: how can I launch another application( like notepad.exe ) in my VC Pin
LeeeNN19-Jul-07 7:58
LeeeNN19-Jul-07 7:58 
GeneralRe: how can I launch another application( like notepad.exe ) in my VC Pin
Hamid_RT31-Jul-07 9:21
Hamid_RT31-Jul-07 9:21 
QuestionNibbles, Bits, bytes and somehow a number! Pin
Steven Wybraniec19-Jul-07 6:15
Steven Wybraniec19-Jul-07 6:15 
AnswerRe: Nibbles, Bits, bytes and somehow a number! Pin
led mike19-Jul-07 6:24
led mike19-Jul-07 6:24 
AnswerRe: Nibbles, Bits, bytes and somehow a number! Pin
mid=574119-Jul-07 6:35
mid=574119-Jul-07 6:35 
QuestionDesktop Window Manager (DWM) problem.. Pin
Perspx19-Jul-07 5:38
Perspx19-Jul-07 5:38 
I am using the Microsoft DWM (Desktop Window Manager), and I am using the DwmEnableBlurBehindWindow() function with the WS_EX_LAYERED style.. however, the window renders fine initially, but then when i move the window, it goes all weird and doesnt display the window properly and just displays the window icon and a garbled up title bar about 50pixels wide and 10pixels high..

heres the code:

---



HRESULT EnableBlurBehindWindow(HWND window,
bool enable = true,
HRGN region = 0,
bool transitionOnMaximized = false)
{
DWM_BLURBEHIND blurBehind = { 0 };

blurBehind.dwFlags = DWM_BB_ENABLE | DWM_BB_TRANSITIONONMAXIMIZED;
blurBehind.fEnable = enable;
blurBehind.fTransitionOnMaximized = transitionOnMaximized;

if (enable && 0 != region)
{
blurBehind.dwFlags |= DWM_BB_BLURREGION;
blurBehind.hRgnBlur = region;
}

return DwmEnableBlurBehindWindow(window,
&blurBehind);
}

LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch(msg)
{
case WM_INITDIALOG:
{
SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);

EnableBlurBehindWindow(hwnd);

}
break;
case WM_ERASEBKGND:
{
RECT clientRect;

GetClientRect(hwnd, &clientRect);

SelectObject((HDC)wParam, GetStockObject(BLACK_BRUSH));

Rectangle((HDC)wParam, 0, 0, clientRect.right, clientRect.bottom);
}
break;
case WM_CLOSE:
EndDialog(hwnd, 0);
break;
}
return 0;
}

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), NULL, (DLGPROC)WndProc);

return 0;
}




---

Is there any further message processing I need to do or anything..?

Thanks for your help!
--PerspX

"Nowadays, security guys break the Mac every single day. Every single day, they come out with a total exploit, your machine can be taken over totally. I dare anybody to do that once a month on the Windows machine." - Bill Gates

QuestionRegular DLL with Doc/View architecture Pin
Andy H19-Jul-07 5:22
Andy H19-Jul-07 5:22 
AnswerRe: Regular DLL with Doc/View architecture Pin
led mike19-Jul-07 6:31
led mike19-Jul-07 6:31 
AnswerRe: Regular DLL with Doc/View architecture Pin
Mark Salsbery19-Jul-07 7:09
Mark Salsbery19-Jul-07 7:09 
GeneralRe: Regular DLL with Doc/View architecture Pin
led mike19-Jul-07 8:25
led mike19-Jul-07 8:25 
GeneralRe: Regular DLL with Doc/View architecture Pin
Mark Salsbery19-Jul-07 10:34
Mark Salsbery19-Jul-07 10:34 
QuestionGetOPenFileName() Pin
RomTibi19-Jul-07 5:14
RomTibi19-Jul-07 5:14 
AnswerRe: GetOPenFileName() Pin
James R. Twine19-Jul-07 5:18
James R. Twine19-Jul-07 5:18 
GeneralRe: GetOPenFileName() [OT] Pin
David Crow19-Jul-07 5:23
David Crow19-Jul-07 5:23 
GeneralRe: GetOPenFileName() [OT] Pin
James R. Twine19-Jul-07 5:29
James R. Twine19-Jul-07 5:29 
GeneralRe: GetOPenFileName() [OT] Pin
David Crow19-Jul-07 5:38
David Crow19-Jul-07 5:38 
GeneralRe: GetOPenFileName() Pin
RomTibi19-Jul-07 5:48
RomTibi19-Jul-07 5:48 
GeneralRe: GetOPenFileName() Pin
RomTibi19-Jul-07 5:52
RomTibi19-Jul-07 5:52 
QuestionOdd Passwords Questions Pin
Dave Kerr19-Jul-07 4:58
Dave Kerr19-Jul-07 4:58 
AnswerRe: Odd Passwords Questions Pin
James R. Twine19-Jul-07 5:11
James R. Twine19-Jul-07 5:11 
GeneralRe: Odd Passwords Questions Pin
Dave Kerr19-Jul-07 5:17
Dave Kerr19-Jul-07 5:17 
GeneralRe: Odd Passwords Questions Pin
James R. Twine19-Jul-07 5:21
James R. Twine19-Jul-07 5:21 
AnswerRe: Odd Passwords Questions Pin
Michael Dunn19-Jul-07 7:05
sitebuilderMichael Dunn19-Jul-07 7:05 

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.