Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7873087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:24:31+00:00 2026-06-03T02:24:31+00:00

SOLVED After I reinstalled my OS (2008 Server) I then noticed that there’s something

  • 0

SOLVED

After I reinstalled my OS (2008 Server) I then noticed that there’s something odd going on within my program.

Here’s the link to part of the source http://phantomworksstudios.com/cpp/ss/sof-odd.h

Here’s the code first:

custom-data.h

class INI_{

public:
const char* error;
stringstream CharToStr2;


Layout layout;      
Settings settings;

string file; 

int OpenFile(string open_file){
    CharToStr2.str("");
    ifstream SSMAIN_FILE_SETTINGS; 
    CharToStr2<<open_file;
    cout<<"CharToStr: "<<CharToStr2<<endl;
    cout<<"CharToStr.str(): "<<CharToStr2.str()<<endl; 
    cout<<"CharToStr.str.c_str(): "<<CharToStr2.str().c_str()<<endl;

    SSMAIN_FILE_SETTINGS.open(CharToStr2.str().c_str());
        if(!SSMAIN_FILE_SETTINGS){
        CharToStr2<<" is currupt or not found!. Loading default configuration!";
        cout<<"STRING1:"<<CharToStr2<<endl<<endl;
        cout<<"STRING2:"<<CharToStr2.str()<<endl<<endl;
        cout<<"STRING3:"<<CharToStr2.str().c_str()<<endl<<endl;
        error=CharToStr2.str().c_str(); 
        cout<<"ERROR:"<<error<<endl;   
        }
    cout <<"CLASS INI_: "<<SSMAIN_FILE_SETTINGS<<" : "<<file<<endl<<endl;
    }
};

INI_ SourceStudioConfiguration;

procedures.h

case WM_CREATE:  
SSMAIN_EXPLORERWINDOW_MENU=LoadMenu(SSMAIN_HINSTANCE,MAKEINTRESOURCE(ID_EXPLORER_MENU));
    SourceStudioConfiguration.layout.cx=0;   
    User_Buffer=32767;
    OpenProcessToken(GetCurrentProcess(),TOKEN_QUERY,&hToken);
    GetUserProfileDirectory(hToken,InfoBuf,&User_Buffer);
    User_Path=InfoBuf;
//      cout<<InfoBuf<<endl<<endl;
    CharToStr<<InfoBuf<<"\\Source Studio\\preference.ini";
    preference=CharToStr.str();
    cout<<User_Path<<" : "<<preference<<endl<<endl;
