Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
D

drabudawood

@drabudawood
About
Posts
7
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • " How can I get CWnd pointer for the current dialog ? "
    D drabudawood

    :-O Please, Can anybody helps me ? I want to catch the CWnd pointer for the current dialog to use it in the CButton::Create() method. I tried to use "this" instead of CWnd in the OnButtonClick() its works ok, but when I tried to use "this" inside Custom Class (I created it) it doesn't work because the "this" pointer was pointing to the Current class.So " How can I get CWnd pointer for the current dialog ? " Thank you at all. Dr Abudawood

    C / C++ / MFC question

  • Creating Control Object Dynamically
    D drabudawood

    Thank you very much MR\ Mike I will test it in MFC. Dr Abudawood

    C / C++ / MFC question

  • Creating Control Object Dynamically
    D drabudawood

    How can I create a control object at runtime dynamically and join it to the dialog. eg. If I want to create many buttons at runtime after the user choosen some options(like no. of buttons he wants to use it).So what can I do. Could anybody helps me please ?:sigh: Dr Abudawood

    C / C++ / MFC question

  • Calculate the required size of text to fit in column
    D drabudawood

    :) Now I got the answer. after your help it was very easy as next: void CTestScrolDlg::AdjustColSize(int ColNo,CString s) { //Global variable Array width[ColNo] int Gab = 15; int size=m_ListControl.GetStringWidth(s)+Gab; if( width[ColNo] < size ) { m_ListControl.SetColumnWidth(ColNo,size); width[ColNo]=size; } };) Dr Abudawood

    C / C++ / MFC question help

  • Calculate the required size of text to fit in column
    D drabudawood

    :-O Tanke you very mush Mr .Michael Dunn for your help. And I'll try to do your advice. Dr Abudawood

    C / C++ / MFC question help

  • Calculate the required size of text to fit in column
    D drabudawood

    :confused:How can I calculate the required size of text which can be placed in one column of CListCtrl object and fits in. when I tried to use the next code, some text did not appear all, I get three dots at the end of the appeared text on the column. Can you help me please what is wrong with code ? void CMyDialogDlg::AdjustColSize(int ColNo,CString s) { CClientDC dc(this); CSize sz; CFont *f = m_ListControl.GetFont(); dc.SelectObject(f); sz = dc.GetTextExtent(s,_tcslen(s)); sz.cx += GetSystemMetrics(SM_CXBORDER); if( width[ColNo] < sz.cx ) { m_ListControl.SetColumnWidth(ColNo,sz.cx); width[ColNo]=sz.cx; } } Dr Abudawood

    C / C++ / MFC question help

  • what function will convert a char to its number value
    D drabudawood

    /* ATOF.C: This program shows how numbers stored * as strings can be converted to numeric values * using the atof, atoi, and atol functions. */ #include #include void main( void ) { char *s; double x; int i; long l; s = " -2309.12E-15"; /* Test of atof */ x = atof( s ); printf( "atof test: ASCII string: %s\tfloat: %e\n", s, x ); s = "7.8912654773d210"; /* Test of atof */ x = atof( s ); printf( "atof test: ASCII string: %s\tfloat: %e\n", s, x ); s = " -9885 pigs"; /* Test of atoi */ i = atoi( s ); printf( "atoi test: ASCII string: %s\t\tinteger: %d\n", s, i ); s = "98854 dollars"; /* Test of atol */ l = atol( s ); printf( "atol test: ASCII string: %s\t\tlong: %ld\n", s, l ); } Output atof test: ASCII string: -2309.12E-15 float: -2.309120e-012 atof test: ASCII string: 7.8912654773d210 float: 7.891265e+210 atoi test: ASCII string: -9885 pigs integer: -9885 atol test: ASCII string: 98854 dollars long: 98854 :) Dr Abudawood

    C / C++ / MFC data-structures question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups