Click here to Skip to main content
15,907,396 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionData type? Pin
wow999915-Sep-03 0:30
wow999915-Sep-03 0:30 
AnswerRe: Data type? Pin
RChin15-Sep-03 0:38
RChin15-Sep-03 0:38 
AnswerRe: Data type? Pin
PengFeidu15-Sep-03 0:45
PengFeidu15-Sep-03 0:45 
AnswerRe: Data type? Pin
Abin15-Sep-03 14:58
Abin15-Sep-03 14:58 
GeneralQues on CButton Pin
SatyaDY14-Sep-03 23:29
SatyaDY14-Sep-03 23:29 
GeneralRe: Ques on CButton Pin
Jagadeesh VN15-Sep-03 3:38
Jagadeesh VN15-Sep-03 3:38 
GeneralRe: Ques on CButton Pin
David Crow15-Sep-03 4:41
David Crow15-Sep-03 4:41 
GeneralRe: Ques on CButton Pin
SatyaDY15-Sep-03 18:17
SatyaDY15-Sep-03 18:17 
Hi,
Thanks it seems working. But one more problem. My code is now like this.

CButton mybutton;
HICON myicon;

myicon=AfxGetApp()->LoadIcon(IDI_ICON1);
RECT myrect;
myrect.top=10;
myrect.bottom=30;
myrect.left=10;
myrect.right=30;

mybutton.Create(" ",WS_CHILD|WS_VISIBLE,myrect,this,1);
mybutton.EnableToolTips(TRUE);
mybutton.SetIcon(myicon);
// AfxMessageBox("Complete");

Now my problem is if I comment that AfxMessageBox I am not finding the button. One more problem is, I am not finding the Icon on button. What's wrong with my code??

Thanks
Satya


GeneralRe: Ques on CButton Pin
Jagadeesh VN15-Sep-03 19:42
Jagadeesh VN15-Sep-03 19:42 
GeneralEmbedding version numbers into DLLs Pin
Jay Cr0ss14-Sep-03 23:12
sussJay Cr0ss14-Sep-03 23:12 
GeneralPrint a metafile Pin
Leovinus14-Sep-03 22:47
Leovinus14-Sep-03 22:47 
GeneralRe: Print a metafile Pin
Shog915-Sep-03 5:47
sitebuilderShog915-Sep-03 5:47 
Generalauto dsn setup Pin
zecodela14-Sep-03 21:52
zecodela14-Sep-03 21:52 
GeneralRe: auto dsn setup Pin
David Crow15-Sep-03 4:47
David Crow15-Sep-03 4:47 
GeneralMenu problem Pin
Shah Shehpori14-Sep-03 21:17
sussShah Shehpori14-Sep-03 21:17 
GeneralRe: Menu problem Pin
Frank K14-Sep-03 22:54
Frank K14-Sep-03 22:54 
GeneralRe: Menu problem Pin
Shah Shehpori14-Sep-03 23:49
sussShah Shehpori14-Sep-03 23:49 
GeneralRe: Menu problem Pin
Steve S15-Sep-03 2:58
Steve S15-Sep-03 2:58 
GeneralCCommandButton Pin
Bernhard14-Sep-03 20:39
Bernhard14-Sep-03 20:39 
GeneralResizable Dialog with Scrollbars Pin
JensB14-Sep-03 20:20
JensB14-Sep-03 20:20 
QuestionApp with no titlebar/border? Pin
bobthe14-Sep-03 20:09
bobthe14-Sep-03 20:09 
AnswerRe: App with no titlebar/border? Pin
R. Thomas14-Sep-03 22:25
R. Thomas14-Sep-03 22:25 
GeneralAdding WindowsMessageHandlers to a Registered ActiveX Control (HELP ME!) Pin
nsaadyah14-Sep-03 18:59
nsaadyah14-Sep-03 18:59 
GeneralSocket file transfer Pin
vision200414-Sep-03 18:49
vision200414-Sep-03 18:49 
GeneralRe: Socket file transfer Pin
SatyaDY14-Sep-03 18:54
SatyaDY14-Sep-03 18:54 

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.