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
S

ScotDolan

@ScotDolan
About
Posts
52
Topics
25
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Full Screen videa and Splash Screen confliction
    S ScotDolan

    The placed the splash screen it's own application and it still failed after the video open full screen. I think the problem lies somewhere in video process feed of windows. Scott

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC hardware help question lounge

  • Full Screen videa and Splash Screen confliction
    S ScotDolan

    I am currently developing application that plays videos for people in a simulator. The video player was developed by an old employee who has since moved on. The old developer used the elecard librarys/SDK to create the video player. The player works pretty good. However, When I close the player and attempt to load another video the desktop is displayed for a short period of time. I tried to create a splash screen to hide the desktop using (CSplash - A Splash Window Class) project found on here. However, the splash screen stops working after new video player is loaded with file and ready to play in full screen. The splash screen window still exist in task manager but the screen is not visible and task manager says it;s not responding. I tried to use tweakUI General, Focus, Prevent applications from stealing focus option. However that did not work:( Is there way to ensure, the splash screen is always on top? Any help here would be great.

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC hardware help question lounge

  • Video not playing in full screen after i log into the pc from vnc.. Even after VNC is closed.
    S ScotDolan

    I have this weird problem that i can not seem to solve. I am playing a video in full screen mode using elecard player. After logging into the PC playing the video with VNC. The video does not seem to wanna play in full screen mode again. It opens in full screen mode but changess to smaller window in few seconds. Any help would be great. I am thinking it could be the video card drives. Possibly a problem with .Net 2.0 but, i am really not sure where to look anymore. Scott

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    .NET (Core and Framework) help csharp hardware

  • DLL Processing Speed,
    S ScotDolan

    I have an application that uses a ISA card to control motion of flight simulator. The ISA card is controlled by C++ classes inside MFC Application. I recently decide to package the ISA card C++ control class into it's own DLL. This will enable me to use other manufacture motion cards at a later date. However, After placing the code into a DLL and change the application to load the library DLL and at start up. I find the application is not performing as fast as it use to? How much overhead does a DLL really add? Is it possible that DLL is my problem here? Where does the dll get it's runtime priority? Is it from the calling appication or do i have to sent it myself. Scott 732-300-9956

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC c++ hardware performance help question

  • XML Visual Studio 2003 MFC C++
    S ScotDolan

    I am developing a new software driver. The software will be package into DLL. I would like to store the configuration information for the DLL in a XML file.. I found lots of different XML Parser pojects on Code Project. However, i would prefer to use one from msdn if there is one available. Does anyone have any recomendations. Scott

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC

  • Exceptions, Throwing, Handling
    S ScotDolan

    Vunic, I am not using a console application. I have MFC application and when i throw and exception it creates window that say Microsft Visual C++ Runtime Error. It has big red x and Has the path of the exe that failed, along with a string telling the failure. I wanna use my string instead of the generic string provided.

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC question hardware

  • Exceptions, Throwing, Handling
    S ScotDolan

    I have application that uses a serial port and I/O card. The application starts up add attempts to initializes the serial card and I/O card. If either of them fail and would like to throw an exception telling the user that corresponding object failed and terminate the applications. How do i accomplish this? I have tried to use throw (" Unable to initialize Serial Port" ); However, it does not display my string. It does terminate the application but, the user is left clue unless..

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC question hardware

  • DLL and C# classes
    S ScotDolan

    I have developed a C# class library that is used to control network communication of two application. The class provides all the functions/methods necessary to initialize, control, implement communications. I would now like to make this class into a DLL or someother object so that communication code is compiled and maintained sperate of the two application. Question? Is Putting the C# communication code into the DLL the right solution for the problem? If not what is the right solution.

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C# question csharp sysadmin hardware help

  • Right Click on dialong button.
    S ScotDolan

    I need the capablitiy to right click on dialog button and display a CMenu object that will have list of options that can be performed. As of right now, I am unable to capture a right mouse click over a dialog button. I am using the ON_WM_RBUTTONDOWN(). The message captures the right mouse clicks over the empty dialog space but no use for me. . Anyone can recommend, a way to capture right mouse clicks over dialog buttons. I do need to know which button i am over.

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC hardware

  • Millisecond Timer Period
    S ScotDolan

    I am currently writing UDP socket class to control a device. I created a class that has a UDP socket. I have blocking function that I uses the socket to transmit a packet to the device. The function than needs receieve the response packet/packets from devices. However, if no valid response is not recieved in x period of millisecond the function needs to timeout. I am having difficulties creating a way to calculate millisecond periods. In the past i use to use GetTickCount(); How do i accomplish this i C# Scott

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C# csharp hardware question

  • using New Opperator for object pointers ( Polymorphism )
    S ScotDolan

    It's not a easy simple C++ Question. Scott

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC wpf oop

  • using New Opperator for object pointers ( Polymorphism )
    S ScotDolan

    I have two different object CLX_MITSUBISHI_POLLING and CLX_LENZE_POLLING. These two classes both inherit four other classes that are similar but not identical. The functions names and parameter of the different inherited classes are identical but the code is not. I am have difficultly finding a way to create a generic class object pointer and then useing the new operator. I am finding it difficult because, i don't have a way to create a generic base class because of the four other objects inherited(CLX_LENZE_LIFT_INVERTOR,etc.) I was thinking may i could do something with templates or null pointer( void *inverter; inverter = new CLX_MITSUBISHI_POLLING();) Unfortunately, the null pointer did not work. Any recommendations would be greatly a appreciated. Cheers Scott CLX_POLLING *Invertors; if( inverter_type == MITSUBISHI ) Invertors = new CLX_MITSUBISHI_POLLING; else Invertors = new CLX_LENZE_POLLING; My CLX_MITSUBISHI_POLLING clases #pragma once #include "windows.h" #include "ClxThread.h" #include "ClxSafeQue.h" #include "ClxMitsubishiParameters.h" #include "ClxMitsubishiLiftInvertor.h" #include "ClxMitsubishiPitchInvertor.h" #include "ClxMitsubishiRollInvertor.h" #include "ClxMitsubishiCounterWeightInvertor.h" class CLX_MITSUBISHI_POLLING : public ClxThread, public CLX_MITSUBISHI_PITCH_INVERTOR, public CLX_MITSUBISHI_ROLL_INVERTOR, public CLX_MITSUBISHI_LIFT_INVERTOR, public CLX_MITSUBISHI_COUNTERWEIGHT_INVERTOR { public: CLX_MITSUBISHI_POLLING(void); ~CLX_MITSUBISHI_POLLING(void); bool mStartPolling(void){ return CreateNewThread(); } private: // Serial Port Specific Commands and Data unsigned short m_BaudRate; int m_CommPort; int m_SerialPortHandlePolling; public: bool mvInitComm( int comm_port, int baud_rate ); bool mvCloseComm( void ); bool mvRestartComm( void ); void mvSetBaudRate(int value); unsigned short mvGetBaudRate(void); void mvSetCommPort(int value); unsigned short mvGetCommPort(void); int mvGetSerialPortHandle( void ); void mvSetSerialPortHandle( int ); private: int mvPutByte( char txdata ); int mvPutPacket( int lenght, char txdata[] ); int mvGetBytes( void ); int mvFlushRxBuf( void ); int mvFlushTxBuf( void ); int mvGetRxBuf(void); int mvGetTxBuf(void); bool mvIsOverrunErrors(void); bool mvIsParityErrors(void); bool

    C / C++ / MFC wpf oop

  • Debugging Exception
    S ScotDolan

    Where the hell is the call stack view?

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC c++ visual-studio hardware debugging help

  • Debugging Exception
    S ScotDolan

    I am getting a exception while running in the debugger. It happens inside a memcpy and VS 2003 C++ stops the app and opens the assembly code for the memcpy. Is there anyway to find out which memcpy in my code cause this problem.

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC c++ visual-studio hardware debugging help

  • Slider Ctrl
    S ScotDolan

    I am not sure how to obtain, set or get the WM_SETFOCUS messages from Dialog item.

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC design hardware help

  • Slider Ctrl
    S ScotDolan

    I have a dialog User Interface that has two Sliders and several other buttons. I am looking for a way to find out when a particular slider is selected and/or active. Active meaning the mouse movement results in slider movement. Any help would be great.

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC design hardware help

  • C++ Multiple inheritance
    S ScotDolan

    For that scenario why wouldn't you declare an inherited class "inside of mainloop"? Mike, That is exactly what I am trying to do. However, I want mainloop to inherit ClxThread. but i also need it to inherit a Poll_Invertors. The problem is Poll_Invertors also inherits a ClxThread to create its own thread. The results is i end up with only one thread even being started ie basicly dreaded diamond.

       mainloop                           
         /  \\
        /    \\
       /      \\
      /        \\
    

    ClxThread Poll_Invertors
    \
    \
    \
    ClxThread

    The mainloop code class mainloop : public Poll_Invertors, public ClxThread { public: mainloop(); ~mainloop(); void Start(void){ CreateNewThread( ); };// Start Clx thread objecty protected: // The Setup Function the MC362X void init_mc362X(void); bool read_mc362x(void); bool read_lenze_cfg_sheet(void); bool read_independencer( void ); private: void ThreadRun( void ); // This is function that becomes the worker thread. MC362X_MOTION isacard; //Defines Motion object ClxUdp cmd_socket; // ClxUdp data_socket; // } The Poll_Invertors Header lass LENZE_8200_MOTION : public ClxThread, protected CLX_LENZE_8200 { public: LENZE_8200_MOTION(void); ~LENZE_8200_MOTION(void); public: bool init_lenze8200( int comm_port, int baud_rate, long timeout_ms, int maxtxfailures ); bool start_lenze8200(void){ return CreateNewThread(); } //These public member functions are to set, get and control Lift axis lenze 8200 inverter // These function provide a thread safe way to access data member variables that contain // lift axis status information and perform commands. void pitch_set_address( char address ){ return SetAddress( &pitch_axis_data, address ); }; ... char pitch_get_address( void ){ return GetAddress( &pitch_axis_data ); }; private: void ThreadRun(void); // This is the thread function that polls the invertors void RunAll( void ); LNZ82_INVRT_DATA pitch_axis_data; LNZ82_INVRT_DATA roll_axis_data; LNZ82_INVRT_DATA lift_axis_data; LNZ82_INVRT_DATA counterweight_axis_data; ClxSafeQue m_sqInvertorsCmdQue; char m_iInvertorsPollState; char pitch_init(LNZ82_INVRT_DATA *axis); char roll_init(LNZ82_INVRT_DATA *axis); char lift_init(LNZ82_INVRT_DATA *axis); char counterweight_init(LNZ82_INVRT_DATA *axis);

    C / C++ / MFC help c++ hardware oop question

  • C++ Multiple inheritance
    S ScotDolan

    The purpose of bool CreateNewThread(PTHREADFUNC pThreadFunc); is so ClxThread can be used without having to be inherited. So, i can declare a ClxThread object inside of mainloop instead of inheriting clxthread. Then, i pass in the member function of mainloop into ClxThread define object and it will run in a different thread. This way, i can uses ClxThread as a inherited object or static object. This would prevent the dreaded diamond effect.

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC help c++ hardware oop question

  • C++ Multiple inheritance
    S ScotDolan

    The purpose of the thread class is to make simple functions that consolidate, hide all the mondain task that need to be performed to start, kill, suspend, resume, a thread. The object is to try to prevent any Operating System specific code from getting into the my mainloop and poll-lenze code. This will make it easier for me to port the code over to Linux, Unix or any other os that supports C++. This is why the i use ThreadEnter(),ThreadRun(), and ThreadExit() can all be override. Because, ThreadEnter(),ThreadRun(), and ThreadExit() get called in the worker thread. other object is to keep the create a spreate function where the thread code goes. The end results is that when it comes time to port the code over to a new Os, i should only have to rewrite ClxThread. #pragma once class ClxThread { public: ClxThread(); virtual ~ClxThread(); typedef unsigned (__stdcall *PTHREADFUNC)(void *); //Thread Management bool CreateNewThread(void); bool CreateNewThread(PTHREADFUNC pThreadFunc); bool Wait(); //Wait for thread to end bool Suspend(); //Suspend the thread bool Resume(); //Resume a suspended thread bool Kill(); //Terminate a thread bool IsActive(); //Check for activity //override these functions in the derived class virtual void ThreadEntry(){ } virtual void ThreadExit(){ } virtual void ThreadRun(){ } //a friend //friend DWORD WINAPI _ThreadFunc(LPVOID pvThread); static UINT WINAPI _ThreadFunc(LPVOID pParam); public: HANDLE m_hThread; // Thread handle UINT uiThreadId; // bool m_bActive; //activity indicator DWORD m_lpId; //Thread ID }; #include "stdafx.h" #include ".\ClxThread.h" #include /********************************************************************************************* Purpose: Constructor **********************************************************************************************/ ClxThread::ClxThread() { m_hThread = NULL; m_bActive = false; uiThreadId = NULL; } /********************************************************************************************* Purpose: Destructor **********************************************************************************************/ ClxThread::~ClxThread() { Kill(); } bool ClxThread::CreateNewThread(PTHREADFUNC pThreadFunc) { if( m_hThread == NULL ) { // _beginthreadex(Security attributes, stack, Thread proc, Thread param, creation mode, Thread ID) m_hThread = (HANDLE)_beginthreadex(NULL, 0

    C / C++ / MFC help c++ hardware oop question

  • C++ Multiple inheritance
    S ScotDolan

    Mark, I think you are right, I am thinking I need stop inheriting a ClxThread and declare a clxthread object within the mainloop and poll_lenze class. However, I have been struggling to pass a void ThreadFunc(void) into CreateNewThread(PTHREADFUNC pThreadFunc); which turns the function ThreadFunc into working thread/function. However, if i create a function in mainloop like this static UINT WINAPI MaintainingThreadProc(LPVOID pParam); and pass it into CreateNewThread(PTHREADFUNC pThreadFunc) Than, MaintainingThreadProc() function becomes a worker thread. I really would like to just pass the stardard void ThreadFunc(void) function prototype if possible. class ClxThread { public: ClxThread(); virtual ~ClxThread(); typedef unsigned (__stdcall *PTHREADFUNC)(void *); //Thread Management bool CreateNewThread(void); bool CreateNewThread(PTHREADFUNC pThreadFunc); bool Wait(); //Wait for thread to end bool Suspend(); //Suspend the thread bool Resume(); //Resume a suspended thread bool Kill(); //Terminate a thread bool IsActive(); //Check for activity //override these functions in the derived class virtual void ThreadEntry(){ } virtual void ThreadExit(){ } virtual void ThreadRun(){ } //a friend //friend DWORD WINAPI _ThreadFunc(LPVOID pvThread); static UINT WINAPI _ThreadFunc(LPVOID pParam); public: HANDLE m_hThread; // Thread handle UINT uiThreadId; // bool m_bActive; //activity indicator DWORD m_lpId; //Thread ID };

    Scott Dolan Jernie Corporation Engineering & Manufacturing Software, Hardware, & Enclosures

    C / C++ / MFC help c++ hardware oop 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