//       SourceStudioConfiguration.file=preference;
    SourceStudioConfiguration.OpenFile(preference);
    cout<<"CREATE:"<<SourceStudioConfiguration.error<<endl<<endl;

    cout<<"Class File"<<SourceStudioConfiguration.file<<endl<<endl;
    hbmPWSBUTTON = (HBITMAP)LoadBitmap(hInst_PWSBUTTON, MAKEINTRESOURCE(IMG_PWS_BUTTON));
    cout<<"Load PWS Bitmap: "<<hbmPWSBUTTON<<endl;
    hbmPWSCommandOVERVIEW=(HBITMAP)LoadBitmap(hInst_PWSCOMMANDTB,  MAKENTRESOURCE(IMG_PWS_COMMAND_OVERVIEW));
    hbmPWSCommandDOCUMENT=(HBITMAP)LoadBitmap(hInst_PWSCOMMANDTB, MAKEINTRESOURCE(IMG_PWS_COMMAND_DOCUMENT));
    hbmPWSCommandNEWFILE=(HBITMAP)LoadBitmap(hInst_PWSCOMMANDTB, MAKEINTRESOURCE(IMG_PWS_COMMAND_NEWFILE));
    hbmPWSCommandCLOSE=(HBITMAP)LoadBitmap(hInst_PWSCOMMANDTB, MAKEINTRESOURCE(IMG_PWS_COMMAND_CLOSE));
    cout<<"CREATE:"<<SourceStudioConfiguration.error<<endl<<endl;
    cout<<"Load PWS Command Toolbar Bitmap: "<<hbmPWSCommandOVERVIEW<<endl;
    cout<<"CREATE 277:"<<SourceStudioConfiguration.error<<endl<<endl;
    SSMAIN_REBARWINDOW = CreateWindowEx(WS_EX_TOOLWINDOW|WS_EX_TRANSPARENT, REBARCLASSNAME,NULL,            WS_CHILD|WS_BORDER|RBS_VARHEIGHT|TBS_HORZ|RBS_BANDBORDERS|CCS_NODIVIDER|CCS_NOPARENTALIGN,0,0,0,0,hwnd, NULL, 0, 0);     
    SSMAIN_EXPLORERWINDOW=CreateWindowEx(WS_EX_TRANSPARENT,"button",NULL, BS_GROUPBOX|WS_CHILD,0,79,150,SSMAIN_HEIGHT-157,hwnd, (HMENU)SSMAIN_EXPLORERWINDOW_MENU, SSMAIN_EXPLORERBAR_HINSTANCE, 0);     
    //SSMAIN_EXPLORERWINDOW_REBAR=CreateWindowEx(WS_EX_TOOLWINDOW|WS_EX_TRANSPARENT, REBARCLASSNAME, NULL, WS_CHILD|WS_BORDER|RBS_VARHEIGHT|TBS_HORZ|RBS_BANDBORDERS|CCS_NODIVIDER|CCS_NOPARENTALIGN, 0,0,0,0,SSMAIN_EXPLORERWINDOW,NULL,0,0);     
    SSMAIN_NAVIGATIONTOOLBAR=CreateWindowEx(WS_EX_TOOLWINDOW|WS_EX_TRANSPARENT, "TOOLBARWINDOW32", NULL, WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|TBSTYLE_TOOLTIPS|TBSTYLE_FLAT|TBSTYLE_ALTDRAG|TBSTYLE_LIST|CCS_NODIVIDER|CCS_NOPARENTALIGN|CCS_ADJUSTABLE|CCS_NORESIZE, 0, 0, 0, 0,SSMAIN_REBARWINDOW, (HMENU)IDC_NAVIGATIONTOOLBAR, GetModuleHandle(NULL), NULL);
    SSMAIN_EXPLORERWINDOW_OVERVIEW=CreateWindowEx(0,"button", NULL,BS_BITMAP|BS_USERBUTTON|BS_TEXT|WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS, 4, 12, 18, 18,SSMAIN_EXPLORERWINDOW, (HMENU)IDC_EXPLORERWINDOW_REBAR_COMMANDBAR, GetModuleHandle(NULL), NULL);
    SSMAIN_EXPLORERWINDOW_DOCUMENT=CreateWindowEx(0, "button",NULL,BS_BITMAP|BS_USERBUTTON|BS_TEXT|WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS, 24, 12, 18, 18,SSMAIN_EXPLORERWINDOW, (HMENU)IDC_EXPLORERWINDOW_REBAR_COMMANDBAR, GetModuleHandle(NULL), NULL);
    SSMAIN_EXPLORERWINDOW_NEWFILE=CreateWindowEx(0,"button",NULL, BS_BITMAP|BS_USERBUTTON|BS_TEXT|WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS, 44, 12, 18, 18,SSMAIN_EXPLORERWINDOW, (HMENU)IDC_EXPLORERWINDOW_REBAR_COMMANDBAR, GetModuleHandle(NULL), NULL);
    SSMAIN_EXPLORERWINDOW_CLOSE=CreateWindowEx(0,"button",NULL, BS_BITMAP|BS_USERBUTTON|BS_TEXT|WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS, 62, 12, 18, 18,SSMAIN_EXPLORERWINDOW, (HMENU)IDC_EXPLORERWINDOW_REBAR_COMMANDBAR, GetModuleHandle(NULL), NULL);

    //SSMAIN_PARENTCONTAINER=CreateWindow("SYSTABCONTROL32","", WS_EX_COMPOSITED|WS_CHILD|WS_VISIBLE,100,100,0,0,hwnd,(HMENU)ID_PARENTCONTAINER,SSMAIN_PARENTCONTAINER_HINSTANCE, NULL);                  
    SSMAIN_STATIC_RTF_CONTAINER=CreateWindowEx(WS_EX_TRANSPARENT|WS_EX_CLIENTEDGE, "static","",WS_CHILD,0,0,0,0,hwnd,(HMENU)IDC_STATIC_RTF_CONTAINER,0,0);
    SSMAIN_STATIC_RTFCONTROL_PARENT_HSCROLL=CreateWindow("SCROLLBAR","", WS_EX_COMPOSITED|WS_CHILD|WS_VISIBLE|SBS_BOTTOMALIGN,100,100,20,20,SSMAIN_STATIC_RTF_CONTAINER,(HMENU)IDC_STATIC_RTFCONTROL_PARENT_HSCROLL,SSMAIN_PARENTCONTAINER_HINSTANCE,NULL);        

    SSMAIN_LISTBOXRTFCOUNT= CreateWindowEx(0,"LISTBOX",NULL, WS_CHILD|WS_CLIPSIBLINGS|ECO_AUTOVSCROLL|LBS_NOINTEGRALHEIGHT|LBS_NOTIFY|WS_VISIBLE|WS_GROUP, 0,0,0,0,SSMAIN_STATIC_RTF_CONTAINER,(HMENU)IDC_LISTBOXRTFCOUNT,NULL,NULL);             

    SSMAIN_RTFCONTROL=CreateWindow("RICHEDIT","text", WS_CHILD|WS_VISIBLE|ES_MULTILINE|ES_AUTOHSCROLL|WS_VSCROLL|WS_HSCROLL|WS_GROUP, 0,0,0,0,SSMAIN_STATIC_RTF_CONTAINER,(HMENU)IDC_RTFCONTROL,SSMAIN_RTFCONTROL_HINSTANCE,0);

    SSMAIN_TOOLBAR=CreateWindowEx(WS_EX_TOOLWINDOW|WS_EX_TRANSPARENT, "TOOLBARWINDOW32", NULL, WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|TBSTYLE_TOOLTIPS|TBSTYLE_FLAT|TBSTYLE_ALTDRAG|TBSTYLE_LIST|CCS_NODIVIDER|CCS_NOPARENTALIGN|CCS_ADJUSTABLE|CCS_NORESIZE, 0, 0, 0, 0,hwnd, (HMENU)IDC_TOOLBAR, GetModuleHandle(NULL), NULL);
    SSMAIN_STATUSBAR = CreateWindow("MSCTLS_STATUSBAR32", "", WS_EX_COMPOSITED|WS_CHILD|WS_VISIBLE, 100, 100, 0, 0, hwnd, NULL, 0, NULL);                          

    cout<<"CREATE 300:"<<SourceStudioConfiguration.error<<endl<<endl;   SendMessage(SSMAIN_STATUSBAR,SB_SETPARTS,(WPARAM)3,(LPARAM)&panes);
    SSMAIN_TOOLBARSYNTAX = CreateWindowEx(WS_EX_TOOLWINDOW|WS_EX_TRANSPARENT, "TOOLBARWINDOW32", NULL, WS_CHILD|WS_VISIBLE|WS_CLIPSIBLINGS|TBSTYLE_TOOLTIPS|TBSTYLE_FLAT|TBSTYLE_ALTDRAG|TBSTYLE_LIST|CCS_NODIVIDER|CCS_NOPARENTALIGN|CCS_ADJUSTABLE|CCS_NORESIZE, 0, 0, 0, 0,SSMAIN_REBARWINDOW, (HMENU)IDC_TOOLBARSYNTAX, GetModuleHandle(NULL), NULL);
    SSMAIN_PWSBUTTON = CreateWindowEx(WS_EX_TRANSPARENT, "static", NULL, SS_BITMAP|TBSTYLE_TOOLTIPS|SS_NOTIFY|WS_CHILD|WS_VISIBLE, 50, 50, 32, 32, hwnd, (HMENU)IDC_PWSBUTTON, 0, 0);     
                                                                                                         SSMAIN_TOOLTIP = CreateWindowEx(0, TOOLTIPS_CLASS, 0, WS_POPUP|TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, hwnd, 0, SSMAIN_HINSTANCE, 0);

