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
B

Brian

@Brian
About
Posts
6
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Help with Internal OLE Automation Error
    B Brian

    Out of several hundred installations, we have three customers getting this vague SQL error in a VC++ app. When doing an ODBC trace it logs the following error when attempting to query an MS Access DB table record: CTL ffe5d93b:ffe5db2b EXIT SQLExecute with return code -1 (SQL_ERROR) HSTMT 0x008fe7a4 DIAG [22005] [Microsoft][ODBC Microsoft Access Driver] Internal OLE Automation error (-3030) I know what the 22005 SQLSTATE refers to (Error in assignment) but the record it is trying to read can be read fine on hundreds of other installations. I haven't found any reference to the -3030 number. Can anyone shed some light on this for me?

    C / C++ / MFC database help c++ com testing

  • How: Get all the filenames from Open Dialog
    B Brian

    Howdy! I assigned the OFN_ALLOWMULTISELECT flag when I created my Open file dialog, but I don't know how to get the selected filenames. Oh btw, I'm not using MFC. Anyway, if you can help me, please post a reply. Thanks!!

    C / C++ / MFC c++ help tutorial

  • My window easy move bug appears in NT/2000. Help??
    B Brian

    well, i tried it. but umm, that's now what i want. i'll give you the sample code if you feel like to play with it. it's in vc++ code. just e-mail me.

    C / C++ / MFC help c++ delphi json question

  • My window easy move bug appears in NT/2000. Help??
    B Brian

    err... before i try it out, may i ask, what's the effect? does it work like winamp's easy move? thx!!!

    C / C++ / MFC help c++ delphi json question

  • My window easy move bug appears in NT/2000. Help??
    B Brian

    The following code works fine with Windows9x, but not with NT/2000. Can someone help me fix it? Or is there a better approach for moving the window rather than tracking the mouse position and use SetWindowPos(...)? Thanks! p.s: I know it's a Delphi code, but it's using Win32 API, not the VCL. After all, I'm converting the code to VC++ :) program testwin; {$i-} // for loggin option uses windows, messages; const szAppName = 'test window'; szClassName = 'test window class'; var WndClass: TWNDCLASS; Msg: TMSG; hInst: HWND; hMainWnd: HWND; bDragging: Boolean; nOldX, nOldY: Integer; logf: Text; function WndProc(hMainWnd: HWND; Msg, wParam, lParam: LongInt): LongInt; stdcall; var r: TRECT; begin case Msg of WM_CLOSE:; WM_DESTROY: PostQuitMessage(0); WM_LBUTTONDOWN: begin SetCapture(hMainWnd); bDragging := TRUE; nOldX := LoWord(lParam); nOldY := HiWord(lParam); end; WM_LBUTTONUP: begin bDragging := FALSE; ReleaseCapture; end; WM_MOUSEMOVE: begin if ((wParam = MK_LBUTTON) and (bDragging = TRUE)) then begin GetWindowRect(hMainWnd, r); r.left := r.left + (LoWord(lParam) - nOldX); r.top := r.top + (HiWord(lParam) - nOldY); SetWindowPos(hMainWnd, 0, r.left, r.top, 0, 0, SWP_NOSIZE); writeln(logf, 'r.left = ', r.left); writeln(logf, 'r.top = ', r.top); end; end; end; result := DefWindowProc(hMainWnd, Msg, wParam, lParam); end; procedure PreWindow; begin hMainWnd := CreateWindow(szClassName, szAppName, WS_VISIBLE or WS_POPUP or WS_SYSMENU, 0, 0, 200, 100, 0, 0, hInst, nil); ShowWindow(hMainWnd, SW_SHOWNORMAL); UpdateWindow(hMainWnd); end; procedure PreClass; begin hInst := GetModuleHandle(nil); WndClass.style := CS_DBLCLKS; WndClass.lpfnWndProc := @WndProc; WndClass.lpszClassName := szClassName; WndClass.hCursor := LoadCursor(0, IDC_ARROW); WndClass.hInstance := hInst; WndClass.hbrBackground := COLOR_BTNFACE + 1; RegisterClass(WndClass); end; begin PreClass; PreWindow; AssignFile(logf, 'testwin.log'); Rewrite(logf); while (GetMessage(Msg, 0, 0, 0)) do begin TranslateMessage(Msg); DispatchMessage(Msg); end; closefile(logf); end.

    C / C++ / MFC help c++ delphi json question

  • What is wrong with that picture?
    B Brian

    Article of the week ASP Guest book? It takes less that 15 minutes to write! Why? If I write MFC C++ guest book, can my article be article of the week? Gees

    IT & Infrastructure c++ question css learning
  • Login

  • Don't have an account? Register

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