Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how to draw MessageBox buttons

Featured Replies

Posted

I found a article about how to change the button text of MessageBox.

http://www.codeguru.com/cpp/w-p/win32/mess...icle.php/c10873

Could Any buddy tell me how to draw MessageBox buttons?

Such as IDOK button IDCANCEL button

I know how to make these buttons to OWNERDRAW buttons in CBTProc hook procedure.

i.e. SendMessage(hMB,BM_SETSTYLE,BS_OWNERDRAW,TRUE);

However, I don't figure out how to draw these buttons.

Thanks for help.

Edited by alaphate

Okay....

int ConfirmPatching(HWND hwnd, LPCSTR lpstrText)
{
int msgboxID = MessageBox(
hwnd,
lpstrText,
"Confirm Patching?",
MB_ICONEXCLAMATION | MB_YESNO
); if (msgboxID == IDYES)
{ } return msgboxID;
}

http://msdn.microsoft.com/en-us/library/ms...spx#message_box

Edited by mudlord

  • Author

mudlord, you might misunderstand my opinion.

Here's a example of my application.

cpp, c language is perferred. Thanks a lot.

bmpBtn.zip

Edited by alaphate

I see what you want to do now. Thanks for the example.

  • Author

I figured out how to change the MessageBox's button style.

Use:

SetWindowsHookEx(WH_CALLWNDPROC, &CallWndProc, 0, GetCurrentThreadId());

LRESULT CALLBACK CallWndProc(INT nCode, WPARAM wParam, LPARAM lParam) {

CWPSTRUCT *pMsg= (CWPSTRUCT *)lParam;

switch (pMsg->message) {

case WM_DRAWITEM:

//draw Buttons here

}

}

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.