Click here to Skip to main content
16,004,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Oracle.DataAccess x32 in a Machine x64 Pin
Kit Fisto23-Jul-14 5:55
Kit Fisto23-Jul-14 5:55 
QuestionHow to get type of Icon in system messages Pin
Member 1088174515-Jul-14 2:03
Member 1088174515-Jul-14 2:03 
SuggestionRe: How to get type of Icon in system messages Pin
Jochen Arndt15-Jul-14 2:48
professionalJochen Arndt15-Jul-14 2:48 
SuggestionRe: How to get type of Icon in system messages Pin
Richard MacCutchan15-Jul-14 3:40
mveRichard MacCutchan15-Jul-14 3:40 
GeneralRe: How to get type of Icon in system messages Pin
Member 1088174521-Jul-14 19:13
Member 1088174521-Jul-14 19:13 
GeneralRe: How to get type of Icon in system messages Pin
Richard MacCutchan21-Jul-14 21:20
mveRichard MacCutchan21-Jul-14 21:20 
QuestionMenu item font resizing Pin
Member 377895415-Jul-14 0:37
Member 377895415-Jul-14 0:37 
AnswerRe: Menu item font resizing Pin
enhzflep15-Jul-14 22:34
enhzflep15-Jul-14 22:34 
Have you looked at the GetMenuBarInfo function? You can get the RECT of the menu-bar with this function.

I.e
C++
MENUBARINFO mbi;
mbi.cbSize = sizeof(mbi);
GetMenuBarInfo(hwnd, OBJID_MENU, 0, &mbi);
printf("menuBar rect (screen) = %d,%d,%d,%d\n", mbi.rcBar.left, mbi.rcBar.top, mbi.rcBar.right, mbi.rcBar.bottom);

MapWindowPoints(HWND_DESKTOP, hwnd, (LPPOINT)&mbi.rcBar, 2);
printf("menuBar rect (client) = %d,%d,%d,%d\n", mbi.rcBar.left, mbi.rcBar.top, mbi.rcBar.right, mbi.rcBar.bottom);

Notes:
1. All of the members are 0 during the WM_CREATE message handler
2. The dimensions returned are in screen-coords.

Example output:
menuBar rect (screen) = 108,130,636,149
menuBar rect (client) = 0,-20,528,-1



When I tried to change the DPI setting with the program running, I was told I'd have to logoff and then login again. Am I correct in assuming that you change the DPI and _then_ open the program?

Also, is this a standard menubar, or is it an instance of a toolbar that's been added to a rebar control? The difference being that a standard one should be a part of the non-client area, and therefore the toolbar you have should be automatically moved down to accomodate the menubar having larger text.

If however, you have a toolbar inside a rebar control as your menu, the rebar container is a part of your client area, and you need to manually position the toolbar below it. Different DPI settings will change the required height that you need to offset the toolbar by.

Can you upload a screen shot somewhere and post a link to it?
QuestionDraggin and dropping functionality in windows 8 environment Pin
Member 377895414-Jul-14 2:31
Member 377895414-Jul-14 2:31 
AnswerRe: Draggin and dropping functionality in windows 8 environment Pin
Richard MacCutchan14-Jul-14 5:19
mveRichard MacCutchan14-Jul-14 5:19 
QuestionRe: Draggin and dropping functionality in windows 8 environment Pin
Member 377895414-Jul-14 18:22
Member 377895414-Jul-14 18:22 
AnswerRe: Draggin and dropping functionality in windows 8 environment Pin
Richard MacCutchan14-Jul-14 22:00
mveRichard MacCutchan14-Jul-14 22:00 
GeneralRe: Draggin and dropping functionality in windows 8 environment Pin
Member 377895415-Jul-14 19:03
Member 377895415-Jul-14 19:03 
GeneralRe: Draggin and dropping functionality in windows 8 environment Pin
Richard MacCutchan15-Jul-14 22:06
mveRichard MacCutchan15-Jul-14 22:06 
GeneralRe: Draggin and dropping functionality in windows 8 environment Pin
Member 377895416-Jul-14 21:36
Member 377895416-Jul-14 21:36 
GeneralRe: Draggin and dropping functionality in windows 8 environment Pin
Richard MacCutchan16-Jul-14 22:35
mveRichard MacCutchan16-Jul-14 22:35 
GeneralRe: Draggin and dropping functionality in windows 8 environment Pin
Member 377895417-Jul-14 19:33
Member 377895417-Jul-14 19:33 
GeneralRe: Draggin and dropping functionality in windows 8 environment Pin
Richard MacCutchan17-Jul-14 22:28
mveRichard MacCutchan17-Jul-14 22:28 
QuestionPass Image or text data from MFC to c# application Pin
low198813-Jul-14 6:56
low198813-Jul-14 6:56 
AnswerRe: Pass Image or text data from MFC to c# application Pin
Albert Holguin14-Jul-14 6:33
professionalAlbert Holguin14-Jul-14 6:33 
QuestionView with color txt added automatically by one thread,No flash and auto scrolling Pin
PaulKvm9-Jul-14 20:59
PaulKvm9-Jul-14 20:59 
SuggestionRe: View with color txt added automatically by one thread,No flash and auto scrolling Pin
Richard MacCutchan9-Jul-14 23:39
mveRichard MacCutchan9-Jul-14 23:39 
AnswerRe: View with color txt added automatically by one thread,No flash and auto scrolling Pin
leon de boer11-Jul-14 2:36
leon de boer11-Jul-14 2:36 
Questionsendto problem Pin
Member 103497468-Jul-14 22:47
Member 103497468-Jul-14 22:47 
SuggestionRe: sendto problem Pin
Richard MacCutchan8-Jul-14 23:16
mveRichard MacCutchan8-Jul-14 23:16 

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.