• Member Avatar for cambalinho
    cambalinho

    Created win32 - how put a control on center depending on parent size?

    heres my function for convert to client using RECT: void ScreenToClient(HWND WindowDestination, RECT *WindowRectangle) { POINT a={WindowRectangle->right, WindowRectangle->bottom}; WindowRectangle->left=0; WindowRectangle->top=0; ::ScreenToClient(WindowDestination,&a); WindowRectangle->right=a.x; WindowRectangle->bottom=a.y; } maybe have some errors too :( …
  • Member Avatar for cambalinho
    cambalinho

    Began Watching win32 - how put a control on center depending on parent size?

    heres my function for convert to client using RECT: void ScreenToClient(HWND WindowDestination, RECT *WindowRectangle) { POINT a={WindowRectangle->right, WindowRectangle->bottom}; WindowRectangle->left=0; WindowRectangle->top=0; ::ScreenToClient(WindowDestination,&a); WindowRectangle->right=a.x; WindowRectangle->bottom=a.y; } maybe have some errors too :( …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how can i select a font?

    how can i draw a string, transparent, clear? what i mean is, depending on font name, i can see a white color arround the letters :( how can avoid that …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in Why use "const" here?

    ddanbe: i belive that i don't have your experience, but we must, for exemple, use the const on class constructors and overloading operations for not lose data. and some errors …
  • Member Avatar for cambalinho
    cambalinho

    Began Watching Why use "const" here?

    I recently came accross this code: Mat3D R_z(double RotAngle) { const double S = sin (RotAngle); const double C = cos (RotAngle); Mat3D U; U.m_Mat[0][0] = +C; U.m_Mat[0][1] = +S; …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in Why use "const" here?

    i agree with Suzie999. the 'const' key word is for avoid that the variable value is changed. good for function parameters(1 time i was getting problems, until i change the …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how can i select a font?

    maybe you have right, but i can't delete a new pointer, after return it. i belive.
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how can i select a font?

    that's why i gived you the update function: CHOOSEFONT ShowSelectFont(HWND hwnd=GetForegroundWindow()) { CHOOSEFONT cf = {sizeof(CHOOSEFONT)}; LOGFONT* lf = new LOGFONT; cf.Flags = CF_EFFECTS | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS; cf.hwndOwner = …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how can i select a font?

    see the image: 1 - the blue and the image on left couner is the form; 2 - the button is behind the label. 3 - the image and text …
  • Member Avatar for cambalinho
    cambalinho

    Marked Solved Status for win32 - how get the string size correctly?

    i have these function for get the string size: SIZE GetStringSize(string text, HWND hdccontrol=GetForegroundWindow()) { RECT textrect={0}; HDC txthdc=GetDC(hdccontrol); DrawText (txthdc,text.c_str(),-1,&textrect,DT_CALCRECT); ReleaseDC(hdccontrol,txthdc); SIZE a={textrect.right-textrect.left, textrect.bottom-textrect.top}; return a; } the 1st …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how get the string size correctly?

    just a tip: if you choose the font on control, and the control isn't resize. just use\select the same font to txthdc and then calculate the size ;) thanks to …
  • Member Avatar for cambalinho
    cambalinho

    Marked Solved Status for win32 - how can i select a font?

    heres my function for select the font: CHOOSEFONT ShowSelectFont(HWND hwnd=GetForegroundWindow()) { CHOOSEFONT cf = {sizeof(CHOOSEFONT)}; LOGFONT lf; cf.Flags = CF_EFFECTS | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS; cf.hwndOwner = hwnd; cf.lpLogFont = &lf; …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how can i select a font?

    now works fine: CHOOSEFONT ShowSelectFont(HWND hwnd=GetForegroundWindow()) { CHOOSEFONT cf = {sizeof(CHOOSEFONT)}; LOGFONT* lf = new LOGFONT; cf.Flags = CF_EFFECTS | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS; cf.hwndOwner = hwnd; cf.lpLogFont = lf; cf.rgbColors …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how can i select a font?

    CHOOSEFONT ShowSelectFont(HWND hwnd=GetForegroundWindow()) { CHOOSEFONT cf = {sizeof(CHOOSEFONT)}; LOGFONT lf; cf.Flags = CF_EFFECTS | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS; cf.hwndOwner = hwnd; cf.lpLogFont = &lf; cf.rgbColors = RGB(0,0,0); cf.lpLogFont->lfStrikeOut=FALSE; cf.lpLogFont->lfUnderline=FALSE; cf.lpLogFont->lfHeight=-MulDiv(12, GetDeviceCaps(GetDC(hwnd), …
  • Member Avatar for cambalinho
    cambalinho

    Edited win32 - how can i select a font?

    heres my function for select the font: CHOOSEFONT ShowSelectFont(HWND hwnd=GetForegroundWindow()) { CHOOSEFONT cf = {sizeof(CHOOSEFONT)}; LOGFONT lf; cf.Flags = CF_EFFECTS | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS; cf.hwndOwner = hwnd; cf.lpLogFont = &lf; …
  • Member Avatar for cambalinho
    cambalinho

    Created win32 - how can i select a font?

    heres my function for select the font: CHOOSEFONT ShowSelectFont(HWND hwnd=GetForegroundWindow()) { CHOOSEFONT cf = {sizeof(CHOOSEFONT)}; LOGFONT lf; cf.Flags = CF_EFFECTS | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS; cf.hwndOwner = hwnd; cf.lpLogFont = &lf; …
  • Member Avatar for cambalinho
    cambalinho

    Began Watching win32 - how can i select a font?

    heres my function for select the font: CHOOSEFONT ShowSelectFont(HWND hwnd=GetForegroundWindow()) { CHOOSEFONT cf = {sizeof(CHOOSEFONT)}; LOGFONT lf; cf.Flags = CF_EFFECTS | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS; cf.hwndOwner = hwnd; cf.lpLogFont = &lf; …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how get the string size correctly?

    i did a mistake with DrawThemeText(): SIZE GetStringSize(const string text, string ControlName="", int PartID=0, int StateID=0) { RECT textrect={0}; HDC txthdc=GetDC(GetForegroundWindow()); DrawText (txthdc,text.c_str(),-1 ,&textrect,DT_CALCRECT| DT_EXPANDTABS); if(ControlName=="") { DrawText (txthdc,text.c_str(),-1 ,&textrect,DT_CALCRECT| …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - can i get the desktop toolbar?

    finally i found it: HWND GetDesktopToolBar() { return FindWindow("Shell_Traywnd", ""); } i have 1 question: how can i add a toolbar(like the old windows media player mini-toolbar) or buttons on …
  • Member Avatar for cambalinho
    cambalinho

    Created win32 - can i get the desktop toolbar?

    the GetDesktopWindow() give me the desktop HWND, but how can i get the desktop toolbar HWND? i belive that theres 1 function for get the toolbar on windows, but i …
  • Member Avatar for cambalinho
    cambalinho

    Began Watching win32 - can i get the desktop toolbar?

    the GetDesktopWindow() give me the desktop HWND, but how can i get the desktop toolbar HWND? i belive that theres 1 function for get the toolbar on windows, but i …
  • Member Avatar for cambalinho
    cambalinho

    Gave Reputation to y0f4n in is realy my CPU or other bad configuration?

    firefox can be take extra RAM usage, sometime get effect for CPU usage. pls try use "Momo - Web Browser Optimizer",this will help to optimize firefox memory usage od your …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how make the control transparent?

    doing an irregular control without using Regions. please correct me: hide a backcolor(or other color) is called transparent? or i'm using the wrong terms\words or i don't know. please correct …
  • Member Avatar for cambalinho
    cambalinho

    Created win32 - how make the control transparent?

    (i'm using win7) i can use the Region functions for get the transparent control. but, in some cases, i can get bad resoltes(. i have read that i can use …
  • Member Avatar for cambalinho
    cambalinho

    Began Watching win32 - how make the control transparent?

    (i'm using win7) i can use the Region functions for get the transparent control. but, in some cases, i can get bad resoltes(. i have read that i can use …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in is realy my CPU or other bad configuration?

    problem resolved, but i'm confused. the firefox or other browser activated the Flash Player addon, but not on video. on video, i was, always with HTML 5, instead Flash Player(i …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in is realy my CPU or other bad configuration?

    the internet explorer can show me the online video without so many problems. but the browser is very slow :( any advice please?
  • Member Avatar for cambalinho
    cambalinho

    Marked Solved Status for win32 - how show the ToolTip manually?

    i have these function for create the tooltip: HWND CreateToolTip(HWND hwndTool, string text) { /*INITCOMMONCONTROLSEX icc; icc.dwSize = sizeof(INITCOMMONCONTROLSEX); icc.dwICC = ICC_BAR_CLASSES | ICC_TAB_CLASSES | ICC_WIN95_CLASSES; InitCommonControlsEx(&icc);*/ if (text=="") { …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how show the ToolTip manually?

    my Region code affects the ToolTip control. so i did my own ToolTip control and now works fine. thanks for all
  • Member Avatar for cambalinho
    cambalinho

    Marked Solved Status for win32 - how show a control always on top?

    i did several ways and nothing work correctly. i have 2 controls: 1 - label: with an animation; 2 - the tooltip is showed on top until the label is …
  • Member Avatar for cambalinho
    cambalinho

    Marked Solved Status for win32 - how show a control always on top?

    i did several ways and nothing work correctly. i have 2 controls: 1 - label: with an animation; 2 - the tooltip is showed on top until the label is …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how show a control always on top?

    the HWND_TOP with SetWindowPos() works fine. but(very important) the WS_CLIPSIBLINGS child style is used when i create the child control for avoid several drawed problems when we use the WS_CLIPCHILDREN …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in is realy my CPU or other bad configuration?

    yes.. it's dual core. but how can resolve the problem? :(
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in how put a class function name on lambda parameter?

    for correct it i nust take off the '*' pointer operator and i create precompiled routines: #define GetProperty(x) std::bind(&x, this) #define SetProperty(x) std::bind(&x, this, std::placeholders::_1) //how use it: property <string> …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in is realy my CPU or other bad configuration?

    memory shared 1151MB; video system memory 0MB; and have 3GB's of ram. i use the firefox, but the chrome have the same problem
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how get the string size correctly?

    i did several mistakes. and i resolve the problem. see my new function: SIZE GetStringSize(const string text, string ControlName="", int PartID=0, int StateID=0) { RECT textrect={0}; HDC txthdc=GetDC(GetForegroundWindow()); if(ControlName=="") { …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in is realy my CPU or other bad configuration?

    maybe is 2.00GHz of CPU and 256MB of graphic and i must use less quallity on youtube.
  • Member Avatar for cambalinho
    cambalinho

    Created is realy my CPU or other bad configuration?

    my CPU can be 50% or even 100% with online videos(i'm using firefox, but i notice on chrome too). maybe i have the Hadware\Video Acellerator Activated or something. can anyone …
  • Member Avatar for cambalinho
    cambalinho

    Began Watching is realy my CPU or other bad configuration?

    my CPU can be 50% or even 100% with online videos(i'm using firefox, but i notice on chrome too). maybe i have the Hadware\Video Acellerator Activated or something. can anyone …
  • Member Avatar for cambalinho
    cambalinho

    Created how put a class function name on lambda parameter?

    see my property constructor: template <typename T> class property { private: T PropertyValue; std::function<T(void)> getf; std::function<void(T)> setf; public: property(const T &value) { getf=nullptr; setf=nullptr; PropertyValue=value; } property(const property &value) : …
  • Member Avatar for cambalinho
    cambalinho

    Began Watching how put a class function name on lambda parameter?

    see my property constructor: template <typename T> class property { private: T PropertyValue; std::function<T(void)> getf; std::function<void(T)> setf; public: property(const T &value) { getf=nullptr; setf=nullptr; PropertyValue=value; } property(const property &value) : …
  • Member Avatar for cambalinho
    cambalinho

    Created win32 - how get the string size correctly?

    i have these function for get the string size: SIZE GetStringSize(string text, HWND hdccontrol=GetForegroundWindow()) { RECT textrect={0}; HDC txthdc=GetDC(hdccontrol); DrawText (txthdc,text.c_str(),-1,&textrect,DT_CALCRECT); ReleaseDC(hdccontrol,txthdc); SIZE a={textrect.right-textrect.left, textrect.bottom-textrect.top}; return a; } the 1st …
  • Member Avatar for cambalinho
    cambalinho

    Began Watching win32 - how get the string size correctly?

    i have these function for get the string size: SIZE GetStringSize(string text, HWND hdccontrol=GetForegroundWindow()) { RECT textrect={0}; HDC txthdc=GetDC(hdccontrol); DrawText (txthdc,text.c_str(),-1,&textrect,DT_CALCRECT); ReleaseDC(hdccontrol,txthdc); SIZE a={textrect.right-textrect.left, textrect.bottom-textrect.top}; return a; } the 1st …
  • Member Avatar for cambalinho
    cambalinho

    Replied To a Post in win32 - how show a control always on top?

    is there any message for test when the Z-Order is changed?
  • Member Avatar for cambalinho
    cambalinho

    Created win32 - how show a control always on top?

    i did several ways and nothing work correctly. i have 2 controls: 1 - label: with an animation; 2 - the tooltip is showed on top until the label is …
  • Member Avatar for cambalinho
    cambalinho

    Began Watching win32 - how show a control always on top?

    i did several ways and nothing work correctly. i have 2 controls: 1 - label: with an animation; 2 - the tooltip is showed on top until the label is …
  • Member Avatar for cambalinho
    cambalinho

    Created win32 - how show the ToolTip manually?

    i have these function for create the tooltip: HWND CreateToolTip(HWND hwndTool, string text) { /*INITCOMMONCONTROLSEX icc; icc.dwSize = sizeof(INITCOMMONCONTROLSEX); icc.dwICC = ICC_BAR_CLASSES | ICC_TAB_CLASSES | ICC_WIN95_CLASSES; InitCommonControlsEx(&icc);*/ if (text=="") { …
  • Member Avatar for cambalinho
    cambalinho

    Began Watching win32 - how show the ToolTip manually?

    i have these function for create the tooltip: HWND CreateToolTip(HWND hwndTool, string text) { /*INITCOMMONCONTROLSEX icc; icc.dwSize = sizeof(INITCOMMONCONTROLSEX); icc.dwICC = ICC_BAR_CLASSES | ICC_TAB_CLASSES | ICC_WIN95_CLASSES; InitCommonControlsEx(&icc);*/ if (text=="") { …
  • Member Avatar for cambalinho
    cambalinho

    Marked Solved Status for win7 - how can i disable a program been executed automatic?

    i have 1 pen drive, that is my network. how can i disable, these pen(but not all pens) or program been automatic executed? (the windows connect to network automatic, so …
  • Member Avatar for cambalinho
    cambalinho

    Gave Reputation to rubberman in win7 - how can i disable a program been executed automatic?

    Services can be disabled from autostarting in the control panel, and you can remove other auto-started applications by removing them from the Start menu's All Programs Startup folder.

The End.