[C++] My D3 OOP framework menu

User Tag List

Page 5 of 5 FirstFirst 12345
Results 61 to 67 of 67
  1. #61
    AGPS's Avatar Member
    Reputation
    1
    Join Date
    Aug 2012
    Posts
    53
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks DarthTon and Enigma, I will try more.

    [C++] My D3 OOP framework
  2. #62
    jpeg2000's Avatar Member
    Reputation
    1
    Join Date
    Sep 2012
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This framework save my time,Thanks

  3. #63
    iceboatherald's Avatar Member
    Reputation
    1
    Join Date
    Nov 2013
    Posts
    12
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Darthton, thx for making your code public...really helps people like me dive into the code and learn! Is everything updated for 2.0.5?

  4. #64
    DarthTon's Avatar Contributor
    Reputation
    171
    Join Date
    Apr 2010
    Posts
    108
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've pushed an update to 2.0.5. Most of stuff should work, but some structures may be a bit off.

  5. #65
    iceboatherald's Avatar Member
    Reputation
    1
    Join Date
    Nov 2013
    Posts
    12
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by DarthTon View Post
    I've pushed an update to 2.0.5. Most of stuff should work, but some structures may be a bit off.
    Thank you for your quick reply and update!

  6. #66
    iceboatherald's Avatar Member
    Reputation
    1
    Join Date
    Nov 2013
    Posts
    12
    Thanks G/R
    1/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Darthton,

    Possible to update this to 2.0.6? Thanks!

  7. #67
    BitHacker's Avatar Master Sergeant
    Reputation
    13
    Join Date
    May 2012
    Posts
    114
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I know this thread is kinda old. But I wanted to comment on the coding style. I really like the style of code for win32.
    Also, this thread was still on the first page. So, I decided to comment. It is really nice win32 code.

    I wanted to add this tidbit.

    While using maps you want to always use there assigned iterator with them. As the performance will basically double on the container.

    You should change this code:

    Code:
    INT_PTR CALLBACK CMainDlg::DialogProcWrapper(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
    {
        // not using iterator
        if(Messages.find(message) != Messages.end())
        {
            // record was found
    	// map function pointer
            return (Instance().*Messages[message])(hDlg, message, wParam, lParam); 
        }
    
        return 0;
    }


    To something that more looks like this:
    Code:
    bool CMainDlg::find_rec( UINT message, PDLGPROC &dlgproc )
    {
    	std::map<UINT, PDLGPROC>::iterator mapMsgProcIt; // standard iterator
    	it = Messages.find(message);
    	if( it != Messages.end() )
    	{
    		dlgproc = it-second;
    		return true; // Found
    	}	
    	return false; // Not Found
    }
    
    INT_PTR CALLBACK CMainDlg::DialogProcWrapper(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
    {
    	PDLGPROC pProc = NULL ;
    	find_rec( message, pProc );
    	if( NULL != pProc )
    	{
    		return pProc;
    	}
            return 0;
    }
    The pProc variable may need to be a class variable. This is all untested code.
    If not the class variable you may need to put the pointer on the heap to use it.

    I seen the map and was like where in the world is the corresponding iterator ? lol...

    Its a little nicer and not to mention faster plus reusable now.

    -BitHacker
    Last edited by BitHacker; 05-08-2015 at 05:56 AM.

Page 5 of 5 FirstFirst 12345

Similar Threads

  1. Microsoft .Net Framework Help ???????????
    By Devilsadvocate in forum WoW EMU Questions & Requests
    Replies: 5
    Last Post: 09-01-2008, 03:19 AM
  2. Net Framework 3.5- setup error.
    By **Sweeny** in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 06-21-2008, 04:53 PM
  3. WoW Framework
    By kynox in forum World of Warcraft Bots and Programs
    Replies: 21
    Last Post: 12-14-2007, 08:25 AM
  4. oops :S
    By ashley in forum World of Warcraft General
    Replies: 3
    Last Post: 12-14-2006, 05:55 PM
All times are GMT -5. The time now is 05:43 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search