Click here to Skip to main content
15,888,461 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Intializing a structure array to store SQL Results from a class Pin
jkirkerx31-Dec-11 13:14
professionaljkirkerx31-Dec-11 13:14 
QuestionUNIT how to convert int Pin
dlsyaim29-Dec-11 21:59
dlsyaim29-Dec-11 21:59 
AnswerRe: UNIT how to convert int Pin
_Flaviu29-Dec-11 22:03
_Flaviu29-Dec-11 22:03 
AnswerRe: UNIT how to convert int Pin
Richard MacCutchan29-Dec-11 22:09
mveRichard MacCutchan29-Dec-11 22:09 
GeneralRe: UNIT how to convert int Pin
dlsyaim29-Dec-11 22:26
dlsyaim29-Dec-11 22:26 
GeneralRe: UNIT how to convert int Pin
Richard MacCutchan29-Dec-11 22:51
mveRichard MacCutchan29-Dec-11 22:51 
GeneralRe: UNIT how to convert int Pin
Richard MacCutchan29-Dec-11 23:06
mveRichard MacCutchan29-Dec-11 23:06 
GeneralRe: UNIT how to convert int Pin
dlsyaim29-Dec-11 23:15
dlsyaim29-Dec-11 23:15 
In MFC. I added BCGControlBar control, I do not know how to load line type, source of these. Our manager let me look at this change.
// Replace ID_VIEW_TOOLBARS menu item to the toolbars list:
//---------------------------------------------------------
if (pMenuPopup->GetMenuBar ()->CommandToIndex (ID_VIEW_TOOLBARS) >= 0)
{
if (CBCGPToolBar::IsCustomizeMode ())
{
//----------------------------------------------------
// Don't show toolbars list in the cuztomization mode!
//----------------------------------------------------
return FALSE;
}

pMenuPopup->RemoveAllItems ();

CMenu menu;
VERIFY(menu.LoadMenu (IDR_POPUP_TOOLBAR));

CMenu* pPopup = menu.GetSubMenu(0);
ASSERT(pPopup != NULL);

pMenuPopup->GetMenuBar ()->ImportFromMenu (*pPopup, TRUE);
}

//-------------------------------------------------------------------
// Replace all "line style" menu items by CLineStyleMenuItem objects:
//-------------------------------------------------------------------
for (UINT uiLineStyleCmd = ID_LINE_STYLE_1;
uiLineStyleCmd <= ID_LINE_STYLE_10;
uiLineStyleCmd++)
{
int iIndex = pMenuPopup->GetMenuBar ()->CommandToIndex (uiLineStyleCmd);
if (iIndex >= 0)
{
pMenuPopup->GetMenuBar ()->m_bDisableSideBarInXPMode = TRUE;
//----------------------------
// Obtain item text and style:
//----------------------------
CString strText = pMenuPopup->GetMenuBar ()->GetButtonText (iIndex);
UINT uiStyle = pMenuPopup->GetMenuBar ()->GetButtonStyle (iIndex);

//------------------
// Calc. line width:
//------------------
int nWidth = uiLineStyleCmd - ID_LINE_STYLE_1 + 1;

//-------------------
// Replace menu item:
//-------------------
pMenuPopup->GetMenuBar ()->ReplaceButton (uiLineStyleCmd,
CLineStyleMenuItem (nWidth,
uiLineStyleCmd,
strText,
uiStyle & TBBS_CHECKED));
}
}
GeneralRe: UNIT how to convert int Pin
Richard MacCutchan29-Dec-11 23:20
mveRichard MacCutchan29-Dec-11 23:20 
QuestionRe: UNIT how to convert int Pin
David Crow30-Dec-11 2:45
David Crow30-Dec-11 2:45 
QuestionRight click and ON_UPDATE_COMMAND_UI Pin
_Flaviu29-Dec-11 21:30
_Flaviu29-Dec-11 21:30 
AnswerRe: Right click and ON_UPDATE_COMMAND_UI Pin
Code-o-mat29-Dec-11 22:20
Code-o-mat29-Dec-11 22:20 
GeneralRe: Right click and ON_UPDATE_COMMAND_UI Pin
_Flaviu30-Dec-11 0:46
_Flaviu30-Dec-11 0:46 
GeneralRe: Right click and ON_UPDATE_COMMAND_UI Pin
Code-o-mat30-Dec-11 1:01
Code-o-mat30-Dec-11 1:01 
GeneralRe: Right click and ON_UPDATE_COMMAND_UI Pin
_Flaviu30-Dec-11 2:39
_Flaviu30-Dec-11 2:39 
GeneralRe: Right click and ON_UPDATE_COMMAND_UI Pin
Code-o-mat30-Dec-11 2:43
Code-o-mat30-Dec-11 2:43 
Questionwin32 api - some kind of control container Pin
jkirkerx29-Dec-11 8:51
professionaljkirkerx29-Dec-11 8:51 
GeneralRe: win32 api - some kind of control container Pin
Randor 29-Dec-11 14:01
professional Randor 29-Dec-11 14:01 
GeneralNew Description Pin
jkirkerx29-Dec-11 15:11
professionaljkirkerx29-Dec-11 15:11 
GeneralRe: New Description Pin
Randor 29-Dec-11 16:22
professional Randor 29-Dec-11 16:22 
GeneralRe: New Description Pin
jkirkerx29-Dec-11 16:43
professionaljkirkerx29-Dec-11 16:43 
GeneralRe: New Description Pin
Randor 29-Dec-11 17:01
professional Randor 29-Dec-11 17:01 
AnswerRe: win32 api - some kind of control container Pin
David Crow29-Dec-11 15:06
David Crow29-Dec-11 15:06 
QuestionTic-tac-toe bitmap Pin
Phil00529-Dec-11 6:38
Phil00529-Dec-11 6:38 
QuestionRe: Tic-tac-toe bitmap Pin
Code-o-mat29-Dec-11 7:01
Code-o-mat29-Dec-11 7:01 

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.