Now for some reason after SSMAIN_RTFCONTROL=CreateWindow("RICHEDIT","... when I display cout<<"CREATE 300:"<<SourceStudioConfiguration.error<<endl<<endl; the text is all random text. Now if I used the same thing before SSMAIN_RTFCONTROL=CreateWindow("RICHEDIT","... it will display correctly like it should.

My question is why is it doing that?

Also if I ignore SSMAIN_RTFCONTROL=CreateWindow("RICHEDIT","... as comment it will work like it should but then after some more lines on the cmd window it will display as random text again.

Is there something going on that I don’t see? Like too much info going on where it start to mess with the error space and maybe setting something within it and it shouldn’t?

Also as far as I can remember I didn’t have this problem before I reinstalled my os.

Thanks and I’m really confused about this and if you need anymore info let me know and I’ll post them

Also guys I tried to format the code by applying spaces like it said, but at times it doesn’t allow any spaces in front of the line and other times it does so I don’t know what’s up with that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:24:34+00:00Added an answer on June 3, 2026 at 2:24 am

    ok guys here’s the solution even though I don’t know why if that makes any sense…

    class INI_{    
    
        public:
        const char* error;
        stringstream CharToStr2;
        string errordesc;
        Layout layout;      
        Settings settings;  
        string file; 
    
        int OpenFile(string open_file){
        CharToStr2.str("");
        ifstream SSMAIN_FILE_SETTINGS; 
        CharToStr2<<open_file;
        cout<<"CharToStr: "<<CharToStr2<<endl;
        cout<<"CharToStr.str(): "<<CharToStr2.str()<<endl; 
        cout<<"CharToStr.str.c_str(): "<<CharToStr2.str().c_str()<<endl;
    
        SSMAIN_FILE_SETTINGS.open(CharToStr2.str().c_str());
        if(!SSMAIN_FILE_SETTINGS){
            CharToStr2<<" is currupt or not found!. Loading default configuration!";
            cout<<"STRING1:"<<CharToStr2<<endl<<endl;
            cout<<"STRING2:"<<CharToStr2.str()<<endl<<endl;
            cout<<"STRING3:"<<CharToStr2.str().c_str()<<endl<<endl;
            errordesc=CharToStr2.str();
            error=errordesc.c_str(); 
            cout<<"ERROR:"<<error<<endl;   
        }
        cout <<"CLASS INI_: "<<SSMAIN_FILE_SETTINGS<<" : "<<file<<endl<<endl;
    }
    };
    

    Noticed that I added a variable string errordesc and assigned the source stream to that, then assigned errordesc to error

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After my last question was solved the JSON I'm receiving from the server changed
Update, Solved: After all this I found out that I was calling an old
After having solved the problem of getting the editor to launch when there's a
Ive got some data (not that the data actually exists until after I solved
I solved the N- Queen problem with the condition that there can only be
Solved I actually found out what is going on here. Turns out it was
After having solved every of my previous issues to get the code running for
EDIT: I solved it seconds after posting the question (sorry!) but can't accept an
I maintain a program that sends messages between users. The clients connect to a
After some problems solved, I got a tricky stuff. I am using an overlay

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.