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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
P

PCuong1983

@PCuong1983
About
Posts
17
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • rtp server using ffmpeg in VC++
    P PCuong1983

    i've just doing a project like yours. i have refer to live555.com for my server and rtp directshow filter for my client

    C / C++ / MFC c++ sysadmin

  • Re-Mssql question
    P PCuong1983

    :( sorry This link: http://msdn.microsoft.com/en-us/library/ms131540.aspx[^] may help you.

    C / C++ / MFC database sql-server help sysadmin question

  • Re-Mssql question
    P PCuong1983

    Did you put USE YourDBName query and select query in same connection session ? WHEN and WHERE did you use SELECT DB_NAME() AS DataBaseName ?

    C / C++ / MFC database sql-server help sysadmin question

  • Re-Mssql question
    P PCuong1983

    uhm, I think: the USE keyword (in t-sql) follow by YourDBName (YourDBName without quote) like this USE YourBDName or USE [YourBDName]

    C / C++ / MFC database sql-server help sysadmin question

  • program too big to fit in memory ???
    P PCuong1983

    lan sau post nho' them tag <pre></pre> truoc va sau dong code nhe, kho' nhin qua'

    C / C++ / MFC performance question

  • ERROR 'strcpy' : cannot convert parameter 1 from 'TCHAR [20]' to 'char *'
    P PCuong1983

    try _tcscpy_s function instead strcpy function take a look in strpy definition strcpy work only ASCII , but TCHAR is char if Unicode is not defined or TCHAR is wchar_t if Unicode is defined

    C / C++ / MFC help question

  • Why does my property sheet has disappeared immediately? [solved]
    P PCuong1983

    I have a dialog based application named: basicreport and created one dialog called: CExternalDataDlg , 3 property page called: CImportPage, COptionPage, CConfirmPage and 1 property sheet named: CImportPropertySheet. inside: BOOL CBasicReportApp::InitInstance()

    BOOL CBasicReportApp::InitInstance(){
    ......
    CExternalDataDlg dlg;
    m_pMainWnd = &dlg;
    INT_PTR nResponse = dlg.DoModal();
    if (nResponse == IDOK)
    {
    // TODO: Place code here to handle when the dialog is
    // dismissed with OK

    }
    else if (nResponse == IDCANCEL)
    {
    	// TODO: Place code here to handle when the dialog is
    	//  dismissed with Cancel
    	
    }
        return FALSE;
    

    }

    CExternalDataDlg displayed correctly, worked fine! I have change above code to:

    BOOL CBasicReportApp::InitInstance(){
    ......
    CImportPropertySheet importWizardSheet(_T("Import Spreadsheet Wizard"));
    CImportPage importpage;
    COptionPage optionpage;
    CConfirmPage confirmpage;

    importWizardSheet.AddPage(&importpage);
    importWizardSheet.AddPage(&optionpage);
    importWizardSheet.AddPage(&confirmpage);
    importWizardSheet.SetWizardMode();
    
    
    m\_pMainWnd = &importWizardSheet;
    
    INT\_PTR nWizardResponse = importWizardSheet.DoModal();
    if(nWizardResponse == ID\_WIZFINISH){
    	AfxMessageBox(\_T("Importing..........."));
    }
    else if(nWizardResponse == IDCANCEL){
    	AfxMessageBox(\_T("Cancel"));
    }
    else{
    }
        return FALSE;
    

    }

    CImportPropertySheet displayed correctly, worked fine! but when i combinated the both above into once. It looked like

        CExternalDataDlg dlg;
    m\_pMainWnd = &dlg;
    INT\_PTR nResponse = dlg.DoModal();
    if (nResponse == IDOK)
    {
    	// TODO: Place code here to handle when the dialog is
    	//  dismissed with OK
    	CImportPropertySheet importWizardSheet(\_T("Import Spreadsheet Wizard"));
    	CImportPage importpage;
    	COptionPage optionpage;
    	CConfirmPage confirmpage;
    
    	importWizardSheet.AddPage(&importpage);
    	importWizardSheet.AddPage(&optionpage);
    	importWizardSheet.AddPage(&confirmpage);
    	importWizardSheet.SetWizardMode();
    	
    	INT\_PTR nWizardResponse = importWizardSheet.DoModal();
    	if(nWizardResponse == ID\_WIZFINISH){
    		AfxMessageBox(\_T("Importing..........."));
    	}
    	else if(nWizardResponse == IDCANCEL){
    		AfxMessageBox(\_T("Cancel"));
    	}
    	else{
    	}
    }
    else if (nResponse == IDCANCEL)
    {
    	// TODO: Place code here to handle when the dialog is
    	//  dismissed with Cancel
    	return FALSE;
    
    C / C++ / MFC question

  • accessing controls in javascript in asp.net
    P PCuong1983

    where is your code ? or try: document.getElementById('<%=YourControl.ClientID%>');

    ASP.NET csharp javascript asp-net visual-studio help

  • How to Convert the .bmp and .jpg Images into .gif Image
    P PCuong1983

    hi, U can use instance of Bitmap class like this Bitmap b = new Bitmap(...) ans use public Save method to save image with format ImageFormat.Gif and if u want to resize image , try this code , hope it help

    public Size CalculateDimensions(Size oldSize, int targetSize)
    {
    Size newSize = new Size();
    if (oldSize.Height > oldSize.Width)
    {
    newSize.Width = (int)(oldSize.Width * ((float)targetSize / (float)oldSize.Height));
    newSize.Height = targetSize;
    }
    else
    {
    newSize.Width = targetSize;
    newSize.Height = (int)(oldSize.Height * ((float)targetSize / (float)oldSize.Width));
    }
    return newSize;
    }

    the oldSize param is old size of your image the targetSize param is new dimension you want to resize to.

    ASP.NET tutorial

  • User Control in Master Page
    P PCuong1983

    what your code ? :confused:

    ASP.NET announcement

  • sprintf?
    P PCuong1983

    You just only declare a array of void pointer like void* ptrList[30]; and no initialize for them. so ptrList[i] point to a value that has no type (and thus also an undetermined length and undetermined dereference properties). ptrList[i] is now == 0x?????????? and if(ptrList[i]) is now similar if(true) let me know if i am wrong

    C / C++ / MFC question

  • Compile time errors
    P PCuong1983

    Oopt! where is your codes that generated these error ?

    C / C++ / MFC c++ csharp visual-studio help tutorial

  • doubt in GetMessagePos() function
    P PCuong1983

    Or use LOWORD and HIWORD macro instead, like this

    DWORD dwPos = ::GetMessagePos ();
    CPoint point (LOWORD (dwPos), HIWORD (dwPos));
    //ScreenToClient (&point);

    C / C++ / MFC tutorial

  • Link error: LNK 2001 unresolved symbol
    P PCuong1983

    Yeah, the full code of that: std::list Hotel::_rooms = NULL; but when i put that line into my cpp file, i got "Project : error PRJ0002 : Error result 31 returned from 'c:\Program Files\Microsoft Visual Studio 8\VC\bin\mt.exe" I have used the "No (/INCREMENTAL:NO)" link option to solved this error Thanks You!

    C / C++ / MFC visual-studio help csharp com debugging

  • Link error: LNK 2001 unresolved symbol
    P PCuong1983

    Hi, I just combinated all code into once file as you saw at http://www.in4iste.com/hms.txt But when i use vs 2005 to compile i got LNK2001 error and when i use vs 2008 to compile , i got no error, this program run normally. im a new in c++, please help!

    C / C++ / MFC visual-studio help csharp com debugging

  • Link error: LNK 2001 unresolved symbol
    P PCuong1983

    Sorry all about pre-my post Here is my source code: http://www.in4site.com/hms.txt When i run compiler i got this error Error 1 error LNK2001: unresolved external symbol "private: static class std::list > * Hotel::_rooms" (?_rooms@Hotel@@0PAV?$list@VRoom@@V?$allocator@VRoom@@@std@@@std@@A) HSM.obj Error 2 fatal error LNK1120: 1 unresolved externals C:\Users\Google\Documents\Visual Studio 2005\Projects\HMSv10\Debug\HMSv10.exe i have looked up LNK2001 error code on MSDN website but no solution for this situation. Can any1 help me solve it ? but when i use vs 2005 to compile i got LNK2001 error, but when i use vs 2008 to compile , i got no error, this program run normally ? i dont know why ? can any1 answer this ? thanks in advance

    C / C++ / MFC visual-studio help csharp com debugging

  • Link error: LNK2001 Fatal error
    P PCuong1983

    Hi all, I have some problems with my program. My source is follow //Address.h #include #include class Address { public: Address() : _street(0), _city(0), _country(0){} Address(char* street, char* city, char* country) : _street(street), _city(city), _country(country) {} ~Address(){std::cout<<"Free memory: "<<std::endl;} public: void SetStreet(char* street){this->_street = street;} char* GetStreet()const{return this->_street;} void SetCity(char* city){this->_city = city;} char* GetCity()const{return this->_city;} void SetCountry(char* country){this->_country = country;} char* GetCountry()const{return this->_country;} friend std::ostream& operator<<(std::ostream& os, const Address& add){os<<"Address: "<<add._street<<" - "<<add._city<<" - "<<add._country<<std::endl; return os;} private: char* _street; char* _city; char* _country; }; //Common.h typedef unsigned int BYTE; enum Method : BYTE{Cash=1, BankTransfer=2, CreditCard=3}; enum OrderStatus : BYTE{Booked=1, BookedNotConfirmed=2, CheckedIn=3, CheckedOut=4, Confirmed=5}; enum RoomType : BYTE {Single = 1, Double = 2, Triple = 3}; typedef unsigned long ULONG; #define TICKS_IN_DAY 86400 // = 24 * 60 * 60 /////////////////////////// // Hotel.cpp #include #include #include #include #include #include "Common.h" #include "Address.h" class Room { public: Room(void); Room(char rid[3], char* name, RoomType type, BYTE noroom, float price, float taxrate, char* notes) : _rid(rid), _name(name), _type(type), _noroom(noroom), _price(price), _taxrate(taxrate), _notes(notes){} void SetRID(char rid[3]){_rid = rid;} char* GetRID()const{return _rid;} void SetName(char* sname){_name = sname;}; char* GetName()const{return _name;} void SetType(RoomType type){_type = type;} RoomType GetType()const{return _type;} void SetNoRoom(BYTE noroom){_noroom = noroom;} BYTE GetNoRoom()const{return _noroom;} void SetPrice(float price){if(price < 0) _price = 0; else _price = price;} float GetPrice()const{return _price;} void SetTaxRate(float taxrate){_taxrate = taxrate;} float GetTaxRate()const{return _taxrate;} void SetNotes(char* snotes){_notes = snotes;} char* GetNotes()const{return _notes;} public: friend bool operator==(const Room& lr, const Room& rr){return bool(strcmp(lr._rid, rr._rid) == 0);} friend bool operator>(const Room& lr, const Room& rr){return bool(strcmp(lr._rid, r

    C / C++ / MFC c++ performance help
  • Login

  • Don't have an account? Register

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