Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Union, Help me this code!! Pin
Iain Clarke, Warrior Programmer14-Aug-09 1:31
Iain Clarke, Warrior Programmer14-Aug-09 1:31 
QuestionHow to dynamically load values in String table Pin
Pryabu13-Aug-09 22:02
Pryabu13-Aug-09 22:02 
AnswerRe: How to dynamically load values in String table Pin
Rajesh R Subramanian13-Aug-09 22:19
professionalRajesh R Subramanian13-Aug-09 22:19 
GeneralRe: How to dynamically load values in String table Pin
Pryabu13-Aug-09 23:05
Pryabu13-Aug-09 23:05 
GeneralRe: How to dynamically load values in String table Pin
Rajesh R Subramanian13-Aug-09 23:13
professionalRajesh R Subramanian13-Aug-09 23:13 
GeneralRe: How to dynamically load values in String table Pin
Pryabu13-Aug-09 23:19
Pryabu13-Aug-09 23:19 
GeneralRe: How to dynamically load values in String table Pin
Rajesh R Subramanian13-Aug-09 23:31
professionalRajesh R Subramanian13-Aug-09 23:31 
GeneralRe: How to dynamically load values in String table Pin
Pryabu13-Aug-09 23:45
Pryabu13-Aug-09 23:45 
First,i want to change the default title of a window. I can change the default title in String table.In future,If somebody wants to change the title of my application, again they have to change the string in resource,again they need to compile the whole application.So i want to configure the title in ini file.

I added SetWindowText function inside OnCreate function.Its not working.

int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
return -1;

if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}

int *num,i,j=m_wndToolBar.GetToolBarCtrl().GetButtonCount();
num=new int[j+1];
memset(num,0,(j+1)*sizeof(int));
num[0]=j;
for(i=0;i<j;i++)
{
if(ID_SEPARATOR == m_wndToolBar.GetItemID( i ))
num[i+1]=1;
}

//·Ö¸ô·ûËãÊÇÒ»¸ö°´Å¥£¬¿í¶ÈÓÀԶΪ6
//ÉÏÃæµÃµ½µÄ°´Å¥¾ØÐÎÓÀÔ¶±È¹¤¾ßÀ¸±à¼­Æ÷ÀïÃæÉ趨µÄ³¤¿í¸÷´ó7
//Èç¹ûΪ¹¤¾ßÀ¸ÉèÖÃÁËλͼ£¬°´Å¥µÄÐÎ×´ÓÀÔ¶Ö»Óë´´½¨Î»Í¼Áбíʱָ¶¨µÄ´óСһÖ£¬ÓëÆäËûµØ·½µÄÉèÖÃÎÞ¹Ø

m_wndToolBar.SetFullColorImage(IDB_BITMAP2, RGB(255, 0, 255), num);
delete []num;
if (!m_wndStatusBar.Create(this) ||
!m_wndStatusBar.SetIndicators(indicators,
sizeof(indicators)/sizeof(UINT)))
{
TRACE0("Failed to create status bar\n");
return -1; // fail to create
}

// TODO: Delete these three lines if you don't want the toolbar to
// be dockable
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
DockControlBar(&m_wndToolBar);

SetWindowText("Test");


return 0;
}
GeneralRe: How to dynamically load values in String table Pin
kolecat14-Aug-09 5:29
kolecat14-Aug-09 5:29 
GeneralRe: How to dynamically load values in String table Pin
Pryabu14-Aug-09 1:16
Pryabu14-Aug-09 1:16 
QuestionCombobox.. Pin
kumar sanghvi13-Aug-09 21:53
kumar sanghvi13-Aug-09 21:53 
AnswerRe: Combobox.. Pin
Bacon Ultimate Cheeseburger14-Aug-09 10:29
Bacon Ultimate Cheeseburger14-Aug-09 10:29 
QuestionNon-blocking COM method calls Pin
sashoalm13-Aug-09 21:11
sashoalm13-Aug-09 21:11 
AnswerRe: Non-blocking COM method calls Pin
Garth J Lancaster13-Aug-09 23:49
professionalGarth J Lancaster13-Aug-09 23:49 
GeneralRe: Non-blocking COM method calls Pin
sashoalm14-Aug-09 8:56
sashoalm14-Aug-09 8:56 
AnswerRe: Non-blocking COM method calls Pin
KarstenK14-Aug-09 2:57
mveKarstenK14-Aug-09 2:57 
QuestionCan I use select instead Sleep? Pin
hanlei000000000913-Aug-09 20:48
hanlei000000000913-Aug-09 20:48 
AnswerRe: Can I use select instead Sleep? Pin
KarstenK13-Aug-09 21:11
mveKarstenK13-Aug-09 21:11 
AnswerRe: Can I use select instead Sleep? Pin
Rajesh R Subramanian13-Aug-09 21:17
professionalRajesh R Subramanian13-Aug-09 21:17 
AnswerRe: Can I use select instead Sleep? Pin
Stuart Dootson13-Aug-09 21:37
professionalStuart Dootson13-Aug-09 21:37 
AnswerRe: Can I use select instead Sleep? Pin
David Crow14-Aug-09 2:42
David Crow14-Aug-09 2:42 
AnswerRe: Can I use select instead Sleep? Pin
harold aptroot14-Aug-09 3:00
harold aptroot14-Aug-09 3:00 
GeneralRe: Can I use select instead Sleep? Pin
Rajesh R Subramanian14-Aug-09 5:24
professionalRajesh R Subramanian14-Aug-09 5:24 
GeneralRe: Can I use select instead Sleep? Pin
harold aptroot14-Aug-09 5:33
harold aptroot14-Aug-09 5:33 
GeneralRe: Can I use select instead Sleep? Pin
Rajesh R Subramanian14-Aug-09 5:45
professionalRajesh R Subramanian14-Aug-09 5:45 

